-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bigboot - prepend variable names with role name
Signed-off-by: Ygal Blum <[email protected]>
- Loading branch information
Showing
4 changed files
with
15 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- bigboot - Rename internal variables with role name prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
- name: Find the boot mount entry | ||
ansible.builtin.set_fact: | ||
_boot_mount_entry: "{{ ansible_facts.mounts | selectattr('mount', 'equalto', '/boot') | first }}" | ||
bigboot_boot_mount_entry: "{{ ansible_facts.mounts | selectattr('mount', 'equalto', '/boot') | first }}" | ||
|
||
- name: Calculate the partition to look for | ||
ansible.builtin.set_fact: | ||
_boot_partition_name: "{{ (_boot_mount_entry.device | split('/'))[-1] }}" | ||
bigboot_boot_partition_name: "{{ (bigboot_boot_mount_entry.device | split('/'))[-1] }}" | ||
|
||
- name: Find the boot device parent | ||
ansible.builtin.set_fact: | ||
_boot_disk: "{{ item.key }}" | ||
bigboot_boot_disk: "{{ item.key }}" | ||
with_dict: "{{ ansible_facts.devices }}" | ||
when: _boot_partition_name in item.value.partitions | ||
when: bigboot_boot_partition_name in item.value.partitions | ||
|
||
- name: Capture boot device details | ||
ansible.builtin.set_fact: | ||
boot_device_partition_prefix: "{{ _boot_partition_name[(_boot_disk | length) : -1] }}" | ||
boot_partition_number: "{{ _boot_partition_name[-1] }}" | ||
boot_device_name: "/dev/{{ _boot_disk }}" | ||
boot_device_original_size: "{{ _boot_mount_entry.size_total | int }}" | ||
bigboot_boot_device_partition_prefix: "{{ bigboot_boot_partition_name[(bigboot_boot_disk | length) : -1] }}" | ||
bigboot_boot_partition_number: "{{ bigboot_boot_partition_name[-1] }}" | ||
bigboot_boot_device_name: "/dev/{{ bigboot_boot_disk }}" | ||
bigboot_boot_device_original_size: "{{ bigboot_boot_mount_entry.size_total | int }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters