diff --git a/roles/user/defaults/main.yml b/roles/user/defaults/main.yml index b05f9db..9844e86 100644 --- a/roles/user/defaults/main.yml +++ b/roles/user/defaults/main.yml @@ -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 diff --git a/roles/user/tasks/user_ansible.yml b/roles/user/tasks/user_ansible.yml index c3871cb..e7257e5 100644 --- a/roles/user/tasks/user_ansible.yml +++ b/roles/user/tasks/user_ansible.yml @@ -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