update.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Tue, 26 Mar 2013 09:18:44 +0100
changeset 98 032c0fd12892
parent 91 b7d005a8ef48
child 113 e274a7faca62
permissions -rw-r--r--
removed definition of defaults grains from file: this behavior required two highstates to work and this is bad. Instead, the default state is now to have no grains defined by default and act accordingly also added vim package in ami_creator, it is easier to debug

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

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