Skip to content

Instantly share code, notes, and snippets.

@KevinMGranger
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KevinMGranger/0ad0c0fc7434091fa7e8 to your computer and use it in GitHub Desktop.
Save KevinMGranger/0ad0c0fc7434091fa7e8 to your computer and use it in GitHub Desktop.
Salt State Example
{% 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 %}
/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