File tree 8 files changed +46
-3
lines changed
8 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
{# - Get the `tplroot` from `tpldir` #}
5
5
{%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
6
7
{%- set sls_service_clean = tplroot ~ ' .service.clean' %}
7
8
{%- from tplroot ~ " /map.jinja" import template with context % }
8
9
9
10
include:
11
+ - {{ sls_fail_if_unsupported }}
10
12
- {{ sls_service_clean }}
11
13
12
14
template- config- clean- file - absent:
Original file line number Diff line number Diff line change 3
3
4
4
{# - Get the `tplroot` from `tpldir` #}
5
5
{%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
6
7
{%- set sls_package_install = tplroot ~ ' .package.install' %}
7
8
{%- from tplroot ~ " /map.jinja" import template with context % }
8
9
{%- from tplroot ~ " /libtofs.jinja" import files_switch with context % }
9
10
10
11
include:
12
+ - {{ sls_fail_if_unsupported }}
11
13
- {{ sls_package_install }}
12
14
13
15
template- config- file - file - managed:
Original file line number Diff line number Diff line change 10
10
# the `os_finger` grain.
11
11
---
12
12
# os: Ubuntu
13
+ Ubuntu-14.04 :
14
+ unsupported :
15
+ osfinger : ' Ubuntu 14.04 (does not use `systemd`).'
16
+ Ubuntu-16.04 : {}
13
17
Ubuntu-18.04 :
14
18
config : /etc/template.d/custom-ubuntu-18.04.conf
15
19
16
20
# os: CentOS
17
21
CentOS-6 :
18
- pkg : template-centos-6
19
- config : /etc/template.d/custom-centos-6.conf
20
- CentOS-7 : {}
22
+ unsupported :
23
+ osfinger : ' CentOS 6 (does not use `systemd`).'
24
+ CentOS-7 :
25
+ pkg : template-centos-7
26
+ config : /etc/template.d/custom-centos-7.conf
Original file line number Diff line number Diff line change 3
3
4
4
{# - Get the `tplroot` from `tpldir` #}
5
5
{%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
6
7
{%- set sls_config_clean = tplroot ~ ' .config.clean' %}
7
8
{%- from tplroot ~ " /map.jinja" import template with context % }
8
9
9
10
include:
11
+ - {{ sls_fail_if_unsupported }}
10
12
- {{ sls_config_clean }}
11
13
12
14
template- package- clean- pkg- removed:
Original file line number Diff line number Diff line change 3
3
4
4
{# - Get the `tplroot` from `tpldir` #}
5
5
{%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
6
7
{%- from tplroot ~ " /map.jinja" import template with context % }
7
8
9
+ include:
10
+ - {{ sls_fail_if_unsupported }}
11
+
8
12
template- package- install- pkg- installed:
9
13
pkg.installed:
10
14
- name: {{ template.pkg }}
Original file line number Diff line number Diff line change 3
3
4
4
{# - Get the `tplroot` from `tpldir` #}
5
5
{%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
6
7
{%- from tplroot ~ " /map.jinja" import template with context % }
7
8
9
+ include:
10
+ - {{ sls_fail_if_unsupported }}
11
+
8
12
template- service- clean- service- dead:
9
13
service.dead:
10
14
- name: {{ template.service.name }}
Original file line number Diff line number Diff line change 3
3
4
4
{# - Get the `tplroot` from `tpldir` #}
5
5
{%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
6
7
{%- set sls_config_file = tplroot ~ ' .config.file' %}
7
8
{%- from tplroot ~ " /map.jinja" import template with context % }
8
9
9
10
include:
11
+ - {{ sls_fail_if_unsupported }}
10
12
- {{ sls_config_file }}
11
13
12
14
template- service- running- service- running:
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ # vim: ft=sls
3
+
4
+ {# - Get the `tplroot` from `tpldir` #}
5
+ {%- set tplroot = tpldir.split(' /' )[0 ] %}
6
+ {%- from tplroot ~ " /map.jinja" import template with context % }
7
+
8
+ {%- if template.unsupported is defined and template.unsupported % }
9
+ template- unsupported- test- fail:
10
+ test.fail_without_changes:
11
+ - name: |
12
+
13
+
14
+ # ######################################
15
+ # Unsupported minion for this formula #
16
+ # ######################################
17
+ {%- for key, val in template.unsupported.items() % }
18
+ * {{ key }}: {{ val }}
19
+ {%- endfor % }
20
+ - failhard: True
21
+ {%- endif % }
You can’t perform that action at this time.
0 commit comments