Skip to content

ansible#

Note

This pipeline is experimental and its API may break without warning.

Overview#

Automate infrastructure with Ansible.

Usage#

Include all ansible pipelines in your project:

include:
  - project: brettops/pipelines/ansible
    file:
      - ansible-lint.yml
      - ansible-molecule.yml

Test for multiple distributions#

The following snippet can be used to enable parallel testing of platforms across multiple machines. Platform names must match those specified in molecule/default/molecule.yml.

molecule/default/molecule.yml
ansible-molecule:
  parallel:
    matrix:
      - ANSIBLE_MOLECULE_PLATFORM:
          - debian11
          - debian10
          - debian9
          - fedora37
          - ubuntu1804
          - ubuntu2004
          - ubuntu2204

Jobs#

ansible-lint.yml

Provides the ansible-lint job to run the ansible-lint command.

ansible-molecule.yml

Provides the ansible-molecule job to run the molecule test.

Variables#

ANSIBLE_MOLECULE_TEST_OPTS

Parameters to pass to the molecule test command.

Only applicable to the molecule.yml.