Add option for ceph ansible playbook
We need to provide an option to let the user change the default ansible playbook path for ceph-ansible update. Closes-Bug: #1723428 Change-Id: I085eb817a6cf3f4f69ba8d67b55d5d01b56428b5
This commit is contained in:
parent
de93935379
commit
8f232ce8a5
|
@ -63,7 +63,9 @@ class TestOvercloudUpdate(fakes.TestOvercloudUpdate):
|
|||
mock_update.assert_called_once_with(
|
||||
self.app.client_manager,
|
||||
container='mystack',
|
||||
container_registry={'fake_container': 'fake_value'}
|
||||
container_registry={'fake_container': 'fake_value'},
|
||||
ceph_ansible_playbook='/usr/share/ceph-ansible/infrastructure-'
|
||||
'playbooks/rolling_update.yml',
|
||||
)
|
||||
|
||||
@mock.patch('tripleoclient.workflows.package_update.update',
|
||||
|
|
|
@ -60,6 +60,14 @@ class UpdateOvercloud(command.Command):
|
|||
help=_("File which contains the container "
|
||||
"registry data for the update"),
|
||||
)
|
||||
parser.add_argument('--ceph-ansible-playbook',
|
||||
action="store",
|
||||
default="/usr/share/ceph-ansible/infrastructure-"
|
||||
"playbooks/rolling_update.yml",
|
||||
help=_('Path to switch the ceph-ansible playbook '
|
||||
'used for update. This value should be set '
|
||||
'during the init-minor-update step.')
|
||||
)
|
||||
parser.add_argument('--nodes',
|
||||
action="store",
|
||||
default=None,
|
||||
|
@ -111,9 +119,10 @@ class UpdateOvercloud(command.Command):
|
|||
"with: --container-registry-file option.")
|
||||
registry = None
|
||||
# Execute minor update
|
||||
ceph_ansible_playbook = parsed_args.ceph_ansible_playbook
|
||||
package_update.update(clients, container=stack_name,
|
||||
container_registry=registry
|
||||
)
|
||||
container_registry=registry,
|
||||
ceph_ansible_playbook=ceph_ansible_playbook)
|
||||
|
||||
print("Minor update init on stack {0} complete.".format(
|
||||
parsed_args.stack))
|
||||
|
|
Loading…
Reference in New Issue