Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task name not templated in free strategy #16295

Closed
riton opened this issue Jun 15, 2016 · 0 comments · Fixed by #16296
Closed

Task name not templated in free strategy #16295

riton opened this issue Jun 15, 2016 · 0 comments · Fixed by #16296

Comments

@riton
Copy link
Contributor

riton commented Jun 15, 2016

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible 2.1.0.0
  config file = /home/.../.ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION

Using default configuration.

OS / ENVIRONMENT

N/A

SUMMARY

Variable are not interpreted in task names using new free strategy (linear strategy was fixed in #10347 by 7bc789b)

STEPS TO REPRODUCE
  • Using linear strategy:
---
- hosts: all
  gather_facts: false
  become: false
  strategy: linear

  vars: {
    "variable": "VALUE"
  }

  tasks:
    - name: "Dynamic task name: {{ variable }}"
      debug:
        msg: "hello there"

  handlers: []

output is

PLAY [all] *********************************************************************

TASK [Dynamic task name: VALUE] ************************************************
ok: [localhost] => {
    "msg": "hello there"
}

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0   
  • Using the free strategy:
---
- hosts: all
  gather_facts: false
  become: false
  strategy: free

  vars: {
    "variable": "VALUE"
  }

  tasks:
    - name: "Dynamic task name: {{ variable }}"
      debug:
        msg: "hello there"

  handlers: []

output is:

PLAY [all] *********************************************************************

TASK [Dynamic task name: {{ variable }}] ***************************************
ok: [localhost] => {
    "msg": "hello there"
}

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0   
EXPECTED RESULTS

Same behavior in task names evaluation whatever strategy I'm using.

ACTUAL RESULTS

free strategy does not replace variable in tasks names.

This bug was originally reported by @grumpycatt.

riton added a commit to ccin2p3/ansible that referenced this issue Jun 15, 2016
abadger pushed a commit that referenced this issue Aug 26, 2016
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant