fixed packages to be more generic
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: 7zip
|
||||
## Description: tools to work with 7zip format compression
|
||||
## Version: system
|
||||
## Methods: [system]
|
||||
## Helpers: -
|
||||
---
|
||||
- name: Set 7zip default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
7zip:
|
||||
methods:
|
||||
default: [system]
|
||||
pkgname:
|
||||
default: [7zip]
|
||||
- name: Finalise 7zip default facts
|
||||
ansible.builtin.set_fact:
|
||||
7zip:
|
||||
methods: "{{ 7zip.methods[os_family] | default(7zip.methods.default) }}"
|
||||
pkgname: "{{ 7zip.pkgname[os_family] | default(7zip.pkgname.default) }}"
|
||||
# }}}
|
||||
- name: Configure 7zip
|
||||
when:
|
||||
- "'7zip' not in __configured"
|
||||
block:
|
||||
- name: Set 7zip install method
|
||||
when:
|
||||
- 7zip_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
7zip_imethod: "{{ imethod if imethod in 7zip.methods else 7zip.methods[0] }}"
|
||||
|
||||
- name: Configure 7zip system install
|
||||
when:
|
||||
- 7zip_imethod == 'system'
|
||||
block:
|
||||
- name: Queue 7zip system install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [7zip.pkgname] }}"
|
||||
7zip_install: "{{ 7zip_imethod }}={{ 7zip.pkgname }}"
|
||||
|
||||
- name: Finalise 7zip configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { '7zip': 7zip_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user