Add cloud and patching demos (#9)
Add demos for cloud provisioning and patching
This commit is contained in:
@@ -1,20 +1,38 @@
|
||||
---
|
||||
- name: Apply Non-kernel Updates
|
||||
hosts: "{{ HOSTS }}"
|
||||
become: true
|
||||
|
||||
- hosts: "{{ HOSTS }}"
|
||||
become: yes
|
||||
vars:
|
||||
report_server: node1
|
||||
|
||||
tasks:
|
||||
- name: upgrade all packages except kernel
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
exclude: kernel*
|
||||
tags: all
|
||||
- include_role:
|
||||
name: demo.patching.patch_linux
|
||||
|
||||
- name: upgrade all packages security related except kernel
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
security: true
|
||||
exclude: kernel*
|
||||
tags: security
|
||||
- block:
|
||||
- yum:
|
||||
name: httpd
|
||||
state: latest
|
||||
check_mode: no
|
||||
|
||||
- file:
|
||||
path: /var/www/html/reports/
|
||||
state: directory
|
||||
check_mode: no
|
||||
|
||||
- copy:
|
||||
dest: /var/www/html/reports/.htaccess
|
||||
content: Options +Indexes
|
||||
check_mode: no
|
||||
|
||||
- service:
|
||||
name: httpd
|
||||
state: started
|
||||
check_mode: no
|
||||
|
||||
- include_role:
|
||||
name: demo.patching.report_linux
|
||||
|
||||
- include_role:
|
||||
name: demo.patching.report_linux_patching
|
||||
delegate_to: "{{ report_server }}"
|
||||
run_once: yes
|
||||
38
linux/patching_report.yml
Normal file
38
linux/patching_report.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
- hosts: "{{ HOSTS }}"
|
||||
become: yes
|
||||
vars:
|
||||
report_server: node1
|
||||
|
||||
tasks:
|
||||
- include_role:
|
||||
name: demo.patching.patch_linux
|
||||
|
||||
- block:
|
||||
- yum:
|
||||
name: httpd
|
||||
state: latest
|
||||
check_mode: no
|
||||
|
||||
- file:
|
||||
path: /var/www/html/reports/
|
||||
state: directory
|
||||
check_mode: no
|
||||
|
||||
- copy:
|
||||
dest: /var/www/html/reports/.htaccess
|
||||
content: Options +Indexes
|
||||
check_mode: no
|
||||
|
||||
- service:
|
||||
name: httpd
|
||||
state: started
|
||||
check_mode: no
|
||||
|
||||
- include_role:
|
||||
name: demo.patching.report_linux
|
||||
|
||||
- include_role:
|
||||
name: demo.patching.report_linux_patching
|
||||
delegate_to: "{{ report_server }}"
|
||||
run_once: yes
|
||||
@@ -134,6 +134,8 @@ controller_templates:
|
||||
playbook: "linux/patching.yml"
|
||||
execution_environment: Default execution environment
|
||||
use_fact_cache: true
|
||||
job_type: check
|
||||
ask_job_type_on_launch: yes
|
||||
credentials:
|
||||
- "Workshop Credential"
|
||||
survey_enabled: true
|
||||
|
||||
Reference in New Issue
Block a user