Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 1 | --- |
| 2 | # ssh-install-maas/tasks/main.yml |
| 3 | |
| 4 | # the following replicates the functionality of the maas repo `prep` role |
| 5 | # users/perms may seem off, but is identical to that role |
| 6 | |
| 7 | - name: Create ssh key directory for MaaS |
| 8 | when: on_maas |
| 9 | file: |
| 10 | dest: "/etc/maas/.ssh/" |
| 11 | mode: 0755 |
| 12 | owner: "root" |
| 13 | group: "root" |
| 14 | state: directory |
| 15 | |
| 16 | - name: Copy ssh private key for MaaS |
| 17 | when: on_maas |
| 18 | copy: |
| 19 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey" |
| 20 | dest: "/etc/maas/.ssh/cord_rsa" |
| 21 | mode: 0644 |
| 22 | owner: "root" |
| 23 | group: "root" |
| 24 | backup: true |
| 25 | |
| 26 | - name: Copy ssh public key for MaaS |
| 27 | when: on_maas |
| 28 | copy: |
| 29 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey.pub" |
| 30 | dest: "/etc/maas/.ssh/cord_rsa.pub" |
| 31 | mode: 0644 |
| 32 | owner: "root" |
| 33 | group: "root" |
| 34 | backup: true |
| 35 | |