Move develop into main #2

Merged
chris merged 53 commits from develop into main 2024-07-11 21:41:45 -04:00
3 changed files with 46 additions and 42 deletions
Showing only changes of commit e176c76638 - Show all commits

View File

@ -33,15 +33,33 @@
strategy: free
tasks:
- name: Add Grub menu parameters for fsck
ansible.builtin.import_role:
name: autofsck
tasks_from: main.yml
- name: Perform filesystem check prior to Bigboot execution
when:
- (bigboot_execute_shrink_lv | bool or bigboot_execute_bigboot | bool)
block:
- 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: Check for and disable services exceeding the timeout threshold
ansible.builtin.import_tasks: tasks/check_systemd_services.yml
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- name: Extend the timeout values for physical hosts
ansible.builtin.set_fact:
@ -64,22 +82,9 @@
when:
- bigboot_execute_bigboot | bool
# this reboot is just for *my* tesitng; at this point we'd have already
# rebooted at least once which would have ran the fsck
- name: Reboot the host
ansible.builtin.reboot:
msg: Reboot by Ansible
post_reboot_delay: 30
connect_timeout: 10
reboot_timeout: 120
when:
- (bigboot_execute_shrink_lv | bool or bigboot_execute_bigboot | bool)
- name: Cleanup Grub menu parameters for fsck
ansible.builtin.import_role:
name: autofsck
tasks_from: cleanup.yml
when:
- (bigboot_execute_shrink_lv | bool or bigboot_execute_bigboot | bool)
...
- name: Re-enabling services previously disabled
ansible.builtin.service:
name: "{{ item }}"
state: started
enabled: true
loop: "{{ bigboot_systemd_disabled_services }}"

View File

@ -33,6 +33,9 @@
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- name: Check for and disable services exceeding the timeout threshold
ansible.builtin.import_tasks: tasks/check_systemd_services.yml
- name: Extend the timeout values for physical hosts
ansible.builtin.set_fact:
@ -57,4 +60,9 @@
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 }}"

View File

@ -1,5 +1,5 @@
---
- name: Verify Middleware Apache package presence
- name: Get the list of services on the host
ansible.builtin.service_facts:
- name: Capture a list of running services
@ -12,7 +12,7 @@
when:
- "'running' in item['value']['state']"
- name: Get stop timeout value for running services
- name: Get the stop timeout value for running services
ansible.builtin.shell:
cmd: |
set -o pipefail
@ -21,20 +21,11 @@
register: bigboot_systemd_service_timeout
loop: "{{ bigboot_systemd_running_services }}"
- name: Disable services exceeding the timeout threshold
- 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
block:
- 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'] }}"
- name: Re-enabling services previously disabled
ansible.builtin.service:
name: "{{ item }}"
state: started
enabled: true
loop: "{{ bigboot_systemd_disabled_services }}"