0

I am setting up a pipeline to test ansible roles with molecule. When I run molecule test locally I see no issues. However, when I run the same in my Buildkite pipeline I see the following an error:

    [2022-11-03T17:07:07Z] ERROR! the role 'ansible_roles_snmp' was not found in /workdir/molecule/default/roles:/root/.cache/ansible-compat/2a3fed/roles:/root/.cache/molecule/workdir/default/roles:/:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/workdir/molecule/default
[2022-11-03T17:07:07Z]
[2022-11-03T17:07:07Z] The error appears to be in '/workdir/molecule/default/converge.yml': line 18, column 15, but may
[2022-11-03T17:07:07Z] be elsewhere in the file depending on the exact syntax problem.
[2022-11-03T17:07:07Z]
[2022-11-03T17:07:07Z] The offending line appears to be:
[2022-11-03T17:07:07Z]
[2022-11-03T17:07:07Z]       ansible.builtin.include_role:
[2022-11-03T17:07:07Z]         name: ansible_roles_snmp
[2022-11-03T17:07:07Z]               ^ here

My setup is docker:stable-dind container pulled on Buildkite worker. That container then pulls the latest geerlingguy/docker-ubuntu2004-ansible:latest image. I can clearly see that role's code is present inside of my dind container:

[2022-11-03T17:06:00Z] /workdir
[2022-11-03T17:06:00Z] total 60
[2022-11-03T17:06:00Z] drwxr-xr-x   13 1000     1000          4096 Nov  3 17:04 .
[2022-11-03T17:06:00Z] drwxr-xr-x    1 root     root          4096 Nov  3 17:04 ..
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 .buildkite
[2022-11-03T17:06:00Z] drwxr-xr-x    8 1000     1000          4096 Nov  3 17:04 .git
[2022-11-03T17:06:00Z] -rw-r--r--    1 1000     1000           430 Nov  3 17:04 OWNERS
[2022-11-03T17:06:00Z] -rw-r--r--    1 1000     1000          1328 Nov  3 17:04 README.md
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 defaults
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 files
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 handlers
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 meta
[2022-11-03T17:06:00Z] drwxr-xr-x    3 1000     1000          4096 Nov  3 17:04 molecule
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 tasks
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 templates
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 tests
[2022-11-03T17:06:00Z] drwxr-xr-x    2 1000     1000          4096 Nov  3 17:04 vars

Any thoughts or ideas what could cause that?

pl33gS
  • 31
  • 1
  • 6

0 Answers0