From 2cd82e5076353d63b74cb8b655cd9799ff4ecd9e Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 26 Feb 2019 15:45:17 +0000 Subject: [PATCH] refactor(pkg): change to `package` instead * https://github.com/saltstack-formulas/template-formula/pull/48#discussion_r259951123 BREAKING CHANGE: Changing the `pkg` directory to `package` will break implementations that are depending on `pkg` for `include` or `sls`-based requisite purposes. --- README.rst | 10 +++++----- template/clean.sls | 2 +- template/config/file.sls | 6 +++--- template/init.sls | 2 +- template/{pkg => package}/clean.sls | 0 template/{pkg => package}/init.sls | 0 template/{pkg => package}/install.sls | 0 7 files changed, 10 insertions(+), 10 deletions(-) rename template/{pkg => package}/clean.sls (100%) rename template/{pkg => package}/init.sls (100%) rename template/{pkg => package}/install.sls (100%) diff --git a/README.rst b/README.rst index bf85b7f5..0e0cd7e7 100644 --- a/README.rst +++ b/README.rst @@ -52,8 +52,8 @@ This installs the template package, manages the template configuration file and then starts the associated template service. -``template.pkg`` ----------------- +``template.package`` +-------------------- This state will install the template package only. @@ -74,7 +74,7 @@ via include list. Meta-state (This is a state that includes other states) -This state will undo everything performed in the ``template`` meta-state in reverse order, i.e. +this state will undo everything performed in the ``template`` meta-state in reverse order, i.e. stops the service, removes the configuration file and then uninstalls the package. @@ -90,8 +90,8 @@ This state will stop the template service and disable it at boot time. This state will remove the configuration of the template service and has a depency on ``template.service.clean`` via include list. -``template.pkg.clean`` ----------------------- +``template.package.clean`` +-------------------------- This state will remove the template package and has a depency on ``template.config.clean`` via include list. diff --git a/template/clean.sls b/template/clean.sls index 60c375e4..2cefe7dd 100644 --- a/template/clean.sls +++ b/template/clean.sls @@ -4,4 +4,4 @@ include: - .service.clean - .config.clean - - .pkg.clean + - .package.clean diff --git a/template/config/file.sls b/template/config/file.sls index f06bc26a..2776a5cb 100644 --- a/template/config/file.sls +++ b/template/config/file.sls @@ -3,12 +3,12 @@ {#- Get the `tplroot` from `tpldir` #} {%- set tplroot = tpldir.split('/')[0] %} -{%- set sls_pkg_install = tplroot ~ '.pkg.install' %} +{%- set sls_package_install = tplroot ~ '.package.install' %} {%- from tplroot ~ "/map.jinja" import template with context %} {%- from tplroot ~ "/macros.jinja" import files_switch with context %} include: - - {{ sls_pkg_install }} + - {{ sls_package_install }} template-config: file.managed: @@ -24,4 +24,4 @@ template-config: - group: root - template: jinja - require: - - sls: {{ sls_pkg_install }} + - sls: {{ sls_package_install }} diff --git a/template/init.sls b/template/init.sls index a9dc5226..858a8e6e 100644 --- a/template/init.sls +++ b/template/init.sls @@ -2,6 +2,6 @@ # vim: ft=sls include: - - .pkg + - .package - .config - .service diff --git a/template/pkg/clean.sls b/template/package/clean.sls similarity index 100% rename from template/pkg/clean.sls rename to template/package/clean.sls diff --git a/template/pkg/init.sls b/template/package/init.sls similarity index 100% rename from template/pkg/init.sls rename to template/package/init.sls diff --git a/template/pkg/install.sls b/template/package/install.sls similarity index 100% rename from template/pkg/install.sls rename to template/package/install.sls