I need to replace a variable that has the extra argument passed to it via 
CLI.

./deploy.yml -e 'jira_ticket=REL-78'

I can't get it to strip out 'deploylist/REL-78' because I'm passing in 
'jira_ticket' If i hardcode the varible it works perfectly.

- name: Set fact
  set_fact: deploy_list"{{ item | replace('deploylist/{{ jira_ticket }}/', 
'')"
  with_items: ' {{ modules_to_deploy.value }}'
  register: deploy_list_result



ok: [127.0.0.1] => (item=deploylist/REL-78/api)
ok: [127.0.0.1] => (item=deploylist/REL-78/ariaapi)
ok: [127.0.0.1] => (item=deploylist/REL-78/ariaquery)
ok: [127.0.0.1] => (item=deploylist/REL-78/ariaserver)
ok: [127.0.0.1] => (item=deploylist/REL-78/dashboardidp)
ok: [127.0.0.1] => (item=deploylist/REL-78/oracle)
ok: [127.0.0.1] => (item=deploylist/REL-78/uisp)
ok: [127.0.0.1] => (item=deploylist/REL-78/ui)



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bd97e172-7e7a-4735-9f88-7313276073fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to