initial commit: Setup basic inventory & update/upgrade task
This commit is contained in:
commit
e23c57f980
3
ansible.cfg
Normal file
3
ansible.cfg
Normal file
|
@ -0,0 +1,3 @@
|
|||
[defaults]
|
||||
inventory = inventory
|
||||
remote_user = root
|
13
inventory
Normal file
13
inventory
Normal file
|
@ -0,0 +1,13 @@
|
|||
[debian]
|
||||
10.10.10.1 #akkoma
|
||||
10.10.10.103 #web-proxy
|
||||
#10.10.10.104 #docker
|
||||
10.10.10.105 #mail
|
||||
10.10.10.106 #monitoring
|
||||
10.10.10.107 #git
|
||||
|
||||
[arch]
|
||||
10.10.10.102 #database
|
||||
|
||||
[arch:vars]
|
||||
ansible_python_interpreter=/usr/bin/python3
|
15
playbooks/update_and_upgrade.yml
Normal file
15
playbooks/update_and_upgrade.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- hosts: all
|
||||
strategy: free
|
||||
tasks:
|
||||
- name: update & upgrade arch systems
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
when: ansible_os_family == "Archlinux"
|
||||
|
||||
- name: update & upgrade debian systems
|
||||
apt:
|
||||
update_cache: true
|
||||
upgrade: "safe"
|
||||
when: ansible_os_family == "Debian"
|
Loading…
Reference in a new issue