Ansible manager: OpenBSD 5.7, Python 2.7.9, Ansible 2.2.0.0
Managed host: OpenBSD 6.0 (RELEASE), Python 2.7.12
Using 'package' module on OpenBSD 6.0 appears to fail.
Running this task:
- name: install common packages
package:
name: "{{ item }}"
state: present
with_items:
- bzip2
- curl
- git
- gmake
- lsof
- pkglocatedb
- pstree
- python%2.7
- py-pip
- tcpflow
- tcptraceroute
tags: [packages]
...errors with the following:
TASK [openbsd_common : install common packages] ********************************
failed: [molodetz-new] (item=[u'bzip2', u'curl', u'git', u'gmake',
u'lsof', u'pkglocatedb', u'pstree', u'python%2.7', u'py-pip',
u'tcpflow', u'tcptraceroute']) => {"failed": true, "item": ["bzip2",
"curl", "git", "gmake", "lsof", "pkglocatedb", "pstree", "python%2.7",
"py-pip", "tcpflow", "tcptraceroute"], "msg": "failed in
get_package_state(): Error from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/curl,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/curl,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/git,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/gmake,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/lsof,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/pkglocatedb,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/pstree,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/python%2\.7,\.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/python%2\.7,\.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/py-pip,.tgz\\nftp:
Error retrieving file: 404 Not Found\nError from
http://ftp5.usa.openbsd.org/pub/OpenBSD/6.0/packages/amd64/tcpflow,.tgz\\nftp:
Error retrieving file: 404 Not Found\n"}
It looks like the package URL gets mangled, and errors are reported
from all packages in the list except the first (bzip2) and last
(tcptraceroute). I also don't totally know why the python%2.7 package
is attempted twice in there (the %2.7 specification by the way means
to install the package with that "branch", which is how the package
manager can distinguish between e.g. python 2.x and 3.x packages).
The above occurs when using the 'package' module. When using the
'openbsd_pkg' module this succeeds:
TASK [openbsd_common : install common packages] ********************************
ok: [molodetz-new] => (item=bzip2)
ok: [molodetz-new] => (item=curl)
ok: [molodetz-new] => (item=git)
ok: [molodetz-new] => (item=gmake)
changed: [molodetz-new] => (item=lsof)
ok: [molodetz-new] => (item=pkglocatedb)
changed: [molodetz-new] => (item=pstree)
ok: [molodetz-new] => (item=python%2.7)
ok: [molodetz-new] => (item=py-pip)
ok: [molodetz-new] => (item=tcpflow)
ok: [molodetz-new] => (item=tcptraceroute)
Is there a mistake in the task configuration that affects the package
module? Should the package module pass off to the openbsd_pkg module
internally?