|
|
@ -157,6 +157,12 @@ |
|
|
|
set_fact: |
|
|
|
user_ca_key: "{{ lookup('file', 'test_ssh_ca.pub') }}" |
|
|
|
|
|
|
|
- name: Update container user CA key |
|
|
|
container_file_write: |
|
|
|
name: "{{ vm_name }}" |
|
|
|
path: "/etc/ssh/user_ca.pub" |
|
|
|
text: "ssh-rsa {{ user_ca_key }}" |
|
|
|
|
|
|
|
- name: update container user ca key |
|
|
|
shell: lxc-attach -n {{ vm_name }} --clear-env -e -- bash -c "grep -F 'ssh-rsa {{ user_ca_key }}' /etc/ssh/user_ca.pub || echo 'ssh-rsa {{ user_ca_key }}' > /etc/ssh/user_ca.pub" |
|
|
|
register: update_user_ca_key |
|
|
|