Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https for the ubuntu repo and option to remove /etc/salt/minion. #243

Merged
merged 3 commits into from
Jul 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ salt:
# and up as it'll wipe out important files that Salt relies on.
clean_config_d_dir: False

# This state will remove "/etc/salt/minion" when you set this to true.
minion_remove_config: True

# This state will remove "/etc/salt/master" when you set this to true.
master_remove_config: True

# Set this to False to not have the formula install packages (in the case you
# install Salt via git/pip/etc.)
install_packages: True
Expand Down Expand Up @@ -129,7 +135,7 @@ salt:
# salt cloud config
cloud:
master: salt

# For non-templated custom cloud provider/profile/map files
providers:
provider-filename1.conf:
Expand Down Expand Up @@ -158,7 +164,7 @@ salt:
map-filename1.map:
server-non-prod:
- host.mycompany.com:
grains:
grains:
environment: dev1

# You can take profile and map templates from an alternate location
Expand Down
3 changes: 3 additions & 0 deletions salt/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ salt:

config_path: /etc/salt

minion_remove_config: False
master_remove_config: False

minion_service: salt-minion
master_service: salt-master
api_service: salt-api
Expand Down
6 changes: 6 additions & 0 deletions salt/master.sls
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ salt-master:
- file: salt-master
- file: remove-old-master-conf-file

{% if salt_settings.master_remove_config %}
remove-default-master-conf-file:
file.absent:
- name: {{ salt_settings.config_path }}/master
{% endif %}

# clean up old _defaults.conf file if they have it around
remove-old-master-conf-file:
file.absent:
Expand Down
6 changes: 6 additions & 0 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ salt-minion:
- file: salt-minion
- file: remove-old-minion-conf-file

{% if salt_settings.minion_remove_config %}
remove-default-minion-conf-file:
file.absent:
- name: {{ salt_settings.config_path }}/minion
{% endif %}

# clean up old _defaults.conf file if they have it around
remove-old-minion-conf-file:
file.absent:
Expand Down
2 changes: 1 addition & 1 deletion salt/pkgrepo/ubuntu/init.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
saltstack-pkgrepo:
pkgrepo.managed:
- name: deb http://repo.saltstack.com/apt/ubuntu/{{ grains['lsb_distrib_release'] }}/amd64/latest {{ grains['lsb_distrib_codename'] }} main
- name: deb https://repo.saltstack.com/apt/ubuntu/{{ grains['lsb_distrib_release'] }}/amd64/latest {{ grains['lsb_distrib_codename'] }} main
- file: /etc/apt/sources.list.d/saltstack.list
- key_url: https://repo.saltstack.com/apt/ubuntu/{{ grains['lsb_distrib_release'] }}/amd64/latest/SALTSTACK-GPG-KEY.pub