From 27a3ed065cfd1518cf784f4b9609c11b0d6704ff Mon Sep 17 00:00:00 2001 From: ogrechko Date: Tue, 2 Dec 2025 13:30:40 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?test-playbooks=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-playbooks/add_admins[1].yml | 17 +++++++++++++++++ test-playbooks/change_user_password[1].yml | 13 +++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test-playbooks/add_admins[1].yml create mode 100644 test-playbooks/change_user_password[1].yml diff --git a/test-playbooks/add_admins[1].yml b/test-playbooks/add_admins[1].yml new file mode 100644 index 0000000..09fd865 --- /dev/null +++ b/test-playbooks/add_admins[1].yml @@ -0,0 +1,17 @@ +--- +- hosts: all + become: yes + gather_facts: no + serial: 100 + vars: + wheel: wheel + + tasks: + - include_vars: users.yml + - name: add administrators on all servers + user: name={{item.user}} password={{item.password}} groups={{item.groups}} + with_items: '{{admins}}' + register: task + + - include: tasks/collect_changed_hosts.yml + - include: tasks/disable_ssh_root.yml diff --git a/test-playbooks/change_user_password[1].yml b/test-playbooks/change_user_password[1].yml new file mode 100644 index 0000000..64beb2f --- /dev/null +++ b/test-playbooks/change_user_password[1].yml @@ -0,0 +1,13 @@ +--- +- hosts: all + ignore_unreachable: yes + gather_facts: no + become: yes + serial: 1 + + tasks: + - name: change user password + user: + name: + password: "" + update_password: always