Hi,
I’d like to have all instances be installed with a set of common packages (common role), an then each role installed with its own specific set of packages.
I’d like to code the package installation tasks only once (it could be apt-get update + apt-get install, or download + install, or git clone + make install).
I’ve thought about several bad solutions:
- all install tasks are in common role, package list vars are defined in common role too, but specific roles can “enrich” them with additional packages to install.
problems:
- I never tried to enrich variables, not sure it works, order of parsing may also break it
- tasks must handle the fact that the package list variable could be empty
- installation tasks are roles, other roles use dependencies
problems:
- only one role of a set of roles used by a playbook can use an install role => not sharing it with common, for instance
- using an include from a folder outside roles
problem:
- needs to use a few …/… to get to the shared folder
any other idea ?