diff --git a/roles/immortal/tasks/main.yml b/roles/immortal/tasks/main.yml index 03483b6..9fec248 100644 --- a/roles/immortal/tasks/main.yml +++ b/roles/immortal/tasks/main.yml @@ -21,9 +21,9 @@ - name: Get users get_users: - min_uid: {{ (ansible_os_family == 'RedHat') | ternary(500,1000) }} + min_uid: "{{ (ansible_os_family == 'RedHat') | ternary(500,1000) }}" max_uid: 65000 - register: users_list + register: users_list - name: Give root exclusively the current controller user's SSH key ansible.posix.authorized_key: @@ -35,7 +35,7 @@ - name: Give all users exclusively the current controller user's SSH key ansible.posix.authorized_key: - user: {{item}} + user: "{{item}}" state: present key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub') }}" exclusive: yes