Installation
The collection is installed from its Git repository. It is not published on Ansible Galaxy.
From a requirements file
Section titled “From a requirements file”Create a requirements.yml next to your playbooks:
collections: - name: https://github.com/NoiXdev/ansible-collection-infra.git type: git version: v0.4.0Install it:
ansible-galaxy collection install -r requirements.ymlansible-galaxy also installs the collections noixdev.infra depends on (community.docker, ansible.posix and community.general). Afterwards the roles are available under the fully qualified names noixdev.infra.base, noixdev.infra.docker and so on.
Pin a version
Section titled “Pin a version”The version field takes a Git tag, a branch or a commit. Use a release tag such as v0.4.0 in anything you rely on. A branch name like main moves with every commit, so two runs a week apart can behave differently.
To move to a new release, change the tag, read the changelog, and run the install again with --force:
ansible-galaxy collection install -r requirements.yml --forceWithout --force an already installed collection is left as it is.
A single command
Section titled “A single command”For a quick try without a requirements file:
ansible-galaxy collection install git+https://github.com/NoiXdev/ansible-collection-infra.git,v0.4.0Check the install
Section titled “Check the install”ansible-galaxy collection list noixdev.infraThe output shows the installed version. Inspect a role’s variables with ansible-doc:
ansible-doc -t role noixdev.infra.basePrivate mirror or offline control node
Section titled “Private mirror or offline control node”Clone the repository, check out the tag, and install from the directory:
git clone --branch v0.4.0 https://github.com/NoiXdev/ansible-collection-infra.gitansible-galaxy collection install ./ansible-collection-infra