Skip to content

Ansible role to setup Gentoo portage configuration

License

Notifications You must be signed in to change notification settings

ganto/ansible-gentoo_portage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: ganto.gentoo_portage

CI Ansible Galaxy

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.

Requirements

This role must run against a Gentoo Linux with a minimally working portage setup.

Getting Started

For the default values of these variables check the defaults/main.yml.

Example Playbook

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

Development

Testing

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.

  1. 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
  1. 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]
  1. 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
  1. 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]

License

LGPLv3

Author Information

Changelog

The ganto.gentoo_portage role was written and is maintained by:

About

Ansible role to setup Gentoo portage configuration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages