This commit is contained in:
Chris Hammer 2024-07-26 14:12:10 -04:00
parent fd108e2b69
commit d7c73f1a97
4 changed files with 36 additions and 31 deletions

View File

@ -1,23 +1,6 @@
---
- name: Perform logical volume and boot parition resizing as needed
hosts: all
become: true
gather_facts: true
strategy: free
vars_files:
- bigboot_vars.yml
tasks:
- name: ReaR backup per host
ansible.builtin.include_role:
name: rhc.rear.rear_backup
vars:
client_ips: "{{ item['value']['bigboot_size'] }}"
namehost: "{{ item['key'] }}"
loop: "{{ bigboot_data | dict2items }}"
loop_control:
label: "{{ item['key'] }}"
when:
- item['value']['bigboot_execute_bigboot'] | bool
- not bigboot_rear_backup_skip | default(false) | bool
- name: Perform a ReaR backup before the /boot expansion
ansible.builtin.import_playbook: rhc.rear.rear_backup
when:
- bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool
- not bigboot_rear_backup_skip | default(false) | bool

View File

@ -0,0 +1,19 @@
---
- name: Perform logical volume and boot parition resizing as needed
hosts: rear-server
become: true
gather_facts: false
vars_files:
- bigboot_vars.yml
tasks:
- name: Create IP list and add to NFS exports
ansible.builtin.include_tasks: tasks/rear_nfs_exports.yml
loop: "{{ bigboot_data | dict2items }}"
loop_control:
label: "{{ item['key'] }}"
when:
- item['value']['bigboot_execute_bigboot'] | bool
- not bigboot_rear_backup_skip | default(false) | bool

View File

@ -40,7 +40,9 @@
'bigboot_execute_shrink_lv': bigboot_execute_shrink_lv,
'bigboot_adjacent_lvm_device': bigboot_adjacent_lvm_device,
'bigboot_lv_shrink_size': bigboot_lv_shrink_size | int,
'bigboot_size': bigboot_size
'bigboot_size': bigboot_size,
'ip_addresses': ansible_all_ipv4_addresses,
'server_hostname': ansible_hostname
}
}) }}"
@ -52,12 +54,4 @@
- ansible_facts['services'][bigboot_docker_service] is defined
- ansible_facts['services'][bigboot_docker_service]['state'] == "running"
- name: Perform a ReaR backup if any disk modifications are to be made
ansible.builtin.import_playbook: rhc.rear.rear_backup
when:
- bigboot_execute_shrink_lv | default(false) | bool
or bigboot_execute_bigboot | default(false) | bool
- not rear_backup_skip | default(false) | bool
...

View File

@ -0,0 +1,9 @@
---
- name: Create list of IP addresses and hostnames
ansible.builtin.set_fact:
client_ips: "{{ item['value']['ip_addresses'] }}"
namehost: "{{ item['value']['server_hostname'] }}"
- name: Include NFS export role
ansible.builtin.include_role:
name: rhc.rear.say_hi