[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-07-09 Thread R Reverdy
I had this issue wit cloudinit. The locale was wrongly set.

`$ do-release-upgrade` returns the same kind of result.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-24 Thread Ralf Spenneberg
I just confirmed, that it is not the apt proxy I am using. I will now try the 
new automated installer instead of preseeding. 
Apparently it has something to do with the preseeding I did. Actually 
apt/apt-get/aptitude worked fine and have no problems to install packages. Just 
the ansible-apt module did not work. 
But since I no have a working setup based on the new automated installer (the 
playbook works there) closing this bug is fine.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-24 Thread Nafallo Bjälevik
Alright. The Ansible module is mostly using the python3-apt bindings
directly, so I would suggest debugging APT first rather than adding the
whole Ansible stack on top in your debugging :-).

I'll close the bug now then.

** Changed in: ansible (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-23 Thread Ralf Spenneberg
I just did a fresh install of 20.04 from the live cd, and the playbook
works there as well. It must be something with my automated installation
method. Currently I am still using preseed and an apt proxy. I will
continue debugging the setup, as it still does not work in this
environment.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-23 Thread Ralf Spenneberg
Thats great info. At least it generally is able to run. 
The shebang is there to be able to call the playbook as ./apt.yml. 
For testing I removed the first two lines (comments) and on my fresh focal 
system it still fails:


PLAY [Install packages] 
**

TASK [Gathering Facts] 
***
ok: [localhost]

TASK [install apt packages] 
**
fatal: [localhost]: FAILED! => {
"changed": false
}

MSG:

 returned a result with an error set

PLAY RECAP 
***
localhost  : ok=1changed=0unreachable=0failed=1
skipped=0rescued=0ignored=0   

root@station224:~# ansible-playbook -vvv apt.yml 
ansible-playbook 2.9.6
  config file = /root/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0]
Using /root/ansible.cfg as config file
host_list declined parsing /root/hosts as it did not pass its verify_file() 
method
script declined parsing /root/hosts as it did not pass its verify_file() method
auto declined parsing /root/hosts as it did not pass its verify_file() method
Parsed /root/hosts inventory source with ini plugin

PLAYBOOK: apt.yml 

1 plays in apt.yml

PLAY [Install packages]
**

TASK [Gathering Facts] 
***
task path: /root/apt.yml:2
 ESTABLISH LOCAL CONNECTION FOR USER: root
 EXEC /bin/sh -c 'echo ~root && sleep 0'
 EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288 `" && echo 
ansible-tmp-1587704463.5635076-240295718517288="` echo 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288 `" ) && sleep 
0'
 Attempting python interpreter discovery
 EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v 
'"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v 
'"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v 
'"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v 
'"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; 
command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
 EXEC /bin/sh -c '/usr/bin/python2.7 && sleep 0'
Using module file /usr/lib/python3/dist-packages/ansible/modules/system/setup.py
 PUT /root/.ansible/tmp/ansible-local-16080wx54l1hi/tmpm8hhr014 TO 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288/AnsiballZ_setup.py
 EXEC /bin/sh -c 'chmod u+x 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288/ 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288/AnsiballZ_setup.py
 && sleep 0'
 EXEC /bin/sh -c '/usr/bin/python3 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288/AnsiballZ_setup.py
 && sleep 0'
 EXEC /bin/sh -c 'rm -f -r 
/root/.ansible/tmp/ansible-tmp-1587704463.5635076-240295718517288/ > /dev/null 
2>&1 && sleep 0'
ok: [localhost]
META: ran handlers

TASK [install apt packages] 
**
task path: /root/apt.yml:5
 ESTABLISH LOCAL CONNECTION FOR USER: root
 EXEC /bin/sh -c 'echo ~root && sleep 0'
 EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016 `" && echo 
ansible-tmp-1587704464.6301017-78793691417016="` echo 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016 `" ) && sleep 
0'
Using module file 
/usr/lib/python3/dist-packages/ansible/modules/packaging/os/apt.py
 PUT /root/.ansible/tmp/ansible-local-16080wx54l1hi/tmprt46nqpu TO 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016/AnsiballZ_apt.py
 EXEC /bin/sh -c 'chmod u+x 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016/ 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016/AnsiballZ_apt.py
 && sleep 0'
 EXEC /bin/sh -c '/usr/bin/python3 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016/AnsiballZ_apt.py
 && sleep 0'
 EXEC /bin/sh -c 'rm -f -r 
/root/.ansible/tmp/ansible-tmp-1587704464.6301017-78793691417016/ > /dev/null 
2>&1 && sleep 0'
The full traceback is:
  File 
"/tmp/ansible_apt_payload_m2ufo6sl/ansible_apt_payload.zip/ansibl

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-23 Thread Nafallo Bjälevik
In addition, could you provide the verbose output from ansible-playbook
-vvv apt.yml ?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-23 Thread Nafallo Bjälevik
Just created a new focal container, apt update, apt upgrade, apt install
ansible. I copied your playbook, but without the shebang (not sure
what's that doing there?) and ran it.

It works fine. Perhaps you could try to remove the shebang (first line
being ---), and run it with ansible-playbook apt.yml directly? Let us
know how it goes.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-23 Thread Ralf Spenneberg
Yes,
I already reduced the playbook to the following:

#!/usr/bin/env ansible-playbook
#
---
- name: Install packages
  hosts: localhost
  tasks:
  - name: install apt packages
apt: 
  pkg:
- git
become: true


It still fails.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-23 Thread Nafallo Bjälevik
Hi Ralf,

Could you try removing "update_cache: no", since cache_valid_time sets it to 
yes explicitly.
Just a hunch this could be your apt cache not being up-to-date before you try 
to install...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-22 Thread Ralf Spenneberg
apport information

** Tags added: apport-collected focal

** Description changed:

  When using ansible on 20.04, package installation via apt fail.
  
  Consider the following playbook:
  
  #!/usr/bin/env ansible-playbook
  #
  ---
  - name: Install packages
hosts: localhost
tasks:
- name: install apt packages
  apt: 
pkg:
  - git
update_cache: no
cache_valid_time: 3600
  become: true
  
  
  This playbook fails with:
   ansible-playbook apt.yml 
  
  PLAY [Install packages]
  
**
  
  TASK [Gathering Facts] 
***
  ok: [localhost]
  
  TASK [install apt packages] 
**
  fatal: [localhost]: FAILED! => {
  "changed": false
  }
  
  MSG:
  
   returned a result with an error set
  
  PLAY RECAP 
***
  localhost  : ok=1changed=0unreachable=0failed=1   
 skipped=0rescued=0ignored=0
+ --- 
+ ProblemType: Bug
+ ApportVersion: 2.20.11-0ubuntu27
+ Architecture: amd64
+ CasperMD5CheckResult: skip
+ DistroRelease: Ubuntu 20.04
+ Package: ansible 2.9.6+dfsg-1
+ PackageArchitecture: all
+ ProcEnviron:
+  TERM=xterm-256color
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=
+  LANG=de_DE
+  SHELL=/bin/bash
+ ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
+ Tags:  focal
+ Uname: Linux 5.4.0-26-generic x86_64
+ UpgradeStatus: No upgrade log present (probably fresh install)
+ UserGroups:
+  
+ _MarkForUpload: True

** Attachment added: "Dependencies.txt"
   
https://bugs.launchpad.net/bugs/1874195/+attachment/5358300/+files/Dependencies.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-22 Thread Ralf Spenneberg
I just confirmed that on Ubuntu 18.04 the playbook works fine.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1874195] Re: ansible is not able to install packages via apt on 20.04

2020-04-22 Thread Chris Guiver
Thank you for taking the time to report this bug and helping to make
Ubuntu better. Please execute the following command only once, as it
will automatically gather debugging information, in a terminal:

apport-collect 1874195

When reporting bugs in the future please use apport by using 'ubuntu-
bug' and the name of the package affected. You can learn more about this
functionality at https://wiki.ubuntu.com/ReportingBugs.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874195

Title:
  ansible is not able to install packages via apt on 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1874195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs