update centos 5 machine in ami_pre (from arthur)
authorPaul Tonelli <paul.tonelli@logilab.fr>
Mon, 13 May 2013 12:14:57 +0200
changeset 133 8b3f7b082539
parent 132 ebe7a4805f96
child 134 1b8d9f500d7a
update centos 5 machine in ami_pre (from arthur)
ami_pre/files.sls
--- a/ami_pre/files.sls	Mon May 13 16:30:56 2013 +0200
+++ b/ami_pre/files.sls	Mon May 13 12:14:57 2013 +0200
@@ -80,6 +80,21 @@
             - mount.mounted: mounted_variation
 {% endif %}
 
+{% if 'ami.type' in grains and grains['ami.type'] == 'centos5' %}
+download_epel:
+    cmd.run:
+        - name:
+             chroot /mnt/variation /usr/bin/curl http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm -o /root/epel-release-5-4.noarch.rpm ;
+             chroot /mnt/variation /bin/rpm -Uvh /root/epel-release-5-4.noarch.rpm ;
+             chroot /mnt/variation /usr/bin/yum -y install mercurial salt-minion
+        - require:
+            - mount.mounted: mounted_variation
+            - mount.mounted: chroot_proc
+            - mount.mounted: chroot_devpts
+            - tmp_state.local_managed: resolv.conf
+        - unless : '[ -a /mnt/variation/usr/bin/hg ]'
+{% endif %}
+
 resolv.conf:
     tmp_state.local_managed:
         - name: /mnt/variation/etc/resolv.conf