turkenh / ansible-interactive-tutorial

Interactive Ansible tutorials with dead simple setup via Docker
Other
1.48k stars 208 forks source link

Lesson 5: Can't complete Apache server installation #23

Closed Jasstkn closed 5 years ago

Jasstkn commented 5 years ago

Hello. During the lesson 5 I faced with issue which showed below:

~/workspace $ ansible-playbook -i hosts -l host1.example.org apache.yml 

PLAY [web] **********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [host1.example.org]

TASK [Installs apache web server] ***********************************************************************************************************************************************************************************
^C [ERROR]: User interrupted execution

~/workspace $ ansible-playbook -i hosts -l host1.example.org apache.yml 

PLAY [web] **********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [host1.example.org]

TASK [Installs apache web server] ***********************************************************************************************************************************************************************************
^CProcess WorkerProcess-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
 [ERROR]: User interrupted execution

How can I solve this?

Jasstkn commented 5 years ago

fatal: [host1.example.org]: FAILED! => {"changed": false, "cmd": "apt-get install python-apt -y -q", "failed": true, "msg": "E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/d/distro-info-data/distro-info-data_0.28ubuntu0.8_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/apt/libapt-inst2.0_1.2.26_amd64.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/lsb/lsb-release_9.20160110ubuntu0.2_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/i/iso-codes/iso-codes_3.65-1_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt-common_1.1.0~beta1ubuntu0.16.04.1_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt_1.1.0~beta1ubuntu0.16.04.1_amd64.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/x/xz-utils/xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?", "rc": 100, "stderr": "E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/d/distro-info-data/distro-info-data_0.28ubuntu0.8_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/apt/libapt-inst2.0_1.2.26_amd64.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/lsb/lsb-release_9.20160110ubuntu0.2_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/i/iso-codes/iso-codes_3.65-1_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt-common_1.1.0~beta1ubuntu0.16.04.1_all.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt_1.1.0~beta1ubuntu0.16.04.1_amd64.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/x/xz-utils/xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb Temporary failure resolving 'archive.ubuntu.com'\n\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n", "stderr_lines": ["E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/d/distro-info-data/distro-info-data_0.28ubuntu0.8_all.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/apt/libapt-inst2.0_1.2.26_amd64.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/lsb/lsb-release_9.20160110ubuntu0.2_all.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/i/iso-codes/iso-codes_3.65-1_all.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt-common_1.1.0~beta1ubuntu0.16.04.1_all.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt_1.1.0~beta1ubuntu0.16.04.1_amd64.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/x/xz-utils/xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb Temporary failure resolving 'archive.ubuntu.com'", "", "E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n distro-info-data iso-codes libapt-inst2.0 lsb-release python-apt-common\n xz-utils\nSuggested packages:\n isoquery lsb python-apt-dbg python-apt-doc\nThe following NEW packages will be installed:\n distro-info-data iso-codes libapt-inst2.0 lsb-release python-apt\n python-apt-common xz-utils\n0 upgraded, 7 newly installed, 0 to remove and 2 not upgraded.\nNeed to get 2573 kB of archives.\nAfter this operation, 18.2 MB of additional disk space will be used.\nErr:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 distro-info-data all 0.28ubuntu0.8\n Temporary failure resolving 'archive.ubuntu.com'\nErr:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.26\n Temporary failure resolving 'archive.ubuntu.com'\nErr:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 distro-info-data all 0.28ubuntu0.8\n Temporary failure resolving 'archive.ubuntu.com'\nErr:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 lsb-release all 9.20160110ubuntu0.2\n Temporary failure resolving 'archive.ubuntu.com'\nErr:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 iso-codes all 3.65-1\n Temporary failure resolving 'archive.ubuntu.com'\nErr:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-apt-common all 1.1.0~beta1ubuntu0.16.04.1\n Temporary failure resolving 'archive.ubuntu.com'\nErr:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-apt amd64 1.1.0~beta1ubuntu0.16.04.1\n Temporary failure resolving 'archive.ubuntu.com'\nErr:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 xz-utils amd64 5.1.1alpha+20120614-2ubuntu2\n Temporary failure resolving 'archive.ubuntu.com'\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " distro-info-data iso-codes libapt-inst2.0 lsb-release python-apt-common", " xz-utils", "Suggested packages:", " isoquery lsb python-apt-dbg python-apt-doc", "The following NEW packages will be installed:", " distro-info-data iso-codes libapt-inst2.0 lsb-release python-apt", " python-apt-common xz-utils", "0 upgraded, 7 newly installed, 0 to remove and 2 not upgraded.", "Need to get 2573 kB of archives.", "After this operation, 18.2 MB of additional disk space will be used.", "Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 distro-info-data all 0.28ubuntu0.8", " Temporary failure resolving 'archive.ubuntu.com'", "Err:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.26", " Temporary failure resolving 'archive.ubuntu.com'", "Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 distro-info-data all 0.28ubuntu0.8", " Temporary failure resolving 'archive.ubuntu.com'", "Err:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 lsb-release all 9.20160110ubuntu0.2", " Temporary failure resolving 'archive.ubuntu.com'", "Err:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 iso-codes all 3.65-1", " Temporary failure resolving 'archive.ubuntu.com'", "Err:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-apt-common all 1.1.0~beta1ubuntu0.16.04.1", " Temporary failure resolving 'archive.ubuntu.com'", "Err:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-apt amd64 1.1.0~beta1ubuntu0.16.04.1", " Temporary failure resolving 'archive.ubuntu.com'", "Err:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 xz-utils amd64 5.1.1alpha+20120614-2ubuntu2", " Temporary failure resolving 'archive.ubuntu.com'"]}

Jasstkn commented 5 years ago

This page helped https://stackoverflow.com/questions/24991136/docker-build-could-not-resolve-archive-ubuntu-com-apt-get-fails-to-install-a