molecule: Molecule Docker provisioning leads to package conflicts in Fedora
Issue Type
- Bug report
Molecule and Ansible details
$ ansible --version && molecule --version
ansible 2.7.2
config file = None
configured module search path = ['/home/nelson/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/nelson/.local/share/virtualenvs/reproduce_molecule_issue-PL5vMwDu/lib/python3.7/site-packages/ansible
executable location = /home/nelson/.local/share/virtualenvs/reproduce_molecule_issue-PL5vMwDu/bin/ansible
python version = 3.7.1 (default, Nov 5 2018, 14:07:04) [GCC 8.2.1 20181011 (Red Hat 8.2.1-4)]
molecule, version 2.19.0
Molecule and Ansible installation method: pipenv
Desired Behavior
I expected git to install successfully.
Actual Behaviour
A conflict occurs due to unrelated packages.
TASK [example_bug : install Git and related tools in RedHat] *******************
fatal: [instance]: FAILED! => {"changed": false, "failures": [], "msg": "Unknown Error occured: coreutils-single conflicts with coreutils-8.30-6.fc29.x86_64", "rc": 1, "results": []}
Reproducibility
Minimal molecule role reproducing the issue: https://github.com/n-batalha/molecule_error_example
It basically occurs on a clean fedora:29
docker image with:
- name: install Git and related tools in RedHat
dnf:
name: ['git']
state: present
update_cache: true
become: true
But installing the same packages on a new Docker container (without using molecule) results in no errors. I suspect some other system packages are installed by molecule, resulting in this conflict.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (13 by maintainers)
I’ve done this myself. Closing this issue therefore. @n-batalha please communicate via ansible/ansible#49060 wrt further investigation.
@n-batalha I’ve reopened it because it looks like it might be an Ansible Engine’s dnf module issue. Maybe it’s an issue with the dnf python API.
Anyway, I’m moving this under ansible/ansible, because it belongs there and GitHub now allows to move issues between repos (https://help.github.com/articles/transferring-an-issue-to-another-repository/). We’ll also need to modify the original issue description though (to make @ansibot happy).
Great, thanks also for sharing how you debug! I’ll use this to triage better or fix issues upstream in the future.
A user still needs to have roles to provision machines with
update_cache=yes
but closing as it’s not a molecule issue.edit: I was going to debug further and maybe reopen in
ansible/ansible
but I see now you can transfer issues