Browse Source

Set ceph_ansible_limit to ansible_limit if ansible_limit defined

The 'openstack overcloud deploy ... --limit' command passes
the Ansible limit to the run of the config-download Ansible
but not to the run of ceph-ansible. To limit ceph-ansible
it's possible to override ceph_ansible_limit (an Ansible
variable) but, as per the bug this patch closes, this is
not possible via the deploy option of the tripleo client.
However, this patch makes it possible by having the variable
ceph_ansible_limit inherit the value of --limit but only
if it is passed. For backwards compatibility the inheritance
does not happen if ceph_ansible_limit is already defined.

Also, pass ceph_ansible_limit to the executions of the
machine unique UUID gather playbook and remote_tmp playbook.

Change-Id: Ibd1ca28592ba3dbbdd2dd129fe8319390f8435f3
Closes-Bug: 1888508
tags/1.7.0
John Fulton 2 months ago
parent
commit
872233241b
3 changed files with 9 additions and 0 deletions
  1. +7
    -0
      tripleo_ansible/roles/tripleo_ceph_common/tasks/main.yml
  2. +1
    -0
      tripleo_ansible/roles/tripleo_ceph_run_ansible/tasks/create_ceph_ansible_remote_tmp.yml
  3. +1
    -0
      tripleo_ansible/roles/tripleo_ceph_uuid/tasks/gather.yml

+ 7
- 0
tripleo_ansible/roles/tripleo_ceph_common/tasks/main.yml View File

@@ -57,3 +57,10 @@
- name: Set common fact
set_fact:
ceph_common_done: true

- name: set ceph_ansible_limit to ansible_limit, only if ansible_limit defined
set_fact:
ceph_ansible_limit: "{{ ansible_limit }}"
when:
- (ceph_ansible_limit is not defined) or (ceph_ansible_limit|length == 0)
- (ansible_limit is defined) and (ansible_limit|length > 0)

+ 1
- 0
tripleo_ansible/roles/tripleo_ceph_run_ansible/tasks/create_ceph_ansible_remote_tmp.yml View File

@@ -54,6 +54,7 @@
- '{{ playbook_dir }}/ceph-ansible/inventory.yml'
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ ansible_python_interpreter }}{% endif %}'
- "{{ playbook_dir }}/ceph-ansible/create_ceph_ansible_remote_tmp.yml"
- '{% if ceph_ansible_limit is defined and ceph_ansible_limit|length > 0 %}--limit {{ ceph_ansible_limit }}{% endif %}'
ceph_ansible_remote_tmp: '/tmp/ceph_ansible_tmp'

- name: run create_ceph_ansible_remote_tmp command


+ 1
- 0
tripleo_ansible/roles/tripleo_ceph_uuid/tasks/gather.yml View File

@@ -29,6 +29,7 @@
- '{{ playbook_dir }}/ceph-ansible/inventory.yml'
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ ansible_python_interpreter }}{% endif %}'
- '{{ playbook_dir }}/ceph-ansible/nodes_uuid_playbook.yml'
- '{% if ceph_ansible_limit is defined and ceph_ansible_limit|length > 0 %}--limit {{ ceph_ansible_limit }}{% endif %}'

- name: run nodes-uuid command
# needs become to be able to read the ssh private key


Loading…
Cancel
Save