-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(init): convert to metastate; add clean state
- Loading branch information
1 parent
8162bdb
commit ca5f5aa
Showing
7 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,7 +156,7 @@ suites: | |
state_top: | ||
base: | ||
'*': | ||
- redis | ||
- redis.common | ||
- redis.server | ||
pillars: | ||
top.sls: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include: | ||
- redis.server.clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include: | ||
- redis.common | ||
- redis.server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
{%- from "redis/map.jinja" import redis_settings with context %} | ||
{%- set cfg_name = redis_settings.cfg_name -%} | ||
{%- set install_from = redis_settings.install_from -%} | ||
{%- set svc_name = redis_settings.svc_name -%} | ||
{%- set port = redis_settings.port -%} | ||
redis-server-service-clean: | ||
service.dead: | ||
{%- if install_from == 'source' %} | ||
- name: {{ svc_name }}_{{ port }} | ||
{%- else %} | ||
- name: {{ svc_name }} | ||
{%- endif %} | ||
- enable: false | ||
- require_in: | ||
- user: redis-server-clean | ||
- file: redis-server-clean | ||
redis-server-clean: | ||
{%- if install_from == 'source' %} | ||
{%- set user = redis_settings.user -%} | ||
{%- set group = redis_settings.group -%} | ||
user.absent: | ||
- name: {{ user }} | ||
group.absent: | ||
- name: {{ group }} | ||
- require: | ||
- user: redis-server-clean | ||
file.absent: | ||
- names: | ||
- /etc/init/redis-server.conf | ||
- /var/log/redis | ||
- {{ cfg_name }} | ||
- /etc/init.d/redis | ||
- {{ redis_settings.root|default('/usr/local') }} | ||
{%- else %} | ||
pkg.removed: | ||
- name: {{ redis_settings.pkg_name }} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
include: | ||
- .install |
File renamed without changes.