From 95ac63e2cd102295a675d7a71714db5da0dfeeeb Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Fri, 18 Oct 2024 11:29:24 -0400 Subject: [PATCH] ansible: Update user tasks to use fully qualified task names Change-Id: I2bd4369642bcbbd844dec0ca041261745763d85f Signed-off-by: Kienan Stewart --- automation/ansible/roles/common/tasks/users.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/automation/ansible/roles/common/tasks/users.yml b/automation/ansible/roles/common/tasks/users.yml index 8f7e1cf..3899450 100644 --- a/automation/ansible/roles/common/tasks/users.yml +++ b/automation/ansible/roles/common/tasks/users.yml @@ -3,36 +3,36 @@ - access block: - name: Set up authorized_keys for the root user - authorized_key: + ansible.builtin.authorized_key: user: 'root' key: "{% for key in query('fileglob', 'public_keys/*.pub') %}{{ lookup('file', key) ~ '\n'}}{% endfor %}\n{% for key in lookup('vars', 'extra_root_ssh_authorized_keys', default=[]) %}{{ key ~ '\n' }}{% endfor %}" exclusive: true - name: Remove ubuntu user - user: + ansible.builtin.user: name: ubuntu state: absent remove: yes - name: Remove debian user - user: + ansible.builtin.user: name: debian state: absent remove: yes - name: Create jenkins user when: jenkins_user | bool - user: + ansible.builtin.user: name: 'jenkins' - name: Set up authorized_keys for the jenkins user when: jenkins_user | bool - authorized_key: + ansible.builtin.authorized_key: user: 'jenkins' # yamllint disable-line rule:line-length key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA3fwpioVLDoCQsQkYK5bOwPb8N0EXeYm2MleBQTfqxtKaqWWbmUtFXAiyclKHRspjcAiIKwwqLyhPopHBqJzmXnB0GsfGmxXJ6wSBgKJ4kdBVRM+nKlK0wCl1oQkFeV/Xl3jzt1Ey96XiNWlesfkvgcMCpsJzQ7/xRb9IcghskzlQbLOwDNir/156JgAYUYvOLqNCcE+xcgPxJGanfZDXTLkfBYxaeaB8isBPeEU6fhPvu/W055M1uB7E0qhcbFtuKCBu1Fg4jzsW4yDU8+ZB1b5mAXwEAuMbVGMrOf4rjtTpGpQd6XFsXpFT28NU1u5j2cUbtANJalkNDX/UY6XJ jenkins@ci-master-02' - name: Remove jenkins sudoers file - file: + ansible.builtin.file: path: "/etc/sudoers.d/jenkins" state: absent -- 2.34.1