1

installing ansible on ubuntu os,

on typing the command :

sudo apt-add-repository -y ppa:ansible/ansible

it is showing

Please check that the PPA name or format is correct.

how to fix this issue?

  • Check the PPA name is correct? – xangua Feb 22 '16 at 5:54
  • There is no issue in the ppa name. It works fine for me. Try adding it to sources.list manually. Is software-properties-common installed? – Babbzzz Feb 22 '16 at 6:16
  • ubuntu@ubuntu:~$ sudo apt-get install software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done software-properties-common is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 295 not upgraded. ubuntu@ubuntu:~$ sudo apt-add-repository ppa:ansible/ansible Cannot add PPA: 'ppa:ansible/ansible'. Please check that the PPA name or format is correct. – praveen Feb 22 '16 at 8:02
  • it is giving the same msg again and again ...... – praveen Feb 22 '16 at 8:04
  • Which version of Ubuntu? – muru Feb 22 '16 at 8:33
0

To install Ansible on Ubuntu 14.04 from the terminal without the having to run the sudo add-apt-repository -y ppa:ansible/ansible command, follow these steps.

  1. Open the terminal and type:

    sudo apt-get update  
    sudo apt-get install software-properties-common  
    sudo nano /etc/apt/sources.list   
    
  2. The last command will open your sources.list file, which specifies the software sources in Ubuntu, for editing in nano text editor. Add the following lines to the end of the sources.list file:

    deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main 
    deb-src http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main 
    

    Press the keyboard combination Ctrl+O and after that press Enter to save the changes in sources.list. Press the keyboard combination Ctrl+X to exit nano.

  3. Pull down Ansible PPA's signing key and add it to your system.

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7BB9C367
    
  4. Run these commands to update the list of available software once again and install Ansible.

    sudo apt-get update  
    sudo apt-get install ansible  
    
  • I'm following the same order , at the 3rd cmd (ppa:ansible/ansible) , I'm getting the same msg this time also.. – praveen Feb 22 '16 at 8:05
  • except this :sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7BB9C367 I followed the remaining steps and finally successfully installed thanks ..... – praveen Feb 25 '16 at 3:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.