Vagrant+Ansible Not working main.yum

53 views
Skip to first unread message

Artur001

unread,
Oct 30, 2017, 9:51:31 AM10/30/17
to Ansible Project
Not working main.yum

- name: add php ppa
  apt_repository
: repo='ppa:ondrej/php' state=present

- name: update apt cache
  apt
: update_cache=yes

vagrant up

TASK [php : add php ppa] *******************************************************
fatal
: [joomla]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_cdHTo1/ansible_module_apt_repository.py\", line 556, in <module>\r\n    main()\r\n  File \"/tmp/ansible_cdHTo1/ansible_module_apt_repository.py\", line 544, in main\r\n    cache.update()\r\n  File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 443, in update\r\n    raise FetchFailedException(e)\r\napt.cache.FetchFailedException: W:Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found\r\n, E:Some index files failed to download. They have been ignored, or old ones used instead.\r\n", "msg": "MODULE FAILURE", "rc": 0}
    to
retry, use: --limit @/home/artur/php-joomla-vm/provisioning/playbook.retry

PLAY RECAP
*********************************************************************
joomla                    
: ok=4    changed=2    unreachable=0    failed=1  

Ansible failed to complete successfully. Any error output should be
visible above
. Please fix these errors and try again.


my project



Kai Stian Olstad

unread,
Oct 30, 2017, 12:24:02 PM10/30/17
to ansible...@googlegroups.com
On 30. okt. 2017 14:51, Artur001 wrote:
> Not working main.yum
>
> - name: add php ppa
> apt_repository: repo='ppa:ondrej/php' state=present
>
> - name: update apt cache
> apt: update_cache=yes
>
> vagrant up
>
> TASK [php : add php ppa]
> *******************************************************
> fatal: [joomla]: FAILED! => {"changed": false, "failed": true,
> "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n",
> "module_stdout": "Traceback (most recent call last):\r\n File
> \"/tmp/ansible_cdHTo1/ansible_module_apt_repository.py\", line 556, in
> <module>\r\n main()\r\n File
> \"/tmp/ansible_cdHTo1/ansible_module_apt_repository.py\", line 544, in
> main\r\n cache.update()\r\n File
> \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 443, in update\r\n
> raise FetchFailedException(e)\r\napt.cache.FetchFailedException:
> W:Failed to fetch
> http://ppa.launchpad.net/ondrej/php/ubuntu/dists/jessie/main/binary-amd64/Packages
> 404 Not Found\r\n, E:Some index files failed to download. They have been

It says "Not Found", ppa.launchpad.net is for Ubuntu, not Debian Jessie.


--
Kai Stian Olstad

Artur001

unread,
Oct 30, 2017, 1:06:10 PM10/30/17
to Ansible Project
I installed it, but it does not help.

http://docs.ansible.com/ansible/latest/intro_installation.html

$ sudo apt-get update
$ sudo apt
-get install software-properties-common
$ sudo apt
-add-repository ppa:ansible/ansible
$ sudo apt
-get update
$ sudo apt
-get install ansible




Kai Stian Olstad

unread,
Oct 30, 2017, 1:17:31 PM10/30/17
to ansible...@googlegroups.com
My comment was not about Ansible.



I commented on this:

>> raise FetchFailedException(e)\r\napt.cache.FetchFailedException:
>> W:Failed to fetch
>> http://ppa.launchpad.net/ondrej/php/ubuntu/dists/jessie/main/binary-amd64/Packages
>> 404 Not Found\r\n, E:Some index files failed to download. They have been
>
> It says "Not Found", ppa.launchpad.net is for Ubuntu, not Debian Jessie.

It says
That mean that the repository ppa:ondrej/php doesn't exist.
If you look closer to that link you see the following.
"/jessie/"

Jessie is Debian Linux, but ppa on ppa.launchpad.net is for Ubuntu Linux, Ubuntu is not the same as Debian, so you can't use Ubuntu Linux repository on a Debian Linux, at lest not the ppa:ondrej/php.


--
Kai Stian Olstad

Artur001

unread,
Oct 30, 2017, 1:33:49 PM10/30/17
to Ansible Project
I do not understand how to fix the problem ...


Kai Stian Olstad

unread,
Oct 30, 2017, 1:44:24 PM10/30/17
to ansible...@googlegroups.com
On 30. okt. 2017 18:33, Artur001 wrote:
> I do not understand how to fix the problem ...

You got 3 choices:

1. Use the php that comes with Debian
2. If that's not an alternative, you need to find a repository for Debian that have the php you need.
3. Or change your Vagrant VM to run Ubuntu instead of Debian


--
Kai Stian Olstad

Artur001

unread,
Oct 30, 2017, 2:30:51 PM10/30/17
to Ansible Project
You are right! It work with Ubuntu.
But, I need item two. I want to install virtual pc with Ubuntu and Debian.

Where should I register the repository for debian (My Ubuntu 16.04)?


понедельник, 30 октября 2017 г., 20:44:24 UTC+3 пользователь Kai Stian Olstad написал:
Reply all
Reply to author
Forward
0 new messages