Working on ansible-lint
- need to figure out testing
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Configure ansible-lint
|
||||
when:
|
||||
- __ansible_lint_configured is undefined or
|
||||
not __ansible_lint_configured
|
||||
block:
|
||||
- name: Set basic variables
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_version: latest
|
||||
ansible_lint_default_install_method: system
|
||||
- name: Configure package options
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_install_method: "{{ ansible_lint_install_method | default(install_method) }}"
|
||||
- name: Set pipx name
|
||||
when:
|
||||
- ansible_lint_install_method == 'pipx'
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_pkgname: ansible-lint
|
||||
- name: Set package name
|
||||
when:
|
||||
- install_method == 'system'
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_pkgname: ansible-lint
|
||||
- name: Append ansible-lint to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['ansible-lint'] }}"
|
||||
|
||||
- name: Dump pkg_sys
|
||||
debug:
|
||||
var: pkg_sys
|
||||
pkg_sys: "{{ pkg_sys + [ansible_lint_pkgname] }}"
|
||||
|
||||
Reference in New Issue
Block a user