diff --git a/hosts b/hosts index 75678e8..2fa3ee8 100644 --- a/hosts +++ b/hosts @@ -12,10 +12,10 @@ host=mirror ansible_connection=ssh ansible_port=7777 -ansible_user=ubuntu -ansible_password=ubuntu +ansible_user=local +ansible_password=password ansible_become_user=root -ansible_become_password=ubuntu +ansible_become_password=password # 192.168.123.2 host=mirror ansible_connection=ssh ansible_port=22 ansible_user=ubuntu ansible_password=ubuntu ansible_become_user=root ansible_become_password=ubuntu # ansible_ssh_private_key_file diff --git a/qemu/README.md b/qemu/README.md index d7d95b7..db8c0a8 100644 --- a/qemu/README.md +++ b/qemu/README.md @@ -12,7 +12,7 @@ location of your `OVMF_CODE.fd` file. To begin the setup process, in this repo's root, run: ``` -$ ansible-playbook -K qemu/main.yml +$ ansible-playbook -K qemu/install.yml ``` To view the vm, you also need a vnc viewer. diff --git a/qemu/files/user-data b/qemu/files/user-data index ec63fff..76b82fa 100644 --- a/qemu/files/user-data +++ b/qemu/files/user-data @@ -3,9 +3,8 @@ autoinstall: version: 1 identity: hostname: mirror - username: ubuntu - # password is just ubuntu - password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0" + username: local + password: "$6$AOugLxHR5diu/YXY$N1KDTxsetgDQFjpasLzE/228tL1Yid/0rnl9Wv/PQ3MoONcdRlV7uY8JAFUlQ3OnqFzoYjFuKNtC2BWbJK2ca0" locale: en_US ssh: allow-pw: true diff --git a/qemu/main.yml b/qemu/install.yml similarity index 100% rename from qemu/main.yml rename to qemu/install.yml diff --git a/qemu/postinstall.yml b/qemu/postinstall.yml index d45346e..bf1a4ff 100644 --- a/qemu/postinstall.yml +++ b/qemu/postinstall.yml @@ -2,9 +2,11 @@ - hosts: vm tasks: - name: Basic system configuration + become: yes import_role: name: ../roles/system - # - name: Setting up ssh - # import_role: - # name: ../roles/ssh + - name: Setting up ssh + become: yes + import_role: + name: ../roles/ssh diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index c5add08..c6b0dc3 100755 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -21,7 +21,7 @@ password: "{{ 'password' | password_hash('sha512') }}" update_password: on_create loop: - - { user: local, uid: 1000, shell: /bin/bash, home: yes } + - { user: local, uid: 1000, shell: /bin/bash, home: yes } - { user: mirror, uid: 1001, shell: /bin/bash, home: yes } - { user: push, uid: 1002, shell: /bin/sh, home: no } - { user: syscom, uid: 10001, shell: /bin/bash, home: no } @@ -109,4 +109,4 @@ cscmirror raidz2 {{ disk_arg }} - when: zpool_exists.rc != 0 \ No newline at end of file + when: zpool_exists.rc != 0