We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 339f195 commit 38dc7f3Copy full SHA for 38dc7f3
ansible/roles/basic_users/tasks/main.yml
@@ -48,18 +48,19 @@
48
- basic_users_manage_homedir
49
50
- name: Write generated public key as authorized for SSH access
51
+ # this only runs on the basic_users_manage_homedir so has registered var
52
+ # from that host too
53
authorized_key:
54
user: "{{ item.name }}"
55
state: present
56
manage_dir: no
57
key: "{{ item.ssh_public_key }}"
- loop: "{{ hostvars[ansible_play_hosts | first].basic_users_info.results }}"
58
+ loop: "{{ basic_users_info.results }}"
59
loop_control:
60
label: "{{ item.name }}"
61
when:
62
- item.ssh_public_key is defined
63
- run_once: true
64
65
- name: Write sudo rules
66
blockinfile:
0 commit comments