{"action":"opened","issue":{"url":"https://api.github.com/repos/GROG/ansible-role-authorized-key/issues/4","repository_url":"https://api.github.com/repos/GROG/ansible-role-authorized-key","labels_url":"https://api.github.com/repos/GROG/ansible-role-authorized-key/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/GROG/ansible-role-authorized-key/issues/4/comments","events_url":"https://api.github.com/repos/GROG/ansible-role-authorized-key/issues/4/events","html_url":"https://github.com/GROG/ansible-role-authorized-key/issues/4","id":193749923,"number":4,"title":"exclusive option with several key not working","user":{"login":"roumano","id":6402894,"avatar_url":"https://avatars.githubusercontent.com/u/6402894?v=3","gravatar_id":"","url":"https://api.github.com/users/roumano","html_url":"https://github.com/roumano","followers_url":"https://api.github.com/users/roumano/followers","following_url":"https://api.github.com/users/roumano/following{/other_user}","gists_url":"https://api.github.com/users/roumano/gists{/gist_id}","starred_url":"https://api.github.com/users/roumano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roumano/subscriptions","organizations_url":"https://api.github.com/users/roumano/orgs","repos_url":"https://api.github.com/users/roumano/repos","events_url":"https://api.github.com/users/roumano/events{/privacy}","received_events_url":"https://api.github.com/users/roumano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-06T11:35:53Z","updated_at":"2016-12-06T11:35:53Z","closed_at":null,"body":"exclusive option is not working as exepected for me \r\nmaybe linked to this :   \r\nhttp://docs.ansible.com/ansible/authorized_key_module.html\r\nsay :   \r\nThis option is not loop aware, so if you use with_ , it will be exclusive per iteration of the loop, if you want multiple keys in the file you need to pass them all to key in a single batch as mentioned above.\r\n\r\ni want to manage root ssh key (only used for emergency issue) for several user but i want/need to be sure, no other person can connect as root with ssh keys\r\nI have create :  \r\nauthorized_key_list:\r\n  - name: root\r\n      - key: \"ssh-rsa ssh_user2_key1\"\r\n      - key: \"ssh-rsa ssh_user2_key1\"\r\nauthorized_key_list_group:\r\n  - name: root\r\n    authorized_keys:\r\n      - key: \"ssh-rsa ssh_user3_key1\"\r\n\r\nso if \r\n- i set \"authorized_key_exclusive: no\" and exclusive: no,\r\nanyone can edit manually the root ssh key and this ansible role will not change it or even detect it\r\n- i add authorized_key_exclusive: yes\r\ni get only the ssh-rsa ssh_user3_key1 in my root account\r\n- if i add exclusive: yes on first ssh key ( aka \"ssh-rsa ssh_user2_key1\")\r\nit's always recreate the root ssh keys and the result will be always \"changed=1\"\r\n"}}
{"actor":{"display_login":"roumano"}}