yaml and ansible linting clean ups
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# tasks file for ensure_os_upgrade
|
||||
- name: include variables
|
||||
- name: Include Variables
|
||||
when: ["ansible_facts[\"system\"] == 'Linux'"]
|
||||
ansible.builtin.include_vars:
|
||||
file: '{{ lookup("first_found", findme) }}'
|
||||
@@ -21,17 +21,17 @@
|
||||
- default.yml
|
||||
paths: [../vars/]
|
||||
errors: ignore
|
||||
- name: package discovery
|
||||
- name: Package Discovery
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["packages"] is not defined
|
||||
ansible.builtin.package_facts:
|
||||
- name: service discovery
|
||||
- name: Service Discovery
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["services"] is not defined
|
||||
ansible.builtin.service_facts:
|
||||
- name: ensure packages
|
||||
- name: Ensure Packages
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ensure_os_upgrade is defined
|
||||
@@ -46,7 +46,7 @@
|
||||
notify:
|
||||
- ensure_os_upgrade.package_facts
|
||||
- ensure_os_upgrade.service_facts
|
||||
- name: ensure services
|
||||
- name: Ensure Services
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ensure_os_upgrade is defined
|
||||
@@ -62,7 +62,7 @@
|
||||
notify:
|
||||
- ensure_os_upgrade.package_facts
|
||||
- ensure_os_upgrade.service_facts
|
||||
- name: Ensure system-upgrade download
|
||||
- name: Ensure System-upgrade Download
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["distribution"] == 'Fedora'
|
||||
@@ -73,7 +73,7 @@
|
||||
- ansible_facts["distribution_major_version"]|int < ensure_os_upgrade.target_version|int
|
||||
ansible.builtin.shell: >
|
||||
dnf -y system-upgrade download --refresh --releasever={{ ensure_os_upgrade.target_version|int }}
|
||||
- name: Ensure system-upgrade reboot
|
||||
- name: Ensure System-upgrade Reboot
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["distribution"] == 'Fedora'
|
||||
@@ -86,7 +86,7 @@
|
||||
poll: 0
|
||||
ansible.builtin.shell: >
|
||||
sleep 5 && dnf -y system-upgrade reboot
|
||||
- name: Wait for the reboot
|
||||
- name: Wait For The Reboot
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["distribution"] == 'Fedora'
|
||||
@@ -105,10 +105,10 @@
|
||||
timeout: '1800'
|
||||
vars:
|
||||
ansible_connection: local
|
||||
- name: Gather facts
|
||||
- name: Gather Facts
|
||||
ansible.builtin.setup:
|
||||
notify:
|
||||
- ensure_os_upgrade.package_facts
|
||||
- ensure_os_upgrade.service_facts
|
||||
- name: flush handlers
|
||||
- name: Flush Handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
Reference in New Issue
Block a user