ami_creator_pre.sls
author Paul Tonelli <paul.tonelli@logilab.fr>
Tue, 05 Mar 2013 18:57:42 +0100
changeset 25 18936b962551
parent 18 4239da26bf7c
child 31 e723591ef91a
permissions -rw-r--r--
corrected errors in sizes, still need cleanup with same units

### Salt state to check before modifying chroot ###

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


### 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