expanded inventory with local machines
This commit is contained in:
parent
33162a0084
commit
9a5e0a2b3a
@ -4,6 +4,11 @@ aws ansible_user=ubuntu
|
|||||||
[doc]
|
[doc]
|
||||||
doc ansible_user=pollen
|
doc ansible_user=pollen
|
||||||
|
|
||||||
|
[local]
|
||||||
|
proxmox ansible_user=root
|
||||||
|
dns ansible_user=pollen
|
||||||
|
|
||||||
[servers:children]
|
[servers:children]
|
||||||
doc
|
doc
|
||||||
aws
|
aws
|
||||||
|
local
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Updates all managed servers
|
- name: Updates all managed servers
|
||||||
hosts: all
|
hosts: servers
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
group_vars: groups_vars/servers.yml
|
group_vars: groups_vars/servers.yml
|
||||||
@ -8,7 +8,6 @@
|
|||||||
- name: update package index on all machines
|
- name: update package index on all machines
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
notify: reboot
|
|
||||||
|
|
||||||
- name: Upgrade all packages to latest version
|
- name: Upgrade all packages to latest version
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
@ -16,7 +15,27 @@
|
|||||||
state: latest
|
state: latest
|
||||||
notify: reboot
|
notify: reboot
|
||||||
|
|
||||||
|
- name: Upgrade pihole on dns using docker compose
|
||||||
|
community.docker.docker_compose:
|
||||||
|
project_src: /home/pollen/pihole
|
||||||
|
state: present
|
||||||
|
recreate: always
|
||||||
|
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: reboot
|
- name: reboot
|
||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
test_command: whoami
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user