update to pre state : add files variation.sls and top.sls (and removed from vm_create.variate image)
authorPaul Tonelli <paul.tonelli@logilab.fr>
Wed, 06 Mar 2013 10:07:08 +0100
changeset 28 25e5edde5370
parent 27 1ac7131c81bd
child 29 1af31ae37c03
update to pre state : add files variation.sls and top.sls (and removed from vm_create.variate image)
_modules/vm_create.py
--- a/_modules/vm_create.py	Wed Mar 06 09:58:43 2013 +0100
+++ b/_modules/vm_create.py	Wed Mar 06 10:07:08 2013 +0100
@@ -106,7 +106,7 @@
     files_to_delete = []
     #_create_apt_proxy(chroot_dirname + '/etc/apt/apt.conf.d/01proxy')
     #_create_policy_ubuntu(chroot_dirname)
-    log.info(__salt__['file.remove'](chroot_dirname + "/etc/resolv.conf"))
+    #log.info(__salt__['file.remove'](chroot_dirname + "/etc/resolv.conf"))
     #log.info(salt.utils.copyfile('/etc/resolv.conf', chroot_dirname + '/etc/resolv.conf'))
     _print_if_error(_chroot_exec(chroot_dirname, 'apt-get --force-yes -y update && apt-get upgrade'))
     _print_if_error(_chroot_exec(chroot_dirname, 'apt-get --force-yes -y install salt-minion'))
@@ -119,8 +119,8 @@
     '''
     file_origin = 'salt://' + variation_filename
 
-    salt.utils.copyfile('/etc/salt/srv/' + variation_filename, chroot_dirname + '/etc/salt/srv')
-    __salt__['file.patch'](chroot_dirname + '/etc/salt/minion', '/etc/salt/srv/minion.patch')
+    #salt.utils.copyfile('/etc/salt/srv/' + variation_filename, chroot_dirname + '/etc/salt/srv')
+    #__salt__['file.patch'](chroot_dirname + '/etc/salt/minion', '/etc/salt/srv/minion.patch')
     log.info(_chroot_exec(chroot_dirname, 'salt-call  --local state.highstate'))