0eaa5cf59a
- bumps ansible-lint to 5.0 - updates our custom rules to make them compatible with 5.0 - replace custom module mocking with native ansible-lint ones - remove custom call of ansible-playbook --syntax-check as now this is done by ansible-lint - assured molecule vars are hosted under a vars/ folder in order to avoid confusing linter detection. - replaced custom rule for loop var names in role as now this this an optional core feature of the linter (see config) - replaced custom rule no-same-owner with opt-in one (see config) Change-Id: I233fae8c9036d295968a97ee80e07fde8846c633
27 lines
721 B
YAML
27 lines
721 B
YAML
- name: Check if bazelisk is installed
|
|
command: bash -c "type -p {{ bazelisk_executable }}"
|
|
failed_when: false
|
|
register: bazelisk_installed
|
|
|
|
- name: Ensure target directory exists
|
|
file:
|
|
state: directory
|
|
path: "{{ bazelisk_target | dirname }}"
|
|
mode: 0755
|
|
when: bazelisk_installed.rc != 0
|
|
|
|
- name: Download bazelisk
|
|
get_url:
|
|
url: "{{ bazelisk_url }}"
|
|
dest: "{{ bazelisk_target }}"
|
|
mode: '0755'
|
|
when: bazelisk_installed.rc != 0
|
|
register: bazelisk_downloaded
|
|
|
|
# This will apply to further plays and playbooks
|
|
- name: Set bazelisk_executable fact # noqa no-handler
|
|
set_fact:
|
|
bazelisk_executable: "{{ bazelisk_target }}"
|
|
cacheable: true
|
|
when: bazelisk_downloaded is changed
|