ansible 1.6.10
- name: Configure Roundcube to use macsecurity plugin
lineinfile: dest=/var/www/html/roundcube/config/config.inc.php
regexp=‘^$config['plugins']\ =\ .*’
line=“$config[‘plugins’] = array(‘macsecurity’);”
Results in:
TASK: [Configure Roundcube to use macsecurity plugin] *************************
ESTABLISH CONNECTION FOR USER: joliver
REMOTE_MODULE lineinfile dest=/var/www/html/roundcube/config/config.inc.php regexp=‘^$config['plugins']\ =\ .*’ line=“$config[‘plugins’] = array(‘macsecurity’);”
EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/joliver/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘jedis-test’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320 && echo $HOME/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320’”]
PUT /var/folders/67/dk8m_22d413fhslkhh4dwkzr0000gn/T/tmpN9xXtS TO /home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/lineinfile
EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/joliver/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘jedis-test’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=bmqjrumylttuzzfdgnjmbdmbgcdrokao] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-bmqjrumylttuzzfdgnjmbdmbgcdrokao; LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 /usr/bin/python /home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/lineinfile; rm -rf /home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/ >/dev/null 2>&1'”'"''']
fatal: [jedis-test] => failed to parse: SUDO-SUCCESS-bmqjrumylttuzzfdgnjmbdmbgcdrokao
Traceback (most recent call last):
File “/home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/lineinfile”, line 1589, in
main()
File “/home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/lineinfile”, line 330, in main
supports_check_mode=True
File “/home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/lineinfile”, line 566, in init
(self.params, self.args) = self._load_params()
File “/home/joliver/.ansible/tmp/ansible-tmp-1409175269.9-123275515097320/lineinfile”, line 1135, in _load_params
items = shlex.split(args)
File “/usr/lib64/python2.6/shlex.py”, line 279, in split
return list(lex)
File “/usr/lib64/python2.6/shlex.py”, line 269, in next
token = self.get_token()
File “/usr/lib64/python2.6/shlex.py”, line 96, in get_token
raw = self.read_token()
File “/usr/lib64/python2.6/shlex.py”, line 172, in read_token
raise ValueError, “No closing quotation”
ValueError: No closing quotation
I submitted an issue for the unfriendly output. I really don’t know if the “No closing quotation” is an actual bug in ansible, an issue with parsing, or something I did wrong that I just can’t pick out