diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index a04c0f7..122975a 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -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 diff --git a/ansible/hosts.ini b/ansible/hosts.ini deleted file mode 100644 index 2884dfe..0000000 --- a/ansible/hosts.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pve] -pve - -[lxc] -pve-docker ansible_ssh_user=mike - -[pve:children] -lxc diff --git a/ansible/hosts.yml b/ansible/hosts.yml new file mode 100644 index 0000000..d814356 --- /dev/null +++ b/ansible/hosts.yml @@ -0,0 +1,14 @@ +ungrouped: + hosts: + pve: + +debian-vms: + hosts: + jellyfin: + plex: + vars: + ansible_user: mikewilzn + +arch-vms: + hosts: + chat-vm: diff --git a/ansible/update.yml b/ansible/update.yml new file mode 100644 index 0000000..5336b4d --- /dev/null +++ b/ansible/update.yml @@ -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: diff --git a/ansible/vault-pass.sh b/ansible/vault-pass.sh deleted file mode 100755 index 378be16..0000000 --- a/ansible/vault-pass.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -bw get password "Ansible Vault"