Kapitel 12: group_by
This commit is contained in:
parent
fa569830fe
commit
9cc617be45
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -26,3 +26,6 @@
|
||||||
[submodule "roles.extern/selfsignedcert"]
|
[submodule "roles.extern/selfsignedcert"]
|
||||||
path = roles.extern/selfsignedcert
|
path = roles.extern/selfsignedcert
|
||||||
url = https://git.velt.biz/Ansible/selfsignedcert.git
|
url = https://git.velt.biz/Ansible/selfsignedcert.git
|
||||||
|
[submodule "roles.extern/roles_timesync"]
|
||||||
|
path = roles.extern/roles_timesync
|
||||||
|
url = https://git.velt.biz/Ansible/roles_timesync.git
|
||||||
|
|
38
12/group_by.yml
Normal file
38
12/group_by.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
- hosts:
|
||||||
|
- all
|
||||||
|
- localhost
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- group_by:
|
||||||
|
key: "sv_pkgsvcmgr_{{ ansible_pkg_mgr }}-{{ ansible_service_mgr }}"
|
||||||
|
parents:
|
||||||
|
- "sv_pkgmgr_{{ ansible_pkg_mgr }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_svcmgr_{{ ansible_service_mgr }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_mac_{{ '_'.join(ansible_default_ipv4.macaddress.split(':')[5:6]) }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_net4_{{ ansible_default_ipv4.network }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_v6int_{{ ansible_default_ipv6.interface|default('nov6') }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_distri_{{ ansible_distribution }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_family_{{ ansible_os_family }}"
|
||||||
|
|
||||||
|
- group_by:
|
||||||
|
key: "sv_{{ ansible_virtualization_role }}_{{ ansible_virtualization_type }}"
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
- debug:
|
||||||
|
msg: "{{ groups | dict2items | selectattr('key', 'contains', 'sv_') | list | items2dict }}"
|
||||||
|
|
1
12/timesync.yml
Symbolic link
1
12/timesync.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../roles.extern/roles_timesync/timesync.yml
|
|
@ -1 +1 @@
|
||||||
11/ansible.cfg
|
12/ansible.cfg
|
6
helper/12_gitmodules_timesync.sh
Executable file
6
helper/12_gitmodules_timesync.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
mkdir -p roles.extern
|
||||||
|
|
||||||
|
git submodule add https://git.velt.biz/Ansible/roles_timesync.git roles.extern/roles_timesync
|
||||||
|
|
1
roles.extern/roles_timesync
Submodule
1
roles.extern/roles_timesync
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit bb38d9e89130b68dabf997059cf8f863d4625739
|
Loading…
Reference in a new issue