Added an update playbook
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
[defaults]
|
||||
remote_user = mike
|
||||
inventory = ./hosts.ini
|
||||
inventory = ./hosts.yml
|
||||
interpreter_python = auto_silent
|
||||
vault_password_file = ./vault-pass.sh
|
||||
|
||||
[privilege_escalation]
|
||||
become_ask_pass = True
|
||||
|
@@ -1,8 +0,0 @@
|
||||
[pve]
|
||||
pve
|
||||
|
||||
[lxc]
|
||||
pve-docker ansible_ssh_user=mike
|
||||
|
||||
[pve:children]
|
||||
lxc
|
14
ansible/hosts.yml
Normal file
14
ansible/hosts.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
ungrouped:
|
||||
hosts:
|
||||
pve:
|
||||
|
||||
debian-vms:
|
||||
hosts:
|
||||
jellyfin:
|
||||
plex:
|
||||
vars:
|
||||
ansible_user: mikewilzn
|
||||
|
||||
arch-vms:
|
||||
hosts:
|
||||
chat-vm:
|
34
ansible/update.yml
Normal file
34
ansible/update.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
- name: Update pacman systems
|
||||
hosts: chat-vm
|
||||
|
||||
tasks:
|
||||
- name: Full system upgrade
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
become: true
|
||||
notify: reboot
|
||||
|
||||
handlers:
|
||||
- name: reboot
|
||||
ansible.builtin.reboot:
|
||||
become: true
|
||||
|
||||
- name: Update apt systems
|
||||
hosts:
|
||||
- debian-vms
|
||||
- pve
|
||||
|
||||
tasks:
|
||||
- name: Pull from repos and update all packages
|
||||
ansible.builtin.apt:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
autoremove: yes
|
||||
become: true
|
||||
notify: reboot
|
||||
|
||||
handlers:
|
||||
- name: reboot
|
||||
ansible.builtin.reboot:
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
bw get password "Ansible Vault"
|
Reference in New Issue
Block a user