Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible doesn't know about python3-apt #5

Open
fgregg opened this issue Nov 23, 2015 · 2 comments
Open

Ansible doesn't know about python3-apt #5

fgregg opened this issue Nov 23, 2015 · 2 comments

Comments

@fgregg
Copy link

fgregg commented Nov 23, 2015

On a 15.04 ubuntu base image, can't run ansible common tasks because ansible doesn't know about python3-apt

TASK: [common-roles/common | install base packages] ***************************
​failed: [opencivicdata-db] => (item=build-essential,git,mercurial,python-pycurl,python-boto) => {"failed": true, "item": "build-essential,git,mercurial,python-pycurl,python-boto"}
​msg: Could not import python modules: apt, apt_pkg. Please install python-apt package.
​
FATAL: all hosts have already failed -- aborting
paultag 10:05 AM ok, so it's missing a file
erm package
​python-apt must have been replaced with python3-apt
​which hilariously is likely my fault
​so perhaps install python-apt in the common roles somewhere before that line

tagging @paultag

@jamesturk
Copy link
Member

I think this is an ansible version issue..
ansible/ansible#4079

Oddly enough I'm not getting it, using ansible 1.9.4

On Mon, Nov 23, 2015 at 9:14 PM, Forest Gregg [email protected]
wrote:

On a 15.04 ubuntu base image, can't run ansible common tasks because
ansible doesn't know about python3-apt

TASK: [common-roles/common | install base packages] ***************************
​failed: [opencivicdata-db] => (item=build-essential,git,mercurial,python-pycurl,python-boto) => {"failed": true, "item": "build-essential,git,mercurial,python-pycurl,python-boto"}
​msg: Could not import python modules: apt, apt_pkg. Please install python-apt package.

FATAL: all hosts have already failed -- aborting
paultag 10:05 AM ok, so it's missing a file
erm package
​python-apt must have been replaced with python3-apt
​which hilariously is likely my fault
​so perhaps install python-apt in the common roles somewhere before that line

tagging @paultag https://github.com/paultag


Reply to this email directly or view it on GitHub
#5.

@franz-josef-kaiser
Copy link

Same here for Ansible 1.9.4 on OS X.

TASK: [Remove obsolete APT repos] ********************************************* 
failed: [192.168.0.20] => {"failed": true}
msg: Failed to auto-install python-apt.

When I manually add the package via a task:

---
- hosts: home
  tasks:
   - name: Install Python APT
     apt: pkg=python-apt state=installed

I get a similar error, telling me that python-apt-common is not going to be installed

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 language-pack-gnome-zh-hans : Depends: language-pack-gnome-zh-hans-base (>= 1:12.04+20140106) but 1:12.04+20130128 is to be installed
 language-pack-gnome-zh-hant : Depends: language-pack-gnome-zh-hant-base (>= 1:12.04+20140106) but 1:12.04+20130128 is to be installed
 libavcodec53 : Depends: libavutil51 (< 4:0.8.3-99) but 4:0.8.17-0ubuntu0.12.04.1 is to be installed or
                         libavutil-extra-51 (< 4:0.8.3.99) but it is not going to be installed
 libavformat53 : Depends: libavcodec53 (>= 4:0.8.17-0ubuntu0.12.04.1) but 4:0.8.3-0ubuntu0.12.04.1 is to be installed or
                          libavcodec-extra-53 (>= 4:0.8.17) but it is not going to be installed
 python-apt : Depends: python-apt-common but it is not going to be installed

msg: E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

FATAL: all hosts have already failed -- aborting

I tried adding with_items and add the dependencies there, which resulted in the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants