| # file: roles/head-prep/tasks/main.yml |
| - name: Install prerequisites for using PPA repos |
| - software-properties-common |
| - name: Add Ansible/Juju repositories |
| - name: Prep user account by adding to libvirtd group and generating SSH key |
| name={{ ansible_user_id }} |
| groups="libvirtd" append=yes |
| - name: Register public key in variable |
| shell: cat {{ ansible_user_dir }}/.ssh/id_rsa.pub |
| - name: Add public key to this user account |
| user={{ ansible_user_id }} |
| key="{{ sshkey.stdout }}" |
| - name: Disable host key checking in ~/.ssh/config |
| dest={{ ansible_user_dir }}/.ssh/config |
| line="StrictHostKeyChecking no" |
| owner={{ ansible_user_id }} mode=0600 |
| - name: Disable host key checking in ~/.ansible.cfg |
| dest={{ ansible_user_dir }}/.ansible.cfg |
| owner={{ ansible_user_id }} mode=0644 |