start developing module for go_install
not going to be used for a long time Making pkg tasks truly single file
This commit is contained in:
@@ -1,5 +1,27 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: ansible_lint
|
||||
## Description: Linter for ansible yaml
|
||||
## Version: latest
|
||||
## Methods:
|
||||
## - source (pipx)
|
||||
## Helpers: pipx
|
||||
---
|
||||
- name: Set ansible_lint default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_version: "{{ ansible_lint_version | default('latest') }}"
|
||||
ansible_lint:
|
||||
install_methods:
|
||||
- source
|
||||
- system
|
||||
pkgname:
|
||||
RedHat: ansible-lint
|
||||
Debian: ansible-lint
|
||||
Archlinux: ansible-lint
|
||||
Alpine: ansible-lint
|
||||
FreeBSD: py311-ansible-lint
|
||||
pip: ansible_lint
|
||||
# }}}
|
||||
- name: Configure ansible_lint
|
||||
when:
|
||||
- "'ansible_lint' not in __configured"
|
||||
@@ -10,17 +32,13 @@
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_install_method: "{{ install_method if install_method in ansible_lint_install_methods else ansible_lint_methods[0] }}"
|
||||
|
||||
- name: Set pipx pkgnname
|
||||
- name: Configure pipx source install
|
||||
when:
|
||||
- ansible_lint_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
ansible_lint_pkgname: "{{ ansible_lint_pkgname['pipx'] }}{{ '==' ~ ansible_lint_version if ansible_lint_version != 'latest' }}"
|
||||
|
||||
- name: Add ansible_lint to pipx install list
|
||||
when:
|
||||
- ansible_lint_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_pipx: "{{ pkg_pipx + [ansible_lint_pkgname] }}"
|
||||
- ansible_lint_install_method == "source"
|
||||
block:
|
||||
- name: Add ansible_lint to pipx install list
|
||||
ansible.builtin.set_fact:
|
||||
pkg_pipx: "{{ pkg_pipx + [ansible_lint.pkgname['pip']] }}"
|
||||
|
||||
- name: Append ansible-lint to system install list
|
||||
when:
|
||||
|
||||
Reference in New Issue
Block a user