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,24 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: ansible
|
||||
## Description: simple infrastructure as code tool
|
||||
## Version: latest
|
||||
## Methods:
|
||||
## - system
|
||||
## - source (pipx)
|
||||
---
|
||||
- name: Set ansible default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
ansible:
|
||||
install_methods:
|
||||
- system
|
||||
pkgname:
|
||||
RedHat: ansible
|
||||
Debian: ansible
|
||||
Alpine: ansible
|
||||
Archlinux: ansible
|
||||
pip: ansible
|
||||
# }}}
|
||||
- name: Configure ansible
|
||||
when:
|
||||
- "'ansible' not in __configured"
|
||||
@@ -8,19 +27,19 @@
|
||||
when:
|
||||
- ansible_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
ansible_install_method: "{{ install_method if install_method in ansible_install_methods else ansible_install_methods[0] }}"
|
||||
ansible_install_method: "{{ install_method if install_method in ansible.install_methods else ansible.install_methods[0] }}"
|
||||
|
||||
- name: Append ansible to system package manager install list
|
||||
when:
|
||||
- ansible_install_method == 'system'
|
||||
- ansible_install_method == "system"
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}"
|
||||
pkg_sys: "{{ pkg_sys + [ ansible_pkgname[os_family] ] }}"
|
||||
|
||||
- name: Append ansible to pipx install list
|
||||
when:
|
||||
- ansible_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_pipx: "{{ pkg_pipx + [ansible_pip_pkgname] }}"
|
||||
pkg_pipx: "{{ pkg_pipx + [ { 'name': ansible_pkgname['pip'] } ] }}"
|
||||
|
||||
- name: Complete ansible configuration
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
Reference in New Issue
Block a user