support copy roles dir
copy role dir to virtual env Change-Id: I5e89cab526dfc7c7b3527e5934254c69a6635a82 Signed-off-by: baigk <baiguoku@huawei.com>
This commit is contained in:
parent
b1a732f641
commit
3cda8600a5
@ -267,16 +267,12 @@ class AnsibleInstaller(PKInstaller):
|
||||
dirs = self.runner_dirs
|
||||
files = self.runner_files
|
||||
for dir in dirs:
|
||||
items = dir.split(':')
|
||||
src, dst = items[0], items[-1]
|
||||
if not os.path.exists(os.path.join(self.ansible_dir, src)):
|
||||
if not os.path.exists(os.path.join(self.ansible_dir, dir)):
|
||||
continue
|
||||
|
||||
shutil.copytree(
|
||||
os.path.join(self.ansible_dir, src),
|
||||
os.path.join(
|
||||
ansible_run_destination,
|
||||
dst
|
||||
os.system(
|
||||
"cp -rf %s %s" % (
|
||||
os.path.join(self.ansible_dir, dir),
|
||||
ansible_run_destination
|
||||
)
|
||||
)
|
||||
for file in files:
|
||||
|
@ -8,6 +8,6 @@ SETTINGS = {
|
||||
'inventory_file': 'inventory.yml',
|
||||
'group_variable': 'all',
|
||||
'etc_hosts_path': 'roles/common/templates/hosts',
|
||||
'runner_dirs': ['roles','openstack_juno/templates:templates']
|
||||
'runner_dirs': ['roles','openstack_juno/templates','openstack_juno/roles']
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,6 @@ SETTINGS = {
|
||||
'inventory_file': 'inventory.yml',
|
||||
'group_variable': 'all',
|
||||
'etc_hosts_path': 'roles/common/templates/hosts',
|
||||
'runner_dirs': ['roles','openstack_kilo/templates:templates']
|
||||
'runner_dirs': ['roles','openstack_kilo/templates','openstack_kilo/roles']
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,6 @@ SETTINGS = {
|
||||
'inventory_file': 'inventory.yml',
|
||||
'group_variable': 'all',
|
||||
'etc_hosts_path': 'roles/common/templates/hosts',
|
||||
'runner_dirs': ['roles','openstack_liberty/templates:templates']
|
||||
'runner_dirs': ['roles','openstack_liberty/templates','openstack_liberty/roles']
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user