skipping ":" in ansible with strings already having ""(quotation) -
i trying use lineinfile: replace whole line when executing complains : (colon) tried using " (quotation) think ansible not able differentiate between existing "" , added "" tried \ escape colon still not working
lineinfile: dest='/etc/sysconfig/network-scripts/ifcfg-team0' state=present regexp=^team_config=.* line=team_config='{"runner": {"name": "{{item.bondmode}}"}, "link_watch": {"name": "ethtool"}}' with_items: - "{{ teaming }}"
this issue space after colon:
line="team_config={'runner':{'name':'{{item.bondmode}}'}, 'link_watch':{'name':'ethtool'}}"
will work (it not still valid json), see here
Comments
Post a Comment