diff --git a/README.md b/README.md index b47f8ab..5413d13 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # ansible-playbooks -Ansible playbooks to manage the IT infrastructure \ No newline at end of file +Ansible playbooks to manage the IT infrastructure. + +## Configure hosts + +Make sure to define the hosts in `/etc/ansible/hosts`: + +```sh +[serversgroup] + ansible_user=ansible +``` + +## Run playbooks + +The `ssh` credentials can be specified interactively: + +```sh +ansible-playbook .yml -k +``` \ No newline at end of file diff --git a/update.yml b/update.yml new file mode 100644 index 0000000..14bd486 --- /dev/null +++ b/update.yml @@ -0,0 +1,7 @@ +- hosts: dnfservers + tasks: + - name: Upgrade apt packages + become: yes + apt: + upgrade: "dist" + update_cache: yes