mirror of
https://github.com/roles-ansible/ansible_collection_users.git
synced 2024-08-16 10:29:50 +02:00
only set ssh keys if explicitly wanted
This commit is contained in:
parent
1d54bbcb09
commit
e1cdffd631
2 changed files with 5 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
# Create ansible user
|
||||
l3d_users_user__create_ansible: true
|
||||
l3d_users_user__ansible_user_state: 'present'
|
||||
|
||||
l3d_users_user__set_ansible_ssh_keys: false
|
||||
l3d_users_user__ansible_ssh_keys: "{{ lookup('url', 'https://github.com/do1jlr.keys', split_lines=False) }}"
|
||||
# run simple versionscheck
|
||||
submodules_versioncheck: false
|
||||
|
|
|
@ -20,10 +20,12 @@
|
|||
ansible.posix.authorized_key:
|
||||
user: 'ansible'
|
||||
state: "{{ l3d_users_user__ansible_user_state | ternary('present', 'absent') }}"
|
||||
key: "{{ lookup('url', 'https://github.com/do1jlr.keys', split_lines=False) }}"
|
||||
key: "{{ l3d_users_user__ansible_ssh_keys }}"
|
||||
exclusive: true
|
||||
when: l3d_users_user__set_ansible_ssh_keys | bool
|
||||
|
||||
- name: Add admin keys to user ansible
|
||||
become: true
|
||||
ansible.builtin.debug:
|
||||
msg: "tbd."
|
||||
when: l3d_users_user__set_ansible_ssh_keys
|
||||
|
|
Loading…
Reference in a new issue