Compare commits
No commits in common. "862908fe0c16971622961b835b8f06c862c12cd0" and "fa7f4d0e31dfca127b74b4aafddad11610aec3ba" have entirely different histories.
862908fe0c
...
fa7f4d0e31
@ -5,4 +5,3 @@ skip_list:
|
|||||||
- no-changed-when
|
- no-changed-when
|
||||||
- run-once[play]
|
- run-once[play]
|
||||||
- name[template]
|
- name[template]
|
||||||
- jinja[spacing]
|
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,4 +7,3 @@ filter_plugins/*.bak
|
|||||||
python/
|
python/
|
||||||
collections/ansible_collections
|
collections/ansible_collections
|
||||||
roles/autofsck
|
roles/autofsck
|
||||||
*.bak
|
|
||||||
|
@ -18,17 +18,79 @@
|
|||||||
- name: Capture logical volume information
|
- name: Capture logical volume information
|
||||||
ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml
|
ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml
|
||||||
|
|
||||||
- name: Set environment for subsequent workflow nodes
|
|
||||||
ansible.builtin.set_stats:
|
- name: Perform a ReaR backup if any disk modifications are to be made
|
||||||
data:
|
ansible.builtin.import_playbook: rhc.rear.rear_backup
|
||||||
bigboot_data: "{{ bigboot_data | default({}) |
|
when:
|
||||||
combine({inventory_hostname:
|
- bigboot_execute_bigboot | default('false') | bool
|
||||||
{
|
- not bigboot_skip_rear_backup | default('true') | bool
|
||||||
'bigboot_execute_bigboot': bigboot_execute_bigboot,
|
|
||||||
'bigboot_execute_shrink_lv': bigboot_execute_shrink_lv,
|
|
||||||
'bigboot_adjacent_lvm_device': bigboot_adjacent_lvm_device,
|
- name: Perform logical volume and boot parition resizing as needed
|
||||||
'bigboot_lv_shrink_size': bigboot_lv_shrink_size | int,
|
hosts: all
|
||||||
'bigboot_size': bigboot_size,
|
become: true
|
||||||
'bigboot_skip_rear_backup': bigboot_skip_rear | default('false')
|
gather_facts: true
|
||||||
}
|
strategy: free
|
||||||
})}}"
|
|
||||||
|
vars_files:
|
||||||
|
- bigboot_vars.yml
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Perform service and filesystem checks prior to Bigboot execution
|
||||||
|
when:
|
||||||
|
- (bigboot_execute_shrink_lv | bool or bigboot_execute_bigboot | bool)
|
||||||
|
block:
|
||||||
|
# - name: Check for and disable services exceeding the timeout threshold
|
||||||
|
# ansible.builtin.import_tasks: tasks/check_systemd_services.yml
|
||||||
|
|
||||||
|
- name: Enable Grub filesystem check
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: autofsck
|
||||||
|
tasks_from: main.yml
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
|
# Make sure to update the reboot code for the WF environment
|
||||||
|
- name: Reboot to run filesystem checks
|
||||||
|
ansible.builtin.reboot:
|
||||||
|
|
||||||
|
- name: Disable Grub filesystem check
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: autofsck
|
||||||
|
tasks_from: cleanup.yml
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
|
|
||||||
|
- name: Extend the timeout values for physical hosts
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
initramfs_post_reboot_delay: 300
|
||||||
|
initramfs_reboot_timeout: 14400
|
||||||
|
when:
|
||||||
|
- "'host' in ansible_virtualization_role"
|
||||||
|
|
||||||
|
- name: Shrink the logical volume to support /boot expansion
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg:
|
||||||
|
- "device: {{ bigboot_adjacent_lvm_device }}"
|
||||||
|
- "size : {{ bigboot_lv_shrink_size | int }}"
|
||||||
|
when:
|
||||||
|
- bigboot_execute_shrink_lv | bool
|
||||||
|
|
||||||
|
- name: Expand the /boot partition as requested
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ bigboot_size }}"
|
||||||
|
when:
|
||||||
|
- bigboot_execute_bigboot | bool
|
||||||
|
|
||||||
|
# - name: Re-enabling services previously disabled
|
||||||
|
# ansible.builtin.service:
|
||||||
|
# name: "{{ item }}"
|
||||||
|
# state: started
|
||||||
|
# enabled: true
|
||||||
|
# loop: "{{ bigboot_systemd_disabled_services }}"
|
||||||
|
# when:
|
||||||
|
# - bigboot_systemd_disabled_services is defined
|
||||||
|
# - bigboot_systemd_disabled_services | length > 0
|
||||||
|
@ -9,10 +9,33 @@
|
|||||||
- bigboot_vars.yml
|
- bigboot_vars.yml
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Perform filesystem check prior to Bigboot execution
|
- name: Perform service and filesystem checks prior to Bigboot execution
|
||||||
ansible.builtin.import_tasks: tasks/grub_filesystem_check.yml
|
|
||||||
when:
|
when:
|
||||||
- bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool
|
- (bigboot_execute_shrink_lv | bool or bigboot_execute_bigboot | bool)
|
||||||
|
block:
|
||||||
|
# - name: Check for and disable services exceeding the timeout threshold
|
||||||
|
# ansible.builtin.import_tasks: tasks/check_systemd_services.yml
|
||||||
|
|
||||||
|
- name: Enable Grub filesystem check
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: autofsck
|
||||||
|
tasks_from: main.yml
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
|
# Make sure to update the reboot code for the WF environment
|
||||||
|
- name: Reboot to run filesystem checks
|
||||||
|
ansible.builtin.reboot:
|
||||||
|
|
||||||
|
- name: Disable Grub filesystem check
|
||||||
|
ansible.builtin.import_role:
|
||||||
|
name: autofsck
|
||||||
|
tasks_from: cleanup.yml
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
|
|
||||||
- name: Extend the timeout values for physical hosts
|
- name: Extend the timeout values for physical hosts
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@ -26,18 +49,23 @@
|
|||||||
name: infra.lvm_snapshots.shrink_lv
|
name: infra.lvm_snapshots.shrink_lv
|
||||||
vars:
|
vars:
|
||||||
shrink_lv_devices:
|
shrink_lv_devices:
|
||||||
- device: "{{ bigboot_data[inventory_hostname]['bigboot_adjacent_lvm_device'] }}"
|
- device: "{{ bigboot_adjacent_lvm_device }}"
|
||||||
size: "{{ bigboot_data[inventory_hostname]['bigboot_lv_shrink_size'] | int }}"
|
size: "{{ bigboot_lv_shrink_size | int }}"
|
||||||
when:
|
when:
|
||||||
- bigboot_data[inventory_hostname]['bigboot_execute_shrink_lv'] | bool
|
- bigboot_execute_shrink_lv | bool
|
||||||
|
|
||||||
- name: Expand the /boot partition as requested
|
- name: Expand the /boot partition as requested
|
||||||
ansible.builtin.import_role:
|
ansible.builtin.import_role:
|
||||||
name: infra.lvm_snapshots.bigboot
|
name: infra.lvm_snapshots.bigboot
|
||||||
vars:
|
|
||||||
bigboot_size: "{{ bigboot_data[inventory_hostname]['bigboot_size'] }}"
|
|
||||||
when:
|
when:
|
||||||
- bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | bool
|
- bigboot_execute_bigboot | bool
|
||||||
|
|
||||||
- name: Restore service state for disabled services
|
# - name: Re-enabling services previously disabled
|
||||||
ansible.builtin.import_tasks: tasks/restore_services.yml
|
# ansible.builtin.service:
|
||||||
|
# name: "{{ item }}"
|
||||||
|
# state: started
|
||||||
|
# enabled: true
|
||||||
|
# loop: "{{ bigboot_systemd_disabled_services }}"
|
||||||
|
# when:
|
||||||
|
# - bigboot_systemd_disabled_services is defined
|
||||||
|
# - bigboot_systemd_disabled_services | length > 0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Perform a ReaR backup before the /boot expansion
|
- name: Perform a ReaR backup if any disk modifications are to be made
|
||||||
ansible.builtin.import_playbook: rhc.rear.rear_backup
|
ansible.builtin.import_playbook: rhc.rear.rear_backup
|
||||||
when:
|
when:
|
||||||
- bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool
|
- bigboot_execute_bigboot | default('false') | bool
|
||||||
- not rear_backup_skip | default(false) | bool
|
- not bigboot_skip_rear_backup | default('true') | bool
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
- 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'] | default(false) | bool
|
|
||||||
- not rear_backup_skip | default(false) | bool
|
|
||||||
|
|
@ -12,35 +12,22 @@
|
|||||||
- name: Cleanup from any previous executions
|
- name: Cleanup from any previous executions
|
||||||
ansible.builtin.import_tasks: tasks/cleanup.yml
|
ansible.builtin.import_tasks: tasks/cleanup.yml
|
||||||
|
|
||||||
- name: Check for services that require being disabled
|
- name: Capture boot device details
|
||||||
ansible.builtin.import_tasks: tasks/check_services.yml
|
|
||||||
|
|
||||||
- name: Set boot device details
|
|
||||||
ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml
|
ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml
|
||||||
|
|
||||||
- name: Set logical volume information
|
- name: Capture logical volume information
|
||||||
ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml
|
ansible.builtin.import_tasks: tasks/capture_lv_device_details.yml
|
||||||
|
|
||||||
- name: Run pre-checks to verify environment
|
|
||||||
ansible.builtin.import_tasks: tasks/pre-checks.yml
|
|
||||||
when:
|
|
||||||
- bigboot_execute_bigboot | bool
|
|
||||||
|
|
||||||
- name: Set environment for subsequent workflow nodes
|
- name: Set environment for subsequent workflow nodes
|
||||||
ansible.builtin.set_stats:
|
ansible.builtin.set_stats:
|
||||||
aggregate: true
|
|
||||||
data:
|
data:
|
||||||
bigboot_data: "{{ bigboot_data | default({}) |
|
bigboot_execute_bigboot: "{{ bigboot_execute_bigboot }}"
|
||||||
combine({inventory_hostname:
|
bigboot_execute_shrink_lv: "{{ bigboot_execute_shrink_lv }}"
|
||||||
{
|
bigboot_adjacent_lvm_device: "{{ bigboot_adjacent_lvm_device }}"
|
||||||
'bigboot_execute_bigboot': bigboot_execute_bigboot,
|
bigboot_lv_shrink_size: "{{ bigboot_lv_shrink_size | int }}"
|
||||||
'bigboot_execute_shrink_lv': bigboot_execute_shrink_lv,
|
bigboot_partition_size: "{{ bigboot_partition_size }}"
|
||||||
'bigboot_adjacent_lvm_device': bigboot_adjacent_lvm_device,
|
bigboot_skip_rear_backup: "{{ bigboot_skip_rear | default('false') }}"
|
||||||
'bigboot_lv_shrink_size': bigboot_lv_shrink_size | int,
|
per_host: false
|
||||||
'bigboot_size': bigboot_size,
|
aggregate: false
|
||||||
'ip_addresses': ansible_all_ipv4_addresses,
|
|
||||||
'server_hostname': ansible_hostname
|
|
||||||
}
|
|
||||||
}) }}"
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensure service facts are available
|
|
||||||
ansible.builtin.service_facts:
|
|
||||||
|
|
||||||
- name: Capture a list of running services
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
bigboot_systemd_running_services:
|
|
||||||
"{{ bigboot_systemd_running_services | default([]) + [item['key']] }}"
|
|
||||||
loop: "{{ ansible_facts['services'] | dict2items }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item['key'] }}"
|
|
||||||
when:
|
|
||||||
- "'running' in item['value']['state']"
|
|
||||||
|
|
||||||
- name: Get the stop timeout value for running services
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: |
|
|
||||||
set -o pipefail
|
|
||||||
systemctl show {{ item }} | grep TimeoutStopUSec
|
|
||||||
changed_when: false
|
|
||||||
register: bigboot_systemd_service_timeout
|
|
||||||
loop: "{{ bigboot_systemd_running_services }}"
|
|
||||||
|
|
||||||
- name: Adding services exceeding the timeout threshold to the list of services to disable
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
bigboot_services_disabled: "{{ bigboot_services_disabled | default([]) + [item['item']] }}"
|
|
||||||
loop: "{{ bigboot_systemd_service_timeout['results'] }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item['item'] }}"
|
|
||||||
when:
|
|
||||||
- item['item'] not in bigboot_protected_services
|
|
||||||
- item['stdout'] | regex_replace('^.*=(.*$)', '\\1') | community.general.to_minutes >= bigboot_service_max_timeout | int
|
|
||||||
|
|
||||||
- name: Adding incompatible services to the list of services to disable
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
bigboot_services_disabled: "{{ bigboot_services_disabled | default([]) + [item] }}"
|
|
||||||
loop: "{{ bigboot_incompatible_services }}"
|
|
||||||
when:
|
|
||||||
- ansible_facts['services'][item] is defined
|
|
||||||
- ansible_facts['services'][item]['state'] == "running"
|
|
||||||
|
|
||||||
- name: Log and disable services
|
|
||||||
when:
|
|
||||||
- bigboot_services_disabled is defined
|
|
||||||
- bigboot_services_disabled | length > 0
|
|
||||||
block:
|
|
||||||
- name: Disable services and log their state
|
|
||||||
ansible.builtin.include_tasks: tasks/disable_systemd_services.yml
|
|
||||||
loop: "{{ bigboot_services_disabled }}"
|
|
||||||
|
|
||||||
- name: Services disabled notice
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: >-
|
|
||||||
The following services were disabled, and will be re-enabled post
|
|
||||||
Bigboot execution: {{ bigboot_services_disabled | join(', ') }}
|
|
||||||
|
|
31
tasks/check_systemd_services.yml
Normal file
31
tasks/check_systemd_services.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
- name: Get the list of services on the host
|
||||||
|
ansible.builtin.service_facts:
|
||||||
|
|
||||||
|
- name: Capture a list of running services
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
bigboot_systemd_running_services:
|
||||||
|
"{{ bigboot_systemd_running_services | default([]) + [item['key']] }}"
|
||||||
|
loop: "{{ ansible_facts['services'] | dict2items }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item['key'] }}"
|
||||||
|
when:
|
||||||
|
- "'running' in item['value']['state']"
|
||||||
|
|
||||||
|
- name: Get the stop timeout value for running services
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: |
|
||||||
|
set -o pipefail
|
||||||
|
systemctl show {{ item }} | grep TimeoutStopUSec
|
||||||
|
changed_when: false
|
||||||
|
register: bigboot_systemd_service_timeout
|
||||||
|
loop: "{{ bigboot_systemd_running_services }}"
|
||||||
|
|
||||||
|
- name: Disabling services exceeding the timeout threshold
|
||||||
|
ansible.builtin.include_tasks: tasks/disable_systemd_services.yml
|
||||||
|
loop: "{{ bigboot_systemd_service_timeout['results'] }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item['item'] }}"
|
||||||
|
when:
|
||||||
|
- item['item'] not in bigboot_protected_services
|
||||||
|
- item['stdout'] | regex_replace('^.*=(.*$)', '\\1') | community.general.to_minutes > bigboot_service_max_timeout
|
@ -29,14 +29,4 @@
|
|||||||
path: "/boot/initramfs-{{ initramfs_kernel_version }}.img.{{ initramfs_backup_extension }}"
|
path: "/boot/initramfs-{{ initramfs_kernel_version }}.img.{{ initramfs_backup_extension }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Check for Bigboot state log and restore services to pre-Bigboot state
|
|
||||||
ansible.builtin.import_tasks: tasks/restore_services.yml
|
|
||||||
|
|
||||||
- name: Cleanup previous Bigboot state log if present
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ bigboot_disabled_services_log }}"
|
|
||||||
state: absent
|
|
||||||
when:
|
|
||||||
- bigboot_disabled_services_log_stat['stat']['exists'] | bool
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -1,23 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: "Save service state: {{ item }}"
|
- name: Disabling service for exceeding the timeout threshold
|
||||||
ansible.builtin.set_fact:
|
|
||||||
bigboot_service_to_disable:
|
|
||||||
service: "{{ ansible_facts['services'][item]['name'] }}"
|
|
||||||
state: "{{ (ansible_facts['services'][item]['state'] == 'running') | ternary('started', 'stopped') }}"
|
|
||||||
status: "{{ (ansible_facts['services'][item]['status'] == 'enabled') | ternary('true', 'false') }}"
|
|
||||||
|
|
||||||
- name: "Disable and stop service: {{ item }}"
|
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: "{{ item }}"
|
name: "{{ item['item'] }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- name: "Log disabled service state: {{ item }}"
|
- name: Append service to list of disabled services
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.set_fact:
|
||||||
path: "{{ bigboot_disabled_services_log }}"
|
bigboot_systemd_disabled_services:
|
||||||
line: "{{ item }},{{ bigboot_service_to_disable['state'] }},{{ bigboot_service_to_disable['status'] }}"
|
"{{ bigboot_systemd_disabled_services | default([]) + [item['item']] }}"
|
||||||
create: true
|
|
||||||
state: present
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0600"
|
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Enable Grub filesystem check
|
|
||||||
ansible.builtin.import_role:
|
|
||||||
name: autofsck
|
|
||||||
tasks_from: main.yml
|
|
||||||
|
|
||||||
- name: Flush handlers to add Grub parameters for fsck
|
|
||||||
ansible.builtin.meta: flush_handlers
|
|
||||||
|
|
||||||
# Make sure to update the reboot code for the WF environment
|
|
||||||
# - name: Reboot to run filesystem checks
|
|
||||||
# ansible.builtin.reboot:
|
|
||||||
|
|
||||||
- name: Reboot to run filesystem checks
|
|
||||||
ansible.builtin.command: /sbin/shutdown -r +1
|
|
||||||
|
|
||||||
- name: Wait for the reboot to complete
|
|
||||||
ansible.builtin.wait_for_connection:
|
|
||||||
connect_timeout: 20
|
|
||||||
sleep: 10
|
|
||||||
delay: "{{ bigboot_post_reboot_delay | default('70') }}"
|
|
||||||
timeout: "{{ bigboot_reboot_timeout | default('1800') }}"
|
|
||||||
|
|
||||||
- name: Disable Grub filesystem check
|
|
||||||
ansible.builtin.import_role:
|
|
||||||
name: autofsck
|
|
||||||
tasks_from: cleanup.yml
|
|
||||||
|
|
||||||
- name: Flush handlers to remove Grub parameters for fsck
|
|
||||||
ansible.builtin.meta: flush_handlers
|
|
@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Get /boot mount information
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
bigboot_boot_mount: "{{ ansible_facts.mounts \
|
|
||||||
| selectattr('mount', 'equalto', '/boot') | first }}"
|
|
||||||
|
|
||||||
- name: Set next partition after /boot
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
bigboot_next_device: "{{ bigboot_boot_mount['device'][:-1] }}{{ bigboot_boot_mount['device'][-1:] | int + 1 }}"
|
|
||||||
|
|
||||||
- name: Capture partition information from fdisk
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: |
|
|
||||||
set -o pipefail
|
|
||||||
fdisk -l {{ bigboot_boot_mount['device'][:-1] }} | grep '{{ bigboot_next_device }}'
|
|
||||||
executable: /bin/bash
|
|
||||||
changed_when: false
|
|
||||||
failed_when: bigboot_fdisk_partition['rc'] not in [0, 141]
|
|
||||||
register: bigboot_fdisk_partition
|
|
||||||
|
|
||||||
- name: Debug bigboot_fdisk_partition
|
|
||||||
ansible.builtin.debug:
|
|
||||||
var: bigboot_fdisk_partition
|
|
||||||
|
|
||||||
- name: Assert that the partition following /boot is of type LVM
|
|
||||||
ansible.builtin.assert:
|
|
||||||
that: "'Linux LVM' in bigboot_fdisk_partition['stdout']"
|
|
||||||
success_msg: The partition following /boot is an LVM partition
|
|
||||||
fail_msg: The partition following /boot is NOT an LVM partition. Execution halted.
|
|
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Create list of IP addresses and hostnames
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
client_ips: "{{ item['value']['ip_addresses'] | list | flatten }}"
|
|
||||||
namehost: "{{ item['value']['server_hostname'] }}"
|
|
||||||
|
|
||||||
- name: Include NFS export role
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: rhc.rear.say_hi
|
|
@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Check for Bigboot service state log presence
|
|
||||||
ansible.builtin.stat:
|
|
||||||
path: "{{ bigboot_disabled_services_log }}"
|
|
||||||
register: bigboot_disabled_services_log_stat
|
|
||||||
|
|
||||||
- name: Read state log and restore service state
|
|
||||||
when:
|
|
||||||
- bigboot_disabled_services_log_stat['stat']['exists'] | bool
|
|
||||||
block:
|
|
||||||
- name: Read service state from log
|
|
||||||
community.general.read_csv:
|
|
||||||
path: "{{ bigboot_disabled_services_log }}"
|
|
||||||
fieldnames: service,state,enabled
|
|
||||||
delimiter: ','
|
|
||||||
register: bigboot_service_state_contents
|
|
||||||
|
|
||||||
- name: Restore service state
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: "{{ item['service'] }}"
|
|
||||||
state: "{{ item['state'] }}"
|
|
||||||
enabled: "{{ item['enabled'] | bool }}"
|
|
||||||
loop: "{{ bigboot_service_state_contents['list'] }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item['service'] }}"
|
|
@ -8,22 +8,11 @@ bigboot_reboot_timeout: 1800
|
|||||||
|
|
||||||
bigboot_skip_rear_backup: false
|
bigboot_skip_rear_backup: false
|
||||||
|
|
||||||
# Max value in minutes for services timeout threshold:
|
# Max value in minutes for the timeout threshold:
|
||||||
bigboot_service_max_timeout: 5
|
bigboot_service_max_timeout: 2
|
||||||
|
|
||||||
# List of services incompatible with calculations
|
|
||||||
# to obtain required disk information:
|
|
||||||
#
|
|
||||||
# (These services will ALWAYS be disabled)
|
|
||||||
bigboot_incompatible_services:
|
|
||||||
- docker.service
|
|
||||||
- named-chroot.service
|
|
||||||
|
|
||||||
# List of services which will be excluded from being
|
# List of services which will be excluded from being
|
||||||
# disabled during Bigboot execution:
|
# disabled during Bigboot execution:
|
||||||
#
|
|
||||||
# (Services listed in `bigboot_incompatible_services`
|
|
||||||
# will ALWAYS be disabled regardless if they are protected or not)
|
|
||||||
bigboot_protected_services:
|
bigboot_protected_services:
|
||||||
- sshd.service
|
- sshd.service
|
||||||
- user@0.service
|
- user@0.service
|
||||||
@ -31,7 +20,3 @@ bigboot_protected_services:
|
|||||||
- rhnsd.service
|
- rhnsd.service
|
||||||
- rhnsd
|
- rhnsd
|
||||||
- boksm.service
|
- boksm.service
|
||||||
- SplunkForwarder.service
|
|
||||||
|
|
||||||
# Filename of disabled services log:
|
|
||||||
bigboot_disabled_services_log: /var/ipe/ipu/el7to8/bigboot_disabled_services.log
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user