Skip to content

Commit

Permalink
ansible-managed: skip adding pub_keys if vars is not defined
Browse files Browse the repository at this point in the history
This lets this play gracefully skip if ansible_user and ansible_ssh_keys
is not defined.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
  • Loading branch information
andrewschoen committed Jul 9, 2015
1 parent ba5e136 commit 3e4b713
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/ansible-managed/tasks/main.yml
Expand Up @@ -51,5 +51,7 @@
user: "{{ ansible_user }}"
key: "{{ item }}"
with_items: ansible_user_ssh_keys
when: ansible_user_ssh_keys is defined and
ansible_user is defined
tags:
- pubkeys

0 comments on commit 3e4b713

Please sign in to comment.