Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions roles/linux_ansible_init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The ansible-init system consists of a script that is installed in the image and

ansible-init is able to execute playbooks that are baked into the images, and also from arbitrary Ansible collections, e.g. from Galaxy or from a Git repository. These extra playbooks are specified by the Azimuth operator in their Azimuth configuration, and communicated to the instances that make up platforms using cloud-init instance metadata. This allows site- or platform-specific customisations to be applied to instances in a consistent way without modifying the images.

## Role variables

- `ansible_init_pip_packages`: Optional. List of packages to install into venv.

## Usage

The 255 byte limit per key/value pair for instance metadata means that collections will be defined by metadata items of the following structure:
Expand Down
4 changes: 4 additions & 0 deletions roles/linux_ansible_init/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ansible_init_pip_packages:
- ansible
- jmespath
- requests
5 changes: 1 addition & 4 deletions roles/linux_ansible_init/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

- name: Install dependencies into virtualenv
pip:
name:
- ansible
- jmespath
- requests
name: "{{ ansible_init_pip_packages }}"
state: latest
virtualenv: /usr/lib/ansible-init
virtualenv_command: "{{ python3_cmds[ansible_facts['distribution']] }} -m venv --upgrade-deps"
Expand Down