More shufflin ¯\_(ツ)_/¯

This commit is contained in:
Chris Hammer 2024-07-30 18:05:08 -04:00
parent fad845dd1d
commit 4ca8d421e2
3 changed files with 28 additions and 32 deletions

View File

@ -14,20 +14,6 @@
- (bigboot_data[inventory_hostname]['bigboot_execute_shrink_lv'] | default(false) | bool
or bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | default(false) | bool)
block:
- name: Check for and disable services exceeding the timeout threshold
ansible.builtin.import_tasks: tasks/check_systemd_services.yml
- name: Services disabled notice
ansible.builtin.debug:
msg: >-
The following services were disabled, and will be re-enabled post
Bigboot execution:
{{ bigboot_systemd_disabled_services | list | flatten }}
when:
- bigboot_systemd_disabled_services is defined
- bigboot_systemd_disabled_services | length > 0
- name: Enable Grub filesystem check
ansible.builtin.import_role:
name: autofsck
@ -48,6 +34,21 @@
- 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: Services disabled notice
ansible.builtin.debug:
msg: >-
The following services were disabled, and will be re-enabled post
Bigboot execution: {{ bigboot_systemd_disabled_services | join(',') }}
when:
- bigboot_systemd_disabled_services is defined
- bigboot_systemd_disabled_services | length > 0
- name: Stop Docker service if present and running
ansible.builtin.import_tasks: tasks/stop_docker_service.yml
- name: Extend the timeout values for physical hosts
ansible.builtin.set_fact:
@ -83,11 +84,3 @@
when:
- bigboot_systemd_disabled_services is defined
- bigboot_systemd_disabled_services | length > 0
- name: Restore Docker service to its previous running state
ansible.builtin.service:
name: docker.service
state: started
when:
- ansible_facts['services'][bigboot_docker_service] is defined
- ansible_facts['services'][bigboot_docker_service]['state'] == "running"

View File

@ -12,16 +12,8 @@
- name: Cleanup from any previous executions
ansible.builtin.import_tasks: tasks/cleanup.yml
- name: Ensure service facts are available
ansible.builtin.service_facts:
- name: Stop Docker service due to incompatibility
ansible.builtin.service:
name: "{{ bigboot_docker_service }}"
state: stopped
when:
- ansible_facts['services'][bigboot_docker_service] is defined
- ansible_facts['services'][bigboot_docker_service]['state'] == "running"
- name: Stop Docker service if present and running
ansible.builtin.import_tasks: tasks/stop_docker_service.yml
- name: Set boot device details
ansible.builtin.import_tasks: tasks/capture_boot_device_details.yml

View File

@ -0,0 +1,11 @@
---
- name: Ensure service facts are available
ansible.builtin.service_facts:
- name: Stop Docker service due to incompatibility
ansible.builtin.service:
name: "{{ bigboot_docker_service }}"
state: stopped
when:
- ansible_facts['services'][bigboot_docker_service] is defined
- ansible_facts['services'][bigboot_docker_service]['state'] == "running"