--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/34393455-5021-4342-89b4-de276d68ccd9n%40googlegroups.com.
regex_replace(\"([\\[\\]'])\",'')
---
- name: test
hosts: localhost
become: false
gather_facts: false
vars:
mystr: "['/First Datacenter/vm/Prod-SRM']"
tasks:
- debug: msg="{{ mystr | regex_replace(\"([\\[\\]'])\",'') }}"
% ansible-playbook -i localhost, foo.yml
PLAY [test] ************************************************************************************************************
TASK [debug] ***********************************************************************************************************
ok: [localhost] => {
"msg": "/First Datacenter/vm/Prod-SRM"
}
PLAY RECAP *************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d6b6bcd4-71fd-4193-acb7-fdd740ca7202n%40googlegroups.com.
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20240110181644.79b47b90%40gmail.com.