Setting up playbook, for updating system packages
Some checks failed
Wiki Resources Sanity Checks / ruff-checks (push) Failing after 1s
Some checks failed
Wiki Resources Sanity Checks / ruff-checks (push) Failing after 1s
This commit is contained in:
@@ -10,12 +10,4 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- ansible
|
- ansible
|
||||||
language: python
|
language: python
|
||||||
exclude: |
|
files: ^ansible/.*$
|
||||||
(?x)(
|
|
||||||
^deprecated/|
|
|
||||||
^infra/|
|
|
||||||
^runbooks/|
|
|
||||||
^wiki-resources/|
|
|
||||||
^\.pre-commit-config.yaml|
|
|
||||||
^\.gitignore
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
stdout_callback = yaml
|
result_format = yaml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
nigel:
|
nigel:
|
||||||
hosts:
|
hosts:
|
||||||
nigel.local:
|
nigel.local:
|
||||||
|
shockrah_xyz:
|
||||||
|
hosts:
|
||||||
|
shockrah.xyz
|
||||||
|
|||||||
17
ansible/playbook/vultr-static-update.yaml
Normal file
17
ansible/playbook/vultr-static-update.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure latest system updates are applied to the host
|
||||||
|
hosts: shockrah.xyz
|
||||||
|
remote_user: webadmin
|
||||||
|
tasks:
|
||||||
|
- name: Run system upgrade and update cache
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
update_cache: true
|
||||||
|
upgrade: safe
|
||||||
|
- name: Reboot Host Trigger
|
||||||
|
tags:
|
||||||
|
- reboot
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Rebooting host now"
|
||||||
|
notify: Reboot Host
|
||||||
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
- name: Restart host to apply any changes and clear out uptime stuff
|
- name: Reboot Host
|
||||||
become: true
|
become: true
|
||||||
|
tags:
|
||||||
|
- reboot
|
||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
msg: "Reboot initiated as a part of housekeeping"
|
msg: "Reboot initiated as a part of housekeeping"
|
||||||
|
|||||||
@@ -6,3 +6,9 @@
|
|||||||
autoclean: true
|
autoclean: true
|
||||||
autoremove: true
|
autoremove: true
|
||||||
upgrade: safe
|
upgrade: safe
|
||||||
|
- name: Notify the reboot
|
||||||
|
tags:
|
||||||
|
- reboot
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Restarting the host itself"
|
||||||
|
notify: Reboot Host
|
||||||
|
|||||||
Reference in New Issue
Block a user