Fix property ordering to go all / globals / groups / hosts. (lowest to highest priority)

Jira-Issue: OPENSTACK-295
This commit is contained in:
Borne Mace 2016-03-07 17:37:30 -08:00
parent b8c543424e
commit f9db085a73
3 changed files with 1 additions and 19 deletions

View File

@ -168,11 +168,6 @@ then
rm -f %{_datadir}/kolla/kollacli/tools/json_generator.py
fi
# create host_vars dir and make sure the permissions are ok on groups_vars and host_vars
mkdir -m 0775 -p %{_datadir}/kolla/ansible/host_vars
chown %{kolla_user}:%{kolla_group} %{_datadir}/kolla/ansible/host_vars
chmod 0775 %{_datadir}/kolla/ansible/group_vars
%postun
case "$*" in
0)
@ -195,9 +190,6 @@ esac
- disallow pexpect 3.3 (sudo issue)
- remove obsolete oslo-utils reference
* Tue Jan 26 2016 - Borne Mace <borne.mace@oracle.com>
- added some post operations to support group / host variables
* Mon Oct 26 2015 - Steve Noyes <steve.noyes@oracle.com>
- Remove obsolete json_generator

View File

@ -30,7 +30,6 @@ from kollacli.common.inventory import Inventory
class AnsiblePlaybook(object):
playbook_path = ''
extra_vars = ''
include_globals = True
include_passwords = True
flush_cache = True
print_output = True
@ -43,7 +42,6 @@ class AnsiblePlaybook(object):
log = logging.getLogger(__name__)
def run(self):
globals_string = None
password_string = None
inventory_path = None
cmd = ''
@ -79,10 +77,6 @@ class AnsiblePlaybook(object):
inventory_string = '-i ' + inventory_path
cmd = (command_string + ' ' + inventory_string)
if self.include_globals:
globals_string = self._get_globals_path()
cmd = (cmd + ' ' + globals_string)
if self.include_passwords:
password_string = self._get_password_path()
cmd = (cmd + ' ' + password_string)
@ -149,10 +143,6 @@ class AnsiblePlaybook(object):
if inventory_path:
os.remove(inventory_path)
def _get_globals_path(self):
kolla_etc = get_kolla_etc()
return (' -e @' + os.path.join(kolla_etc, 'globals.yml '))
def _get_password_path(self):
kolla_etc = get_kolla_etc()
return (' -e @' + os.path.join(kolla_etc, 'passwords.yml '))

View File

@ -576,7 +576,7 @@ class Inventory(object):
subservice.remove_groupname(groupname)
group_vars = os.path.join(get_group_vars_dir(), groupname)
if os.path.exists(group_vars):
if os.path.exists(group_vars) and groupname != '__RESERVED__':
os.remove(group_vars)
if groupname in self._groups: