linux - How can I add a PPA repository using Ansible? -


i'm trying add new repository server can install java ansible. unfortunately whenever try run playbook fails because of gpg error. can explain going wrong here , need in order fix this?

i'm using ansible 1.7.2 , connecting localhost.

i have simple playbook looks this:

- hosts: home   tasks:    - name: add repositories      apt_repository: repo='ppa:webupd8team/java' state=present 

when try execute it, following error:

sal@bobnit:~/workspace$ ansible-playbook --ask-sudo-pass basic.yml  sudo password:   play [home] *******************************************************************   gathering facts ***************************************************************  ok: [localhost]  task: [add repositories] ******************************************************  failed: [localhost] => {"cmd": "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 7b2c3b0889bf5709a105d03ac2518248eea14886", "failed": true, "rc": 2} stderr: gpg: requesting key eea14886 hkp server keyserver.ubuntu.com gpg: no writable keyring found: eof gpg: error reading `[stream]': general error gpg: total number processed: 0  stdout: executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.hkdosznvqp --no-auto-check-trustdb --trust-model --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/steam.gpg --keyring /etc/apt/trusted.gpg.d/ubuntu-x-swat_ubuntu_x-updates.gpg --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 7b2c3b0889bf5709a105d03ac2518248eea14886  msg: gpg: requesting key eea14886 hkp server keyserver.ubuntu.com gpg: no writable keyring found: eof gpg: error reading `[stream]': general error gpg: total number processed: 0  fatal: hosts have failed -- aborting  play recap ********************************************************************             retry, use: --limit @/home/sal/basic.retry  localhost                  : ok=1    changed=0    unreachable=0    failed=1    

oh, seems have been entirely caused me forgetting -s option!

without wasn't using sudo.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -