Fix the CI
- [x] Fix all ansible-lint errors (#48)
- [ ] Fix molecule error:
CRITICAL Unable to contact the Docker daemon. Please refer to https://docs.docker.com/config/daemon/ for managing the daemon - [ ] Fix any remaining error
- [x] Fix the Ansible Galaxy webhook which has absolutely no effect (no result, no errors, no nothing)
Hi @lvps,
I am happy to check the issue. Let me know if it works for you :)
Hi @Sozhan308, sure, go ahead! The ansible-lint and molecule errors are not strictly related to GitHub CI - I have the same errors if I try to run linting and tests on my computer - so you don't even need any special setup other than a pip install.
Molecule is still failing, it is very likely that the required syntax and configuration files changed entirely in the span of a few years while the CI was not running.
First part of the output, there are warnings but they cannot be fixed (unless I rename the role):
Run molecule test --all
molecule test --all
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.13.2/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.13.2/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.2/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.2/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.2/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.13.2/x64/lib
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
WARNING Driver docker does not provide a schema.
WARNING Driver docker does not provide a schema.
WARNING Driver docker does not provide a schema.
WARNING Driver docker does not provide a schema.
INFO Performing prerun with role_name_check=1...
WARNING Computed fully qualified role name of lvps.389ds_server does not follow current galaxy requirements.
Please edit meta/main.yml and assure we can correctly determine full role name:
galaxy_info:
role_name: my_name # if absent directory name hosting role is used instead
namespace: my_galaxy_namespace # if absent, author is used instead
Namespace: https://old-galaxy.ansible.com/docs/contributing/namespaces.html#galaxy-namespace-limitations
Role: https://old-galaxy.ansible.com/docs/contributing/creating_role.html#role-names
As an alternative, you can add 'role-name' to either skip_list or warn_list.
Second part, where Docker is not found for some reason and I'm not sure if Molecule is skipping the entire test or trying to destroy before running just to start from a clean state:
INFO Running backwards_compatibility > dependency
Molecule backwards_compatibility > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
INFO Running backwards_compatibility > cleanup
Molecule backwards_compatibility > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running backwards_compatibility > destroy
Molecule backwards_compatibility > destroy
INFO Sanity checks: 'docker'
CRITICAL Unable to contact the Docker daemon. Please refer to https://docs.docker.com/config/daemon/ for managing the daemon
WARNING An error occurred during the test sequence action: 'destroy'. Cleaning up.
INFO Running backwards_compatibility > cleanup
Molecule backwards_compatibility > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running backwards_compatibility > destroy
Molecule backwards_compatibility > destroy
INFO Sanity checks: 'docker'
CRITICAL Unable to contact the Docker daemon. Please refer to https://docs.docker.com/config/daemon/ for managing the daemon
Error: Process completed with exit code 1.
I don't have a docker installation on my machine, but I was able to replicate with the podman driver. Another issue is related to the fact that the image used is an old centos8, for which repositories do not exist.
TASK [Build an Ansible compatible image] ***************************************
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: Importing 'to_native' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.
[ERROR]: Task failed: Module failed: Failed to build image molecule_local/centos:8: STEP 1/3: FROM centos:8
STEP 2/3: RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python2 sudo bash ca-certificates iproute && apt-get clean; elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python2 sudo python2-devel python*-dnf bash iproute epel-release && dnf clean all; elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python2 sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python2 sudo bash python-xml iproute && zypper clean -a; elif [ $(command -v apk) ]; then apk update && apk add --no-cache python2 sudo bash iproute ca-certificates; elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python2 sudo bash ca-certificates iproute && xbps-remove -O; fi
CentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'appstream':
- Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org]
Error: building at STEP "RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python2 sudo bash ca-certificates iproute && apt-get clean; elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python2 sudo python2-devel python*-dnf bash iproute epel-release && dnf clean all; elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python2 sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python2 sudo bash python-xml iproute && zypper clean -a; elif [ $(command -v apk) ]; then apk update && apk add --no-cache python2 sudo bash iproute ca-certificates; elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python2 sudo bash ca-certificates iproute && xbps-remove -O; fi": while running runtime: exit status 1
Origin: /home/andrew/projects/389pr/roles/389ds-server/venv/lib64/python3.13/site-packages/molecule_plugins/podman/playbooks/create.yml:72:7
70 register: podman_images
71
72 - name: Build an Ansible compatible image # noqa: no-handler
^ column 7
failed: [localhost] (item=centos:8) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "item": {"ansible_index_var": "i", "ansible_loop_var": "item", "changed": true, "checksum": "825fe7506cc05f57c944af44fca1c043fa5f76f9", "dest": "/home/andrew/.ansible/tmp/molecule.q8f2.backwards_compatibility/Dockerfile_centos_8", "diff": [], "failed": false, "gid": 1000, "group": "andrew", "i": 0, "invocation": {"module_args": {"_original_basename": "Dockerfile.j2", "attributes": null, "backup": false, "checksum": "825fe7506cc05f57c944af44fca1c043fa5f76f9", "content": null, "dest": "/home/andrew/.ansible/tmp/molecule.q8f2.backwards_compatibility/Dockerfile_centos_8", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": "0600", "owner": null, "remote_src": false, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/andrew/.ansible/tmp/ansible-tmp-1765829456.8568616-184030-246673626834966/.source", "unsafe_writes": false, "validate": null}}, "item": {"capabilities": ["SYS_ADMIN"], "command": "/sbin/init", "image": "centos:8", "install_epel": true, "name": "centos8-backwards-sysctl", "python_devel_package": "python2-devel", "python_package": "python2", "volumes": ["/sys/fs/cgroup:/sys/fs/cgroup:ro"]}, "md5sum": "d1ad885c63aa35951152d6086bb1b128", "mode": "0600", "owner": "andrew", "secontext": "unconfined_u:object_r:user_home_t:s0", "size": 918, "src": "/home/andrew/.ansible/tmp/ansible-tmp-1765829456.8568616-184030-246673626834966/.source", "state": "file", "uid": 1000}, "msg": "Failed to build image molecule_local/centos:8: STEP 1/3: FROM centos:8\nSTEP 2/3: RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python2 sudo bash ca-certificates iproute && apt-get clean; elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python2 sudo python2-devel python*-dnf bash iproute epel-release && dnf clean all; elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python2 sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python2 sudo bash python-xml iproute && zypper clean -a; elif [ $(command -v apk) ]; then apk update && apk add --no-cache python2 sudo bash iproute ca-certificates; elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python2 sudo bash ca-certificates iproute && xbps-remove -O; fi\nCentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:00 \n Errors during downloading metadata for repository 'appstream':\n - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org]\nError: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org]\nError: building at STEP \"RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python2 sudo bash ca-certificates iproute && apt-get clean; elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python2 sudo python2-devel python*-dnf bash iproute epel-release && dnf clean all; elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python2 sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python2 sudo bash python-xml iproute && zypper clean -a; elif [ $(command -v apk) ]; then apk update && apk add --no-cache python2 sudo bash iproute ca-certificates; elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python2 sudo bash ca-certificates iproute && xbps-remove -O; fi\": while running runtime: exit status 1\n"}
FAILED - RETRYING: [localhost]: Build an Ansible compatible image (3 retries left).
FAILED - RETRYING: [localhost]: Build an Ansible compatible image (2 retries left).
FAILED - RETRYING: [localhost]: Build an Ansible compatible image (1 retries left).