Merge "Make provision/remote role safe to include statically"

This commit is contained in:
Zuul 2017-12-01 08:15:00 +00:00 committed by Gerrit Code Review
commit 1cfa0a1292
3 changed files with 4 additions and 12 deletions

View File

@ -102,9 +102,7 @@
- name: Add virt power key to root authorized keys if using qemu:///system
authorized_key:
user: root
key: "{{ item }}"
with_file:
- "{{ virt_power_key }}.pub"
key: "{{ lookup('file', virt_power_key|quote + '.pub')|default('') }}"
when: libvirt_uri == "qemu:///system"
# Copy the public key to `$HOME/.ssh/authorized_keys` for the `root`

View File

@ -35,15 +35,11 @@
- name: Read virt_power private key
no_log: True
set_fact:
virt_power_key_pvt: "{{ item }}"
with_file:
- "{{ virt_power_key }}"
virt_power_key_pvt: "{{ lookup('file', virt_power_key)|default('') }}"
- name: add virt_power_key to remote authorized_keys
authorized_key:
user: "{{ ansible_user_id }}"
key: "{{ item }}"
key: "{{ lookup('file', virt_power_key|quote + '.pub')|default('') }}"
manage_dir: true
with_file:
- "{{ virt_power_key }}.pub"

View File

@ -57,9 +57,7 @@
- name: Configure non-root user authorized_keys
authorized_key:
user: "{{ ssh_user }}"
key: "{{ item }}"
with_file:
- "{{ virt_host_key }}.pub"
key: "{{ lookup('file', virt_host_key|quote + '.pub')|default('') }}"
become: true
- name: Ensure polkit packages are installed