1
votes

When I run my playbook to install some php modules, ansible tower throws an error "Unable to fetch some archives".

I can download the php modules by themselves when running "sudo apt install" on the machine.

"sudo apt-get update" and "sudo apt update" both successfully complete their updates.

I have pinged the ip for the ubuntu package and it pings successfully.

My playbook

- name: moodle setup
  hosts: all
  become: true

  tasks:

  - name: update server
    apt: update_cache=yes

  - name: Add PHP 7 PPA Repo
    become: true
    apt_repository:
     repo: 'ppa:ondrej/php'

  - name: install git, apache and moodle dependencies
    apt:
     name: "{{ packages }}"
    vars:
     packages:
     - git-core
     - apache2
     - mysql-client
     - mysql-server
     - graphviz
     - aspell
     - ghostscript
     - clamav
     - php7.2-curl
     - php7.2-gd
     - php7.2-intl
     - php7.2-mysql
     - php7.2-xml
     - php7.2-xmlrpc
     - php7.2-ldap
     - php7.2-zip
     - php7.2-soap
     - php7.2-mbstring
     - php7.2-pspell
     - php7.2-cli

I expect the ansible tower task to return "changed" with no error. But I get this error:

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/x/xmlrpc-epi/libxmlrpc-epi0_0.54.2-1.1ubuntu0.1_amd64.deb  Connection failed [IP: 142.182.19.17 8083]\n\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n",
    "rc": 100,
    "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"     install 'php7.2-curl' 'php7.2-gd' 'php7.2-intl' 'php7.2-mysql' 'php7.2-xml' 'php7.2-xmlrpc' 'php7.2-ldap' 'php7.2-zip' 'php7.2-soap' 'php7.2-mbstring' 'php7.2-pspell' 'php7.2-cli'' failed: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/x/xmlrpc-epi/libxmlrpc-epi0_0.54.2-1.1ubuntu0.1_amd64.deb  Connection failed [IP: 142.182.19.17 8083]\n\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n


....


"Get:22 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.2-zip amd64 7.2.16-1+ubuntu16.04.1+deb.sury.org+1 [20.3 kB]",
        "Err:23 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libxmlrpc-epi0 amd64 0.54.2-1.1ubuntu0.1",
        "  Connection failed [IP: 142.182.19.17 8083]",
        "Err:23 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libxmlrpc-epi0 amd64 0.54.2-1.1ubuntu0.1",
        "  Connection failed [IP: 142.182.19.17 8083]",
        "Fetched 5529 kB in 8min 0s (11.5 kB/s)"
1

1 Answers

0
votes

I'm experiencing difficulty installing packages today which I believe is an issue with security.ubuntu.com - https://twitter.com/JaxxAI/status/1113064122638249986

It's possible this is related to your issue.