Problem with key_options

Looks like Ansible 1.4.x behaves different form earlier versions with key_options in the module authorized_key. The following task resulted in a proper line in the authorized_keys file but does no longer (tested with 1.4.1 and 1.4.3):

  • name: ‘Subversion | Install SSH user public keys’
    authorized_key: user=sshsvn
    key=“{{lookup(‘file’, inventory_dir + ‘/files/certs/’ + item + ‘.svn.pub’)}}”
    key_options=‘command=“/usr/local/bin/svnserve -t --tunnel-user={{item}}”,no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty’
    with_items: svn_user

What happens now is that they key is written to the authorized_keys file but not the leading options anymore. Is this a bug?

Please retest against devel/HEAD. There have been a few refactors of authorized_key since the 1.4.x releases.

Just tried the latest dev release with the exact same result. So it still doesn’t seem to be working.

Please make sure there’s a github ticket that includes steps to reproduce.

This may require sharing a sanitized version of your authorized key file as well as what keys you are adding, or steps from your playbook.

Github Ticket filed: https://github.com/ansible/ansible/issues/5486