deploy/upgrade: include tripleo_role_name

"role_name" is internal to Ansible, we should not use it.
As a transition, include "tripleo_role_name" when calling Ansible and
once we're ready we'll remove the role_name var in a future patch.

Change-Id: Ib477b35ed1c062f2ea6c7d9d2d41ac58f3b275e2
Related-Bug: #1771171
This commit is contained in:
Emilien Macchi 2018-05-14 11:07:22 -07:00
parent cea97306d8
commit fe6511cfeb
3 changed files with 4 additions and 0 deletions

View File

@ -339,6 +339,7 @@ class TestDeployUndercloud(TestPluginV1):
mock_run.assert_called_once_with(self.cmd.log, [
'ansible-playbook', '-i', '/tmp/inventory.yaml',
'deploy_steps_playbook.yaml', '-e', 'role_name=Undercloud',
'-e', 'tripleo_role_name=Undercloud',
'-e', 'deploy_server_id=undercloud', '-e',
'bootstrap_server_id=undercloud'])

View File

@ -40,6 +40,7 @@ class TestUpgrade(utils.TestCommand):
mock_run.assert_called_once_with(self.cmd.log, [
'ansible-playbook', '-i', '/tmp/inventory.yaml',
'upgrade_steps_playbook.yaml', '-e', 'role_name=Undercloud',
'-e', 'tripleo_role_name=Undercloud',
'-e', 'deploy_server_id=undercloud', '-e',
'bootstrap_server_id=undercloud', '--skip-tags', 'validation'])

View File

@ -523,6 +523,7 @@ class Deploy(command.Command):
playbook_inventory = os.path.join(ansible_dir, 'inventory.yaml')
cmd = ['ansible-playbook', '-i', playbook_inventory,
'deploy_steps_playbook.yaml', '-e', 'role_name=Undercloud',
'-e', 'tripleo_role_name=Undercloud',
'-e', 'deploy_server_id=undercloud', '-e',
'bootstrap_server_id=undercloud']
self.log.debug('Running Ansible Deploy tasks: %s' % (' '.join(cmd)))
@ -534,6 +535,7 @@ class Deploy(command.Command):
playbook_inventory = os.path.join(ansible_dir, 'inventory.yaml')
cmd = ['ansible-playbook', '-i', playbook_inventory,
'upgrade_steps_playbook.yaml', '-e', 'role_name=Undercloud',
'-e', 'tripleo_role_name=Undercloud',
'-e', 'deploy_server_id=undercloud', '-e',
'bootstrap_server_id=undercloud', '--skip-tags', 'validation']
self.log.debug('Running Ansible Upgrade tasks: %s' % (' '.join(cmd)))