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
|
||||
demo.patching.scan_packages:
|
||||
os_family: "{{ ansible_os_family }}"
|
||||
- name: get packages
|
||||
ansible.builtin.package_facts:
|
||||
check_mode: no
|
||||
|
||||
- name: Scan services
|
||||
demo.patching.scan_services:
|
||||
- name: get services
|
||||
ansible.builtin.service_facts:
|
||||
check_mode: no
|
||||
|
||||
- name: upgrade packages (yum)
|
||||
@@ -35,4 +34,4 @@
|
||||
ansible.builtin.reboot:
|
||||
when:
|
||||
- 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 }}"
|
||||
become: yes
|
||||
vars:
|
||||
service_name: undef
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- hosts: "{{ HOSTS }}"
|
||||
become: yes
|
||||
vars:
|
||||
service_name: undef
|
||||
|
||||
@@ -11,4 +12,4 @@
|
||||
service:
|
||||
name: "{{ service_name }}"
|
||||
state: stopped
|
||||
when: service_name + '.service' in services
|
||||
when: service_name + '.service' in services
|
||||
|
||||
@@ -10,12 +10,6 @@ controller_components:
|
||||
- inventory_sources
|
||||
- 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:
|
||||
- name: "Insights Collection"
|
||||
kind: cloud
|
||||
@@ -233,16 +227,24 @@ controller_templates:
|
||||
required: true
|
||||
|
||||
- name: "LINUX / Fact Scan"
|
||||
project: Fact Scan
|
||||
playbook: scan_facts.yml
|
||||
project: "Ansible official demo project"
|
||||
playbook: linux/fact_scan.yml
|
||||
inventory: Workshop Inventory
|
||||
notification_templates_started: Telemetry
|
||||
notification_templates_success: Telemetry
|
||||
notification_templates_error: Telemetry
|
||||
ask_limit_on_launch: true
|
||||
use_fact_cache: true
|
||||
credentials:
|
||||
- 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"
|
||||
job_type: run
|
||||
|
||||
Reference in New Issue
Block a user