This commit is contained in:
David Lopez 2023-08-29 14:36:41 +02:00
parent 4b414b2e73
commit 768c83cc39
3 changed files with 3 additions and 33 deletions

View File

@ -1,19 +0,0 @@
- name: Create New User
hosts: "{{'hostname'}}"
become: true
gather_facts: false
vars:
# Define your username and password here that you want to create on target hosts.
username: hola
userpass: password
supergroup: sudoers
tasks:
- name: Create User
ansible.builtin.user:
name: "{{ username }}"
state: present
shell: /bin/bash
password: "{{ userpass | password_hash('sha512') }}"
update_password: on_create
groups: "{{ super_group }}"
append: yes

View File

@ -1,6 +1,9 @@
---
- hosts: "{{ hosts_servers }}"
gather_facts: no
remote_user: awx
become: yes
become_method: sudo
tasks:
- name: Package installation
apt:

View File

@ -1,14 +0,0 @@
---
- hosts: "{{ hosts_servers }}"
gather_facts: no
tasks:
- name: Package installation
apt:
name:
- "{{ package_name }}"
- "{{ package_name }}"
- "{{ package_name }}"
- "{{ package_name }}"
- "{{ package_name }}"
- "{{ package_name }}"
state: absent