Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用ansible塔安装PHP7.2?_Ansible_Ansible Tower - Fatal编程技术网

如何使用ansible塔安装PHP7.2?

如何使用ansible塔安装PHP7.2?,ansible,ansible-tower,Ansible,Ansible Tower,当我运行playbook安装一些php模块时,ansible tower抛出一个错误“无法获取一些归档” 在机器上运行“sudoapt安装”时,我可以自己下载php模块 “sudo apt get update”和“sudo apt update”都成功完成了更新 我已经ping了ubuntu包的ip,它ping成功了 我的剧本 - name: moodle setup hosts: all become: true tasks: - name: update server

当我运行playbook安装一些php模块时,ansible tower抛出一个错误“无法获取一些归档”

在机器上运行“sudoapt安装”时,我可以自己下载php模块

“sudo apt get update”和“sudo apt update”都成功完成了更新

我已经ping了ubuntu包的ip,它ping成功了

我的剧本

- 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
我希望ansible tower任务返回“changed”而没有错误。 但我得到了这个错误:

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)"

我今天在安装软件包时遇到了困难,我认为这是security.ubuntu.com的一个问题-


这可能与您的问题有关。

我今天在安装软件包时遇到困难,我认为这是security.ubuntu.com的问题-


这可能与您的问题有关。

我昨天也遇到了同样的问题,但问题在于ansible试图安装软件包。我可以手动安装软件包,没有问题。我昨天也遇到同样的问题,但这个问题是ansible试图安装软件包。我可以手动安装软件包,没有问题。