ami_creator.pre.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Tue, 05 Mar 2013 18:57:42 +0100
changeset 25 18936b962551
parent 15 9256bbfc10d6
permissions -rw-r--r--
corrected errors in sizes, still need cleanup with same units

# /srv/salt/init_machine.sls
#

base_pkgs:
    pkg.installed:
        - pkgs:
            - salt-minion
            - python
            - mercurial
            - tar
            - glance
#          - eca2ools

hg_ami_creation:
    hg.latest:
        - name: http://hg.logilab.fr/users/ptonelli/srv_salt
        - target: /etc/salt/srv


#hg_img_available:

### Mounts ###
mounted_variation:
    mount.mounted:
        - device: /mnt/variation.img
        - name: /mnt/variation
        - fstype: ext4
        - mkmnt: False
        - opts:
            - loop

chroot_proc:
    mount.mounted:
        - device: none
        - name: /mnt/variation/proc
        - fstype: proc
        - mkmnt: False
        - require:
            - mount.mounted: mounted_variation

chroot_devpts:
    mount.mounted:
        - device: none
        - name: /mnt/variation/dev/pts
        - fstype: devpts
        - mkmnt: False
        - require:
            - mount.mounted: mounted_variation


### Temporary Files ###
01proxy:
    file.managed:
        - name: /mnt/variation/etc/apt/apt.conf.d/01proxy
        - source: salt://others/01proxy
        - mode: 644
        - require:
            - mount.mounted: mounted_variation


policy-rc.d:
    file.managed:
        - name: /mnt/variation/usr/sbin/policy-rc.d
        - source: salt://others/policy-rc.d
        - mode: 755
        - require:
            - mount.mounted: mounted_variation

resolv.conf:
    tmp_func.local_managed:
        - name: /mnt/variation/etc/resolv.conf
        - source: /etc/resolv.conf
        - require:
            - mount.mounted: mounted_variation