commit 27a3ed065cfd1518cf784f4b9609c11b0d6704ff Author: ogrechko Date: Tue Dec 2 13:30:40 2025 +0000 Загрузить файлы в «test-playbooks» 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