update.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Fri, 15 Mar 2013 10:17:58 +0100
changeset 83 09fdf067e0b7
child 85 8010f73133e5
permissions -rw-r--r--
created additionnal state for preparatory state (update.sls) and updated top.sls salt file to call it instead of ami_creator.sls (ami_creator.sls will actually prepare the machine in next commit)

my_pkgs:
  pkg.installed:
    - pkgs:
      - salt-minion
      - python
      - mercurial
      - tar
      - rsync
      - glance

{% if 'ami.hg_address' not in grains %}
ami.hg_address:
    grains.present:
        - value : http://hg.logilab.fr/users/ptonelli/srv_salt
{% endif %}

hg_code:
    hg.latest:
        - name: {{ grains['ami.hg_address'] }}
{% if 'ami.hg_rev' in grains %}
        - rev: {{ grains['ami.hg_rev'] }}
{% endif %}
        - target: /etc/salt/srv
        - require:
            - pkg: my_pkgs