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 |
Zack Williams | fe284a1 | 2017-07-01 11:00:04 -0700 | [diff] [blame] | 8 | when: use_maas |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 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 |
Zack Williams | fe284a1 | 2017-07-01 11:00:04 -0700 | [diff] [blame] | 17 | when: use_maas |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 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 |
Zack Williams | fe284a1 | 2017-07-01 11:00:04 -0700 | [diff] [blame] | 27 | when: use_maas |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 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 | |