git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/patch.yaml
diff options
context:
space:
mode:
authormail_redacted_for_web 2024-04-14 16:03:24 +0200
committermail_redacted_for_web 2024-04-14 16:03:24 +0200
commit99dc7a1f74535a1068cd5d189442151fa0ffbd1d (patch)
treeceb211b401c1200bb569b65001eaa115ca832c1a /patch.yaml
parent8927a48515420e82bc5c056a83a681dd44a0d3e1 (diff)
downloadansible-99dc7a1f74535a1068cd5d189442151fa0ffbd1d.tar.bz2
Change host selection to pattern matching based on OS
Diffstat (limited to 'patch.yaml')
-rw-r--r--patch.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/patch.yaml b/patch.yaml
index a0e9700..b32e9b0 100644
--- a/patch.yaml
+++ b/patch.yaml
@@ -9,7 +9,28 @@
- name: Gather necessary facts
ansible.builtin.setup:
filter: "ansible_distribution*"
+ - name: Group hosts by distribution file variety
+ 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') }}"
+- 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"
when: ansible_distribution_file_variety == "Debian"
+- 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"
+ when: ansible_distribution_file_variety == "RedHat"