Setup Gentoo Portage configuration such as sync URL or USE flags. It can be used to customize Gentoo stage3 installations as found in e.g. LXC/LXD container images.
This role must run against a Gentoo Linux with a minimally working portage setup.
For the default values of these variables check the defaults/main.yml.
For a minimal setup simply include the role. The default configuration should be non-destructive to an existing Gentoo installation:
- hosts: all
roles:
- name: ganto.gentoo_portage
There is a Molecule test profile that can be used to verify the basic functionality of the role. The default scenario is using the podman container driver. If you prefer docker you can select the corresponding scenario with the -s docker
molecule arguments.
- Ensure you have the necessary dependencies installed (e.g. in a Python venv):
pip3 install -r molecule/podman/requirements.txt # for podman
# or
pip3 install -r molecule/docker/requirements.txt # for docker
- Run the test suite. When using docker, then you need to add the
-s docker
option. The other options in brackets are optional but useful if you need to troubleshoot issues:
molecule [-vvv] test [--destroy never][-s docker]
- If you used
--destroy never
the container will remain after the test run and can be inspected interactively via:
podman exec -it <container-id> /bin/sh # for podman
# or
docker exec -it <container-id> /bin/sh # for docker
- Once you're done with inspecting the instanc eit has to be deleted before a new test run can be started:
molecule destroy [-s docker]
The ganto.gentoo_portage role was written and is maintained by: