ansible-role-bootstrap
ansible-role-bootstrap copied to clipboard
Unable to bootstrap Ubuntu hirsute
Describe the bug
When applying this role to the docker.io/ubuntu:hirsute
image it fails upon installing bootstrap packages.
When I login to the container after molecule converge
has failed and execute the command myself it works without issue.
mol converge # Fails with ...
...
TASK [robertdebock.bootstrap : install bootstrap packages (raw)] ***************
fatal: [instance]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 127, "stderr": "Error: exec failed: container_linux.go:380: starting container process caused: exec: \"LANG=C\": executable file not found in $PATH: OCI not found\n", "stderr_lines": ["Error: exec failed: container_linux.go:380: starting container process caused: exec: \"LANG=C\": executable file not found in $PATH: OCI not found"], "stdout": "", "stdout_lines": []}
...
mol login
LANG=C apt-get update && apt-get install -y python3 sudo gnupg python3-apt # Succeeds
CTRL+D
mol converge # Succeeds
Playbook
---
- name: Prepare machine for role usage
hosts: all
become: true
gather_facts: false
roles:
- robertdebock.bootstrap
Molecule configuration
---
dependency:
name: galaxy
driver:
name: podman
platforms:
- name: instance
image: docker.io/ubuntu:hirsute
pre_build_image: true
provisioner:
name: ansible
verifier:
name: ansible
Environment
- Control node OS: Ubuntu Hirsute WSL2
- Control node Ansible version: 2.12.1
- Managed node OS: Ubuntu Hirsute Podman