ami_creator.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Mon, 11 Mar 2013 15:27:04 +0100
changeset 57 28cbe9dbaf1f
parent 54 7e33d0c7f399
child 59 c062ff185a14
permissions -rw-r--r--
added debian config file to avoir conf messages (do you want to replace previously modified config file...)

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


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