git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/patch.yaml
diff options
context:
space:
mode:
authorH. P. <coding _æ_ lirion.de> 2024-05-05 14:46:51 +0200
committerH. P. <coding _æ_ lirion.de> 2024-05-05 14:46:51 +0200
commit4f0b5cb177f98c7f1d80504f94eeba94f721d2de (patch)
tree0cc13128f0ac6301c969a328908b74eb3f003344 /patch.yaml
downloados-patch-master.tar.bz2
Initial commit after portHEADmaster
This is a ported collection of my patch playbooks + roles. Before, they were living inside an "all things ansible" repository. The history is not important as shortly before porting, the code had been revamped (before, it employed changes for host selection which worked but changes are not intended for that).
Diffstat (limited to 'patch.yaml')
-rw-r--r--patch.yaml55
1 files changed, 55 insertions, 0 deletions
diff --git a/patch.yaml b/patch.yaml
new file mode 100644
index 0000000..e9159f7
--- /dev/null
+++ b/patch.yaml
@@ -0,0 +1,55 @@
+---
+# You may want to change the default to your favourite host (group) you run this on the most.
+- name: Arrange Inventory
+ hosts: "{{ rthosts | default('CHANGE_ME') }}"
+ order: inventory
+ gather_facts: false
+ # default: all in first step, but that shit requires (int)
+ serial: 666
+ tasks:
+ - name: Gather necessary facts
+ ansible.builtin.setup:
+ filter: "ansible_distribution*"
+ - name: Group hosts by distribution file variety
+ ansible.builtin.group_by:
+ # We choose to lowercase anything here as there should be no collisions but
+ # SUSE could be "SuSE" or "SUSE" (assumed and unverified, but you never know...)
+ key: "adfv_{{ ansible_distribution_file_variety | lower | default('none') }}"
+ tags:
+ - always
+- name: Trigger Debian patching role on Debian hosts
+ hosts: adfv_debian
+ order: inventory
+ gather_facts: false
+ # default: all in first step, but that shit requires (int)
+ serial: 666
+ tasks:
+ - name: Debian Patches
+ ansible.builtin.import_role:
+ name: "patch_debian"
+ tags:
+ - debian
+- name: Trigger Red Hat patching role on Red Hat hosts
+ hosts: adfv_redhat
+ order: inventory
+ gather_facts: false
+ # default: all in first step, but that shit requires (int)
+ serial: 666
+ tasks:
+ - name: Red Hat Patches
+ ansible.builtin.import_role:
+ name: "patch_redhat"
+ tags:
+ - redhat
+- name: Trigger SUSE patching role on SUSE hosts
+ hosts: adfv_suse
+ order: inventory
+ gather_facts: false
+ # default: all in first step, but that shit requires (int)
+ serial: 666
+ tasks:
+ - name: SUSE Patches
+ ansible.builtin.import_role:
+ name: "patch_suse"
+ tags:
+ - suse