Last active
August 29, 2015 14:06
-
-
Save KevinMGranger/0ad0c0fc7434091fa7e8 to your computer and use it in GitHub Desktop.
Salt State Example
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
{% if grains['os.family'] == 'Arch' %} | |
composer: | |
pkg.installed | |
{% else %} | |
get-composer: | |
cmd.run: | |
- name: 'CURL=`which curl`; $CURL -sS https://getcomposer.org/installer | php' | |
- unless: test -f /usr/local/bin/composer | |
- cwd: /root/ | |
composer: | |
cmd.wait: | |
- name: mv /root/composer.phar /usr/local/bin/composer | |
- cwd: /root/ | |
- watch: | |
- cmd: get-composer | |
{% 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
/path/to/project: | |
composer.installed: | |
- no_dev: true | |
- require: | |
# WHAT GOES HERE: | |
- cmd: composer | |
# OR | |
- pkg: composer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment