Skip to content

Commit 6690ee6

Browse files
committed
refactor(states): set state IDs based on a dependable structure
* Based on: - saltstack-formulas#48 (comment) - saltstack-formulas#48 (comment) Consistent structure using 5 parts to the state ID naming: * 3 parts from the filename: - `template/package/install.sls` * 2 parts from the state: - `pkg.installed` * In the structure: - `<formula>-<subdir1>-<subdir2>-<state1>-<state2>` * Putting together to get: - `template-package-install-pkg-installed` BREAKING CHANGE: Wholesale state ID changes will break implementations that are relying on the previous state IDs for requisite purposes.
1 parent 2cd82e5 commit 6690ee6

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

template/config/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
include:
1111
- {{ sls_service_clean }}
1212
13-
template-config-absent:
13+
template-config-clean-file-absent:
1414
file.absent:
1515
- name: {{ template.config }}
1616
- require:

template/config/file.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
include:
1111
- {{ sls_package_install }}
1212
13-
template-config:
13+
template-config-file-file-managed:
1414
file.managed:
1515
- name: {{ template.config }}
1616
- source: {{ files_switch(

template/package/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
include:
1010
- {{ sls_config_clean }}
1111
12-
template-pkg-removed:
12+
template-package-clean-pkg-removed:
1313
pkg.removed:
1414
- name: {{ template.pkg }}
1515
- require:

template/package/install.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
{%- set tplroot = tpldir.split('/')[0] %}
66
{%- from tplroot ~ "/map.jinja" import template with context %}
77
8-
template-pkg:
8+
template-package-install-pkg-installed:
99
pkg.installed:
1010
- name: {{ template.pkg }}

template/service/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{%- set tplroot = tpldir.split('/')[0] %}
66
{%- from tplroot ~ "/map.jinja" import template with context %}
77
8-
template-service-dead:
8+
template-service-clean-service-dead:
99
service.dead:
1010
- name: {{ template.service.name }}
1111
- enable: False

template/service/running.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
include:
1010
- {{ sls_config_file }}
1111
12-
template-service:
12+
template-service-running-service-running:
1313
service.running:
1414
- name: {{ template.service.name }}
1515
- enable: True

0 commit comments

Comments
 (0)