ami_creator.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Mon, 11 Mar 2013 18:17:56 +0100
changeset 63 0f6a5c11fe7d
parent 59 c062ff185a14
child 65 0cba5e282f10
permissions -rw-r--r--
removed unstable repos and pinning in ubuntu

# /srv/salt/init_machine.sls
my_pkgs:
  pkg.installed:
    - pkgs:
      - salt-minion
      - python
      - mercurial
      - tar
      - rsync
      - glance


{% if  salt['file.find']('ami_hg_address') %}
{% set ami_hg_address = salt['file.find']('ami_hg_address') %}
{% else %}
{% set ami_hg_address = 'http://hg.logilab.fr/users/ptonelli/srv_salt' %}
{% endif %}
hg_ami_creation:
    hg.latest:
        - name: {{ ami_hg_address }}
{% if  salt['file.find']('ami_hg_revision') %}
{% set ami_hg_revision = salt['file.find']('ami_hg_revision') %}
        - rev: {{ ami_hg_revision }}
{% endif %}
        - target: /etc/salt/srv
        - require:
            - pkg: my_pkgs