add btrfs-progs
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
# vim: set filetype=yaml.ansible :
|
||||||
|
#
|
||||||
|
## Package: btrfs-progs
|
||||||
|
## Description: programs to manipulate the btrfs filesystem
|
||||||
|
## Version: system
|
||||||
|
## Methods: system
|
||||||
|
## Helpers: -
|
||||||
|
---
|
||||||
|
- name: Set btrfs-progs default facts # {{{
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
btrfs_progs:
|
||||||
|
methods:
|
||||||
|
default: [system]
|
||||||
|
pkgname:
|
||||||
|
default: btrfs-progs
|
||||||
|
- name: Finalise btrfs-progs default facts
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
btrfs_progs:
|
||||||
|
methods: "{{ btrfs_progs.methods[os_family] | default(btrfs_progs.methods.default) }}"
|
||||||
|
pkgname: "{{ btrfs_progs.pkgname[os_family] | default(btrfs_progs.pkgname.default) }}"
|
||||||
|
# }}}
|
||||||
|
- name: Configure btrfs-progs
|
||||||
|
when:
|
||||||
|
- "'btrfs-progs' not in __configured"
|
||||||
|
block:
|
||||||
|
- name: Set btrfs-progs install method
|
||||||
|
when:
|
||||||
|
- btrfs_progs_imethod is undefined
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
btrfs_progs_imethod: "{{ imethod if imethod in btrfs_progs.methods else btrfs_progs.methods[0] }}"
|
||||||
|
|
||||||
|
- name: Configure btrfs-progs system install
|
||||||
|
when:
|
||||||
|
- btrfs_progs_imethod == 'system'
|
||||||
|
block:
|
||||||
|
- name: Queue btrfs-progs system install
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
pkg_sys: "{{ pkg_sys + [btrfs_progs.pkgname] }}"
|
||||||
|
btrfs_progs_install: "{{ btrfs_progs_imethod }}={{ btrfs_progs.pkgname }}"
|
||||||
|
|
||||||
|
- name: Finalise btrfs-progs configuration
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
__configured: "{{ __configured | combine( { 'btrfs-progs': btrfs_progs_install } ) }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user