Fix --limit with commas
Kayobe allows specifying a --limit argument, which is passed through to Ansible. In some cases we wish to add an intersection with a group. This allows us to reuse playbooks for the seed, overcloud etc. For example, the lvm.yml playbook specifies a host list of seed-hypervisor:seed:overcloud. When executed as part of a kayobe overcloud host configure command, Kayobe passes a limit of overcloud. If the user specifies a --limit argument, this gets intersected with the overcloud limit: host1:&overcloud. The problem happens if the user specifies multiple parts to the host pattern in their limit using a comma, e.g. host1,host2. This results in host1,host2:&overcloud. Ansible ignores the colon, and treats this as host1 or host2:&overcloud. The solution is to use a comma to join the patterns if the user has used a comma: host1,host2,&overcloud Change-Id: Ibe42fa372c6fa0c539d2c2b0e238601286dc213d Story: 2008255 Task: 41111
Showing
- kayobe/ansible.py 2 additions, 2 deletionskayobe/ansible.py
- kayobe/kolla_ansible.py 2 additions, 2 deletionskayobe/kolla_ansible.py
- kayobe/tests/unit/test_utils.py 37 additions, 0 deletionskayobe/tests/unit/test_utils.py
- kayobe/utils.py 27 additions, 0 deletionskayobe/utils.py
- releasenotes/notes/fix-limit-with-commas-04a357b0b7ef0371.yaml 6 additions, 0 deletions...senotes/notes/fix-limit-with-commas-04a357b0b7ef0371.yaml
Loading
Please register or sign in to comment