File tree Expand file tree Collapse file tree 8 files changed +45
-3
lines changed Expand file tree Collapse file tree 8 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
67{%- set sls_service_clean = tplroot ~ ' .service.clean' %}
78{%- from tplroot ~ " /map.jinja" import template with context % }
89
910include:
11+ - {{ sls_fail_if_unsupported }}
1012 - {{ sls_service_clean }}
1113
1214template- config- clean- file - absent:
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
67{%- set sls_package_install = tplroot ~ ' .package.install' %}
78{%- from tplroot ~ " /map.jinja" import template with context % }
89{%- from tplroot ~ " /libtofs.jinja" import files_switch with context % }
910
1011include:
12+ - {{ sls_fail_if_unsupported }}
1113 - {{ sls_package_install }}
1214
1315template- config- file - file - managed:
Original file line number Diff line number Diff line change 1010# the `os_finger` grain.
1111---
1212# os: Ubuntu
13+ Ubuntu-14.04 :
14+ unsupported :
15+ osfinger : ' Ubuntu 14.04 (does not use `systemd`).'
16+ Ubuntu-16.04 : {}
1317Ubuntu-18.04 :
1418 config : /etc/template.d/custom-ubuntu-18.04.conf
1519
1620# os: CentOS
1721CentOS-6 :
18- pkg : template-centos-6
19- config : /etc/template.d/custom-centos-6.conf
20- CentOS-7 : {}
22+ unsupported : ' CentOS 6 (does not use `systemd`).'
23+ CentOS-7 :
24+ pkg : template-centos-7
25+ config : /etc/template.d/custom-centos-7.conf
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
67{%- set sls_config_clean = tplroot ~ ' .config.clean' %}
78{%- from tplroot ~ " /map.jinja" import template with context % }
89
910include:
11+ - {{ sls_fail_if_unsupported }}
1012 - {{ sls_config_clean }}
1113
1214template- package- clean- pkg- removed:
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
67{%- from tplroot ~ " /map.jinja" import template with context % }
78
9+ include:
10+ - {{ sls_fail_if_unsupported }}
11+
812template- package- install- pkg- installed:
913 pkg.installed:
1014 - name: {{ template.pkg }}
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
67{%- from tplroot ~ " /map.jinja" import template with context % }
78
9+ include:
10+ - {{ sls_fail_if_unsupported }}
11+
812template- service- clean- service- dead:
913 service.dead:
1014 - name: {{ template.service.name }}
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6+ {%- set sls_fail_if_unsupported = tplroot ~ ' .unsupported' %}
67{%- set sls_config_file = tplroot ~ ' .config.file' %}
78{%- from tplroot ~ " /map.jinja" import template with context % }
89
910include:
11+ - {{ sls_fail_if_unsupported }}
1012 - {{ sls_config_file }}
1113
1214template- 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 % }
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