mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-07 14:44:22 -07:00
Adjust YAML files (#10233)
Adjust YAML files.
(cherry picked from commit eaa5e07b28
)
This commit is contained in:
parent
e8ff74f077
commit
a9e892952d
244 changed files with 7272 additions and 7329 deletions
|
@ -5,76 +5,76 @@
|
|||
|
||||
- name: "Match targeted filesystem by label"
|
||||
block:
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by label
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
name: "/match_label"
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by label
|
||||
community.general.btrfs_subvolume:
|
||||
automount: true
|
||||
name: "/match_label"
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
state: "present"
|
||||
register: result
|
||||
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
|
||||
- name: "Match targeted filesystem by uuid"
|
||||
block:
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by uuid
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
name: "/match_uuid"
|
||||
filesystem_uuid: "{{ result.filesystem.uuid }}"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by uuid
|
||||
community.general.btrfs_subvolume:
|
||||
automount: true
|
||||
name: "/match_uuid"
|
||||
filesystem_uuid: "{{ result.filesystem.uuid }}"
|
||||
state: "present"
|
||||
register: result
|
||||
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
|
||||
- name: "Match targeted filesystem by devices"
|
||||
block:
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by device
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
name: "/match_device"
|
||||
filesystem_device: "{{ result.filesystem.devices | first }}"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem by device
|
||||
community.general.btrfs_subvolume:
|
||||
automount: true
|
||||
name: "/match_device"
|
||||
filesystem_device: "{{ result.filesystem.devices | first }}"
|
||||
state: "present"
|
||||
register: result
|
||||
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
|
||||
- name: "Match only mounted filesystem"
|
||||
block:
|
||||
- name: "Mount filesystem '{{ btrfs_subvolume_target_label }}'"
|
||||
ansible.posix.mount:
|
||||
src: "{{ result.filesystem.devices | first }}"
|
||||
path: /mnt
|
||||
opts: "subvolid={{ 5 }}"
|
||||
fstype: btrfs
|
||||
state: mounted
|
||||
- name: "Mount filesystem '{{ btrfs_subvolume_target_label }}'"
|
||||
ansible.posix.mount:
|
||||
src: "{{ result.filesystem.devices | first }}"
|
||||
path: /mnt
|
||||
opts: "subvolid={{ 5 }}"
|
||||
fstype: btrfs
|
||||
state: mounted
|
||||
|
||||
- name: Print current status
|
||||
community.general.btrfs_info:
|
||||
- name: Print current status
|
||||
community.general.btrfs_info:
|
||||
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem when only mount
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
name: "/match_only_mounted"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Match '{{ btrfs_subvolume_target_label }}' filesystem when only mount
|
||||
community.general.btrfs_subvolume:
|
||||
automount: true
|
||||
name: "/match_only_mounted"
|
||||
state: "present"
|
||||
register: result
|
||||
|
||||
- name: "Unmount filesystem '{{ btrfs_subvolume_target_label }}'"
|
||||
ansible.posix.mount:
|
||||
path: /mnt
|
||||
state: absent
|
||||
- name: "Unmount filesystem '{{ btrfs_subvolume_target_label }}'"
|
||||
ansible.posix.mount:
|
||||
path: /mnt
|
||||
state: absent
|
||||
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
when: False # TODO don't attempt this if the host already has a pre-existing btrfs filesystem
|
||||
- name: Validate the '{{ btrfs_subvolume_target_label }}' filesystem was chosen
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result.filesystem.label == btrfs_subvolume_target_label
|
||||
when: false # TODO don't attempt this if the host already has a pre-existing btrfs filesystem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue