add update playbook + document

This commit is contained in:
Pierre Guillod 2023-04-10 12:14:31 +02:00
parent 25fa541690
commit a01d6b3316
Signed by: pierre
GPG key ID: B00B454469924EDF
2 changed files with 25 additions and 1 deletions

View file

@ -1,3 +1,20 @@
# ansible-playbooks # ansible-playbooks
Ansible playbooks to manage the IT infrastructure Ansible playbooks to manage the IT infrastructure.
## Configure hosts
Make sure to define the hosts in `/etc/ansible/hosts`:
```sh
[serversgroup]
<hostname or IP address> ansible_user=ansible
```
## Run playbooks
The `ssh` credentials can be specified interactively:
```sh
ansible-playbook <playbook>.yml -k
```

7
update.yml Normal file
View file

@ -0,0 +1,7 @@
- hosts: dnfservers
tasks:
- name: Upgrade apt packages
become: yes
apt:
upgrade: "dist"
update_cache: yes