Issue 52 (#53)
* add fact scan * add fact scan * update patching role * dont ask limit * add become
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Scan packages
|
- name: get packages
|
||||||
demo.patching.scan_packages:
|
ansible.builtin.package_facts:
|
||||||
os_family: "{{ ansible_os_family }}"
|
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: Scan services
|
- name: get services
|
||||||
demo.patching.scan_services:
|
ansible.builtin.service_facts:
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: upgrade packages (yum)
|
- name: upgrade packages (yum)
|
||||||
@@ -35,4 +34,4 @@
|
|||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
when:
|
when:
|
||||||
- result.rc == 1
|
- result.rc == 1
|
||||||
- allow_reboot == true
|
- allow_reboot == true
|
||||||
|
|||||||
12
linux/fact_scan.yml
Normal file
12
linux/fact_scan.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- hosts: "{{ HOSTS }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: get packages
|
||||||
|
ansible.builtin.package_facts:
|
||||||
|
|
||||||
|
- name: get services
|
||||||
|
ansible.builtin.service_facts:
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: "{{ HOSTS }}"
|
- hosts: "{{ HOSTS }}"
|
||||||
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
service_name: undef
|
service_name: undef
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: "{{ HOSTS }}"
|
- hosts: "{{ HOSTS }}"
|
||||||
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
service_name: undef
|
service_name: undef
|
||||||
|
|
||||||
@@ -11,4 +12,4 @@
|
|||||||
service:
|
service:
|
||||||
name: "{{ service_name }}"
|
name: "{{ service_name }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
when: service_name + '.service' in services
|
when: service_name + '.service' in services
|
||||||
|
|||||||
@@ -10,12 +10,6 @@ controller_components:
|
|||||||
- inventory_sources
|
- inventory_sources
|
||||||
- job_templates
|
- job_templates
|
||||||
|
|
||||||
controller_projects:
|
|
||||||
- name: Fact Scan
|
|
||||||
organization: Default
|
|
||||||
scm_type: git
|
|
||||||
scm_url: 'https://github.com/ansible/awx-facts-playbooks.git'
|
|
||||||
|
|
||||||
controller_credential_types:
|
controller_credential_types:
|
||||||
- name: "Insights Collection"
|
- name: "Insights Collection"
|
||||||
kind: cloud
|
kind: cloud
|
||||||
@@ -233,16 +227,24 @@ controller_templates:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
- name: "LINUX / Fact Scan"
|
- name: "LINUX / Fact Scan"
|
||||||
project: Fact Scan
|
project: "Ansible official demo project"
|
||||||
playbook: scan_facts.yml
|
playbook: linux/fact_scan.yml
|
||||||
inventory: Workshop Inventory
|
inventory: Workshop Inventory
|
||||||
notification_templates_started: Telemetry
|
notification_templates_started: Telemetry
|
||||||
notification_templates_success: Telemetry
|
notification_templates_success: Telemetry
|
||||||
notification_templates_error: Telemetry
|
notification_templates_error: Telemetry
|
||||||
ask_limit_on_launch: true
|
|
||||||
use_fact_cache: true
|
use_fact_cache: true
|
||||||
credentials:
|
credentials:
|
||||||
- Workshop Credential
|
- Workshop Credential
|
||||||
|
survey_enabled: true
|
||||||
|
survey:
|
||||||
|
name: ''
|
||||||
|
description: ''
|
||||||
|
spec:
|
||||||
|
- question_name: Server Name or Pattern
|
||||||
|
type: text
|
||||||
|
variable: HOSTS
|
||||||
|
required: true
|
||||||
|
|
||||||
- name: "LINUX / Podman Webserver"
|
- name: "LINUX / Podman Webserver"
|
||||||
job_type: run
|
job_type: run
|
||||||
|
|||||||
Reference in New Issue
Block a user