diff --git a/inventory b/inventory index 6aec0eb..be6f71f 100644 --- a/inventory +++ b/inventory @@ -4,6 +4,11 @@ aws ansible_user=ubuntu [doc] doc ansible_user=pollen +[local] +proxmox ansible_user=root +dns ansible_user=pollen + [servers:children] doc aws +local diff --git a/playbooks/update_upgrade.yml b/playbooks/update_upgrade.yml index af41257..220bdb2 100644 --- a/playbooks/update_upgrade.yml +++ b/playbooks/update_upgrade.yml @@ -1,6 +1,6 @@ --- - name: Updates all managed servers - hosts: all + hosts: servers become: true vars: group_vars: groups_vars/servers.yml @@ -8,7 +8,6 @@ - name: update package index on all machines ansible.builtin.apt: update_cache: yes - notify: reboot - name: Upgrade all packages to latest version ansible.builtin.apt: @@ -16,7 +15,27 @@ state: latest notify: reboot + - name: Upgrade pihole on dns using docker compose + community.docker.docker_compose: + project_src: /home/pollen/pihole + state: present + recreate: always + + handlers: - name: reboot ansible.builtin.reboot: test_command: whoami + +- name: this updates the control node + hosts: localhost + become: true + tasks: + - name: update package index on local machine + ansible.builtin.apt: + update_cache: yes + + - name: update all packages to latest version + ansible.builtin.apt: + name: "*" + state: latest