From f59c48498224c2867e7639e3572071d122007f53 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Sun, 16 Feb 2020 21:03:30 +0100 Subject: [PATCH] feat(map.jinja): split `osfingermap.yaml` under `parameters/osfinger/` --- TEMPLATE/osfingermap.yaml | 49 ------------------- .../osfinger/Amazon Linux AMI-2018.yaml | 23 +++++++++ .../parameters/osfinger/Amazon Linux-2.yaml | 23 +++++++++ .../parameters/osfinger/CentOS Linux-7.yaml | 23 +++++++++ .../parameters/osfinger/CentOS Linux-8.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/CentOS-6.yaml | 26 ++++++++++ TEMPLATE/parameters/osfinger/Debian-10.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/Debian-8.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/Debian-9.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/Fedora-30.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/Fedora-31.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/FreeBSD-12.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/Gentoo-2.yaml | 23 +++++++++ TEMPLATE/parameters/osfinger/Leap-15.yaml | 23 +++++++++ .../parameters/osfinger/Ubuntu-16.04.yaml | 23 +++++++++ .../parameters/osfinger/Ubuntu-18.04.yaml | 24 +++++++++ TEMPLATE/parameters/osfinger/Windows-8.1.yaml | 23 +++++++++ 17 files changed, 372 insertions(+), 49 deletions(-) delete mode 100644 TEMPLATE/osfingermap.yaml create mode 100644 TEMPLATE/parameters/osfinger/Amazon Linux AMI-2018.yaml create mode 100644 TEMPLATE/parameters/osfinger/Amazon Linux-2.yaml create mode 100644 TEMPLATE/parameters/osfinger/CentOS Linux-7.yaml create mode 100644 TEMPLATE/parameters/osfinger/CentOS Linux-8.yaml create mode 100644 TEMPLATE/parameters/osfinger/CentOS-6.yaml create mode 100644 TEMPLATE/parameters/osfinger/Debian-10.yaml create mode 100644 TEMPLATE/parameters/osfinger/Debian-8.yaml create mode 100644 TEMPLATE/parameters/osfinger/Debian-9.yaml create mode 100644 TEMPLATE/parameters/osfinger/Fedora-30.yaml create mode 100644 TEMPLATE/parameters/osfinger/Fedora-31.yaml create mode 100644 TEMPLATE/parameters/osfinger/FreeBSD-12.yaml create mode 100644 TEMPLATE/parameters/osfinger/Gentoo-2.yaml create mode 100644 TEMPLATE/parameters/osfinger/Leap-15.yaml create mode 100644 TEMPLATE/parameters/osfinger/Ubuntu-16.04.yaml create mode 100644 TEMPLATE/parameters/osfinger/Ubuntu-18.04.yaml create mode 100644 TEMPLATE/parameters/osfinger/Windows-8.1.yaml diff --git a/TEMPLATE/osfingermap.yaml b/TEMPLATE/osfingermap.yaml deleted file mode 100644 index 7bd9ba7a..00000000 --- a/TEMPLATE/osfingermap.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: ft=yaml -# -# Setup variables using grains['osfinger'] based logic. -# You just need to add the key:values for an `osfinger` that differ -# from `defaults.yaml` + `osarch.yaml` + `os_family.yaml` + `osmap.yaml`. -# Only add an `osfinger` which is/will be supported by the formula. -# -# If you do not need to provide defaults via the `os_finger` grain, -# you will need to provide at least an empty dict in this file, e.g. -# osfingermap: {} ---- -# os: Debian -Debian-10: {} -Debian-9: {} -Debian-8: {} - -# os: Ubuntu -Ubuntu-18.04: - config: /etc/TEMPLATE.d/custom-ubuntu-18.04.conf -Ubuntu-16.04: {} - -# os: Fedora -Fedora-31: {} -Fedora-30: {} - -# os: CentOS -CentOS Linux-8: {} -CentOS Linux-7: {} -CentOS-6: - pkg: - name: TEMPLATE-centos-6 - config: /etc/TEMPLATE.d/custom-centos-6.conf - -# os: Amazon -Amazon Linux-2: {} -Amazon Linux AMI-2018: {} - -# os: SUSE -Leap-15: {} - -# os: FreeBSD -FreeBSD-12: {} - -# os: Windows -Windows-8.1: {} - -# os: Gentoo -Gentoo-2: {} diff --git a/TEMPLATE/parameters/osfinger/Amazon Linux AMI-2018.yaml b/TEMPLATE/parameters/osfinger/Amazon Linux AMI-2018.yaml new file mode 100644 index 00000000..36db3f1f --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Amazon Linux AMI-2018.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Amazon Linux AMI-2018. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Amazon Linux-2.yaml b/TEMPLATE/parameters/osfinger/Amazon Linux-2.yaml new file mode 100644 index 00000000..d01b29d6 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Amazon Linux-2.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Amazon Linux-2. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/CentOS Linux-7.yaml b/TEMPLATE/parameters/osfinger/CentOS Linux-7.yaml new file mode 100644 index 00000000..377b5a51 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/CentOS Linux-7.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == CentOS Linux-7. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/CentOS Linux-8.yaml b/TEMPLATE/parameters/osfinger/CentOS Linux-8.yaml new file mode 100644 index 00000000..3c44f6da --- /dev/null +++ b/TEMPLATE/parameters/osfinger/CentOS Linux-8.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == CentOS Linux-8. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/CentOS-6.yaml b/TEMPLATE/parameters/osfinger/CentOS-6.yaml new file mode 100644 index 00000000..3fb4afbb --- /dev/null +++ b/TEMPLATE/parameters/osfinger/CentOS-6.yaml @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == CentOS-6. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: + pkg: + name: TEMPLATE-centos-6 + config: /etc/TEMPLATE.d/custom-centos-6.conf +... diff --git a/TEMPLATE/parameters/osfinger/Debian-10.yaml b/TEMPLATE/parameters/osfinger/Debian-10.yaml new file mode 100644 index 00000000..405fd829 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Debian-10.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Debian-10. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Debian-8.yaml b/TEMPLATE/parameters/osfinger/Debian-8.yaml new file mode 100644 index 00000000..1986cf03 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Debian-8.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Debian-8. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Debian-9.yaml b/TEMPLATE/parameters/osfinger/Debian-9.yaml new file mode 100644 index 00000000..23763b97 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Debian-9.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Debian-9. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Fedora-30.yaml b/TEMPLATE/parameters/osfinger/Fedora-30.yaml new file mode 100644 index 00000000..fe087626 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Fedora-30.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Fedora-30. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Fedora-31.yaml b/TEMPLATE/parameters/osfinger/Fedora-31.yaml new file mode 100644 index 00000000..b814854e --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Fedora-31.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Fedora-31. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/FreeBSD-12.yaml b/TEMPLATE/parameters/osfinger/FreeBSD-12.yaml new file mode 100644 index 00000000..542cef9f --- /dev/null +++ b/TEMPLATE/parameters/osfinger/FreeBSD-12.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == FreeBSD-12. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Gentoo-2.yaml b/TEMPLATE/parameters/osfinger/Gentoo-2.yaml new file mode 100644 index 00000000..b06f4e69 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Gentoo-2.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Gentoo-2. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Leap-15.yaml b/TEMPLATE/parameters/osfinger/Leap-15.yaml new file mode 100644 index 00000000..9a07b706 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Leap-15.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Leap-15. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Ubuntu-16.04.yaml b/TEMPLATE/parameters/osfinger/Ubuntu-16.04.yaml new file mode 100644 index 00000000..9713a80e --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Ubuntu-16.04.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Ubuntu-16.04. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +... diff --git a/TEMPLATE/parameters/osfinger/Ubuntu-18.04.yaml b/TEMPLATE/parameters/osfinger/Ubuntu-18.04.yaml new file mode 100644 index 00000000..c16dbda9 --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Ubuntu-18.04.yaml @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Ubuntu-18.04. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: + config: /etc/TEMPLATE.d/custom-ubuntu-18.04.conf +... diff --git a/TEMPLATE/parameters/osfinger/Windows-8.1.yaml b/TEMPLATE/parameters/osfinger/Windows-8.1.yaml new file mode 100644 index 00000000..536edb5f --- /dev/null +++ b/TEMPLATE/parameters/osfinger/Windows-8.1.yaml @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to salt['config.get']('osfinger') == Windows-8.1. +# You just need to add the key:values for this `osfinger` that differ +# from `defaults.yaml`. +# +# If you do not need to provide defaults via the `osfinger` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +# +# This file will be merged with `salt.slsutil.merge`: +# +# You can select the merging strategy by defining the `strategy` dict +# with one of: `aggregate`, `list`, `overwrite`, `recurse`, `smart`, e.g. +# strategy: 'recurse' +# +# If you use the `recurse` or `overwrite` strategy, you can aggregate +# the lists by defining the `merge_lists` dict with a boolean, e.g. +# merge_lists: 'true' +--- +values: {} +...