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
# /srv/salt/nginx/init.sls | |
nginx: | |
pkgrepo: | |
# Set up the package repository with PPA | |
- managed | |
- ppa: nginx/stable | |
# This is telling SaltStack that when running pkg module, this is its dependency | |
# This is a reverse way of setting requirements | |
- require_in: | |
- pkg: nginx |
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
# /srv/salt/top.sls | |
base: | |
'*': | |
- website | |
# /srv/salt/apache/install.sls | |
apache: | |
pkg.installed: | |
- name: {{ salt['pillar.get']('pkgs:apache', 'apache2') }} |
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
# /srv/pillar/top.sls | |
base: | |
'os:Debian': | |
- match: grain | |
- debian_packages | |
'os:RedHat': | |
- match: grain | |
- redhat_packages | |
# /srv/pillar/debian_packages.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
# /srv/salt/top.sls | |
base: | |
'*': | |
- apache | |
# /srv/salt/apache.sls OR /srv/salt/apache/init.sls | |
apache: | |
pkg.installed: | |
- name: apache2 |