|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | # vim: ft=sls |
3 | 3 |
|
| 4 | +{#- Get the `tplroot` from `tpldir` #} |
| 5 | +{%- set tplroot = tpldir.split('/')[0] %} |
| 6 | +{%- from tplroot ~ "/map.jinja" import salt_settings with context %} |
| 7 | +
|
4 | 8 | include: |
5 | 9 | - .package |
6 | 10 | - .config |
7 | 11 | - .service |
| 12 | +
|
| 13 | +{#- Be backward compatible #} |
| 14 | +{%- if grains.kernel != 'Windows' %} |
| 15 | +{%- if grains.os == "MacOS" %} |
| 16 | +salt-master-macos: |
| 17 | + test.show_notification: |
| 18 | + - name: salt-master-macos |
| 19 | + - text: Backward compatible state for {{ |
| 20 | + "'sls:" ~ tplroot ~ ".master.config.files => " |
| 21 | + ~ "salt-master-config-files-macos-LaunchDaemons-file.managed'" |
| 22 | + }} |
| 23 | +{%- endif %} |
| 24 | +
|
| 25 | +{%- set old_states_names = [ |
| 26 | + "'sls:" ~ tplroot ~ ".master.package.install => " |
| 27 | + ~ "salt-master-package-install-pkg.installed'", |
| 28 | + "'sls:" ~ tplroot ~ ".master.config.files => " |
| 29 | + ~ "salt-master-config-files-file.recurse'", |
| 30 | + "'sls:" ~ tplroot ~ ".master.service", |
| 31 | + ] %} |
| 32 | +salt-master: |
| 33 | + test.show_notification: |
| 34 | + - name: salt-master |
| 35 | + - text: Backward compatible state for {{ old_states_names | join(", ") }} |
| 36 | +
|
| 37 | +{%- if salt_settings.master_remove_config %} |
| 38 | +remove-default-master-conf-file: |
| 39 | + test.show_notification: |
| 40 | + - name: remove-default-master-conf-file |
| 41 | + - text: Backward compatible state for {{ |
| 42 | + "'sls:" ~ tplroot ~ ".master.config.files => " |
| 43 | + ~ "salt-master-config-files-remove-old-master-conf-file.absent'" |
| 44 | + }} |
| 45 | +{%- endif %} |
| 46 | +
|
| 47 | +remove-old-master-conf-file: |
| 48 | + test.show_notification: |
| 49 | + - name: remove-old-master-conf-file |
| 50 | + - text: Backward compatible state for {{ |
| 51 | + "'sls:" ~ tplroot ~ ".master.config.files => " |
| 52 | + ~ "salt-master-config-files-remove-old-default-master-conf-file.absent'" |
| 53 | + }} |
| 54 | +{%- endif %} |
0 commit comments