update.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Fri, 22 Mar 2013 11:38:47 +0100
changeset 92 46707aed3c76
parent 91 b7d005a8ef48
child 98 032c0fd12892
permissions -rw-r--r--
removed unused files: the two shortcuts were used to access local debian / ubuntu images

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

{% if 'ami.type' not in grains %}
ami.type:
    grains.present:
        - value: debian
{% endif %}

{% if 'ami.hg_address_server' not in grains %}
ami.hg_address_server:
    grains.present:
        - value: http://hg.logilab.org/users/ptonelli/ami_creator/server
{% endif %}

{% if 'ami.hg_address_variation' not in grains %}
ami.hg_address_variation:
    grains.present:
        - value: http://hg.logilab.org/users/ptonelli/ami_creator/variation
{% endif %}

{% 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 %}