diff --git a/roles/bootstrap/tasks/main.yml b/roles/bootstrap/tasks/main.yml index 1a412c52d1b7a5518767caa846dfbc85a92a68df..b4a99f15f40f1d7545a950d43f1c87a259cd0bc7 100644 --- a/roles/bootstrap/tasks/main.yml +++ b/roles/bootstrap/tasks/main.yml @@ -1,29 +1,29 @@ --- - name: Install sudo - apt: + ansible.builtin.apt: name: sudo state: present - name: Set-up the Ansible group - group: + ansible.builtin.group: name: ansible system: true - name: Set-up the Ansible user - user: + ansible.builtin.user: name: ansible system: true group: ansible shell: /bin/bash - name: Set-up authorized key for the Ansible user - authorized_key: + ansible.posix.authorized_key: user: ansible key: "{{ ansible_key }}" - name: Set-up password-less sudo for the ansible user - copy: + ansible.builtin.copy: src: "ansible_sudo" dest: "/etc/sudoers.d/ansible" mode: "0640" @@ -31,13 +31,13 @@ group: root - name: Revoke rights for Ansible user to log-in as root to server via ssh - authorized_key: + ansible.posix.authorized_key: user: root key: "{{ ansible_key }}" state: absent - name: Explicitly run all handlers - include_tasks: ../handlers/main.yml + ansible.builtin.include_tasks: ../handlers/main.yml when: "run_handlers | default(False) | bool()" tags: - handlers