Hi,
I wish pass arguments to the lineinfile module, but a space in my line arg is being seen as a key / value separator
module_args=‘dest=%s regexp=%s insertafter=%s line=%s’ % (dest, regexp, insertafter, line)
“msg”: “this module requires key=value arguments ([‘dest=/etc/ssh/sshd_config’, ‘regexp=^PermitRootLogin’, ‘insertafter=^PermitRootLogin’, ‘line=PermitRootLogin’, ‘no’])”
— > ‘line=PermitRootLogin’, ‘no’])"
should be
----> ‘line=PermitRootLogin no’])"
Is there anyway I can format my string in the module_args call, that will stop the whitespace being seen as key value seperation?
Thanks,
Luke