Browse Source

use container_file_read in playbook

update_ca_key
Edoardo Putti 8 years ago
parent
commit
87a0de0f76
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      roles/lxc_guest/tasks/main.yaml

+ 6
- 0
roles/lxc_guest/tasks/main.yaml View File

@ -63,6 +63,12 @@
ignore_errors: true
changed_when: "cert_key_existance.rc != 0"
- block:
- name: Read host public key
container_file_read:
name: "{{ vm_name }}"
path: "/etc/ssh/ssh_host_ed25519_key.pub"
register: vm_public_key
- name: get pub key
shell: lxc-attach -n {{ vm_name }} --clear-env -e -- bash -c "cat /etc/ssh/ssh_host_ed25519_key.pub"
register: pub_key


Loading…
Cancel
Save