config-download: --start-at-task doesn't work with tasks with variables in the names

Bug #1749459 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Invalid
Medium
Unassigned

Bug Description

We have several tasks that use {{ step }} in the name where {{ step }} is a sequence, usually 1 to 5.

When you use --start-at-task with one of these task names, it doesn't work and ansible just skips all tasks.

Revision history for this message
James Slagle (james-slagle) wrote :
Download full text (6.4 KiB)

(undercloud) [stack@undercloud tripleo-Jl85Km-config]$ ~/ansible-playbook-command.sh --start-at-task "Overcloud common deploy step tasks 1"
+ ansible-playbook -i /home/stack/tripleo-ansible-inventory.yaml --become -u heat-admin deploy_steps_playbook.yaml --start-at-task 'Overcloud common deploy step tasks 1'
 [WARNING]: Skipping unexpected key (hostvars) in group (_meta), only "vars", "children" and "hosts" are valid

[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [Gather facts undercloud] ***************************************************************************************************************************************************************************************************

PLAY [Gather facts overcloud] ****************************************************************************************************************************************************************************************************

PLAY [Load global variables] *****************************************************************************************************************************************************************************************************

PLAY [Bootstrap TripleO servers] *************************************************************************************************************************************************************************************************

PLAY [Server deployments] ********************************************************************************************************************************************************************************************************

PLAY [Host prep steps] ***********************************************************************************************************************************************************************************************************

PLAY [External deployment step 1] ************************************************************************************************************************************************************************************************

PLAY [Overcloud deploy step tasks for 1] *****************************************************************************************************************************************************************************************

PLAY [Overcloud common deploy step tasks 1] **************************************************************************************************************************************************************************************

PLAY [External deployment step 2] *****************************************************************************...

Read more...

tags: added: config-download
Revision history for this message
James Slagle (james-slagle) wrote :
Download full text (5.5 KiB)

If you use --list-tasks, then ansible will resolve all the task names with the proper variable values. So --start-at-task ought to work as well.

(undercloud) [stack@undercloud tripleo-Jl85Km-config]$ ~/ansible-playbook-command.sh --list-tasks
+ ansible-playbook -i /home/stack/tripleo-ansible-inventory.yaml --become -u heat-admin deploy_steps_playbook.yaml --list-tasks
 [WARNING]: Skipping unexpected key (hostvars) in group (_meta), only "vars", "children" and "hosts" are valid

[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

playbook: deploy_steps_playbook.yaml

  play #1 (undercloud): Gather facts undercloud TAGS: [facts]
    tasks:

  play #2 (overcloud): Gather facts overcloud TAGS: [facts]
    tasks:

  play #3 (all): Load global variables TAGS: [always]
    tasks:
      include_vars TAGS: [always]

  play #4 (overcloud): Bootstrap TripleO servers TAGS: [bootstrap]
    tasks:
      tripleo-bootstrap : Deploy required packages to bootstrap TripleO TAGS: [bootstrap]
      tripleo-bootstrap : Create /var/lib/heat-config/tripleo-config-download directory for deployment data TAGS: [bootstrap]

  play #5 (overcloud): Server deployments TAGS: [pre_deploy_steps,overcloud]
    tasks:
      include TAGS: [overcloud, pre_deploy_steps]

  play #6 (overcloud): Host prep steps TAGS: [host_prep_steps,overcloud]
    tasks:
      create persistent logs directory TAGS: [host_prep_steps, overcloud]
      cinder logs readme TAGS: [host_prep_steps, overcloud]
      create persistent directories TAGS: [host_prep_steps, overcloud]
      create persistent directories TAGS: [host_prep_steps, overcloud]
      ensure ceph configurations exist TAGS: [host_prep_steps, overcloud]
      cinder_enable_iscsi_backend fact TAGS: [host_prep_steps, overcloud]
      cinder create LVM volume group dd TAGS: [host_prep_steps, overcloud]
      cinder create LVM volume group TAGS: [host_prep_steps, overcloud]
      create persistent logs directory TAGS: [host_prep_steps, overcloud]
      keystone logs readme TAGS: [host_prep_steps, overcloud]
      create persistent logs directory TAGS: [host_prep_steps, overcloud]
      glance logs readme TAGS: [host_prep_steps, overcloud]
      Mount NFS on host TAGS: [host_prep_steps, overcloud]
      create persistent logs directory TAGS: [host_prep_steps, overcloud]
      heat logs readme TAGS: [host_prep_steps, overcloud]
      create persistent logs directory TAGS: [host_prep_steps, overcloud]
      create persistent logs directory TAGS: [host_prep_steps, overcloud]
      create /var/lib/mysql TAGS: [host_prep_st...

Read more...

Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → rocky-1
Revision history for this message
James Slagle (james-slagle) wrote :

I'm going to close this as invalid because I realized that I'm actually trying to use the play name instead of the task name. In the --list-tasks output, the tasks name are actually not expanded with the variable values, so I guess Ansible has no way of figuring out the task names in this case.

Changed in tripleo:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.