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
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: stackhpc
name: openstack
version: 0.9.0
version: 0.9.1
readme: README.md
authors:
- StackHPC Ltd
Expand Down
6 changes: 6 additions & 0 deletions roles/os_images/tasks/prechecks.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
# Here a quick check for the presence of Docker (or an alias for Podman)
# Display a warning if not found
- name: Check if container engine is installed

Check warning on line 4 in roles/os_images/tasks/prechecks.yml

View workflow job for this annotation

GitHub Actions / lint / Ansible 2.20 lint

var-naming[no-role-prefix]

Variables names from within roles should use os_images_ as a prefix. (register: result)
ansible.builtin.command: which docker
changed_when: false
ignore_errors: true
register: result
when:
- os_images_build | bool
- os_images_list | selectattr('elements', 'defined') | list | length > 0

- name: Display warning message about the container engine
ansible.builtin.assert:
Expand All @@ -14,3 +17,6 @@
fail_msg: >
Container runtime engine could not be found - make sure it is installed.
Elements that depend on it will likely fail when building.
when:
- os_images_build | bool
- os_images_list | selectattr('elements', 'defined') | list | length > 0
11 changes: 7 additions & 4 deletions roles/os_images/tasks/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@
# Using --reset means that we always change something
changed_when: true
become: true
when: os_images_list |
selectattr("architecture", "defined") |
rejectattr("architecture", "equalto", ansible_facts.architecture) |
length > 0
when:
- os_images_build | bool
- os_images_list |
selectattr("elements", "defined") |
selectattr("architecture", "defined") |
rejectattr("architecture", "equalto", ansible_facts.architecture) |
list | length > 0
Loading