adding additional demos
This commit is contained in:
@@ -20,6 +20,16 @@
|
||||
mode: 0640
|
||||
content: "{{ sudo_user }} ALL=(ALL) NOPASSWD:ALL"
|
||||
|
||||
- name: install package
|
||||
yum:
|
||||
name: at
|
||||
state: latest
|
||||
|
||||
- name: start service
|
||||
service:
|
||||
name: atd
|
||||
state: started
|
||||
|
||||
- name: time based cleanup
|
||||
at:
|
||||
command: "rm /etc/sudoers.d/{{ sudo_user }}"
|
||||
|
||||
30
playbooks/06_debug_info.yml
Normal file
30
playbooks/06_debug_info.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: gather debug info
|
||||
hosts: "{{ HOSTS | default('all') }}"
|
||||
become: yes
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: Gather recent vmstat info
|
||||
command: /bin/vmstat 1 5
|
||||
register: vmstat
|
||||
|
||||
- name: Gather top CPU hogs
|
||||
command: ps -eo user,pid,size,pcpu,cmd --sort=-pcpu
|
||||
register: pscpu
|
||||
|
||||
- name: Gather top memory hogs
|
||||
command: ps -eo user,pid,size,pcpu,cmd --sort=-size
|
||||
register: pssize
|
||||
|
||||
- name: Swap + wait states
|
||||
debug:
|
||||
var: vmstat.stdout_lines
|
||||
|
||||
- name: Top 3 CPU hogs
|
||||
debug:
|
||||
var: pscpu.stdout_lines[:4]
|
||||
|
||||
- name: Top 3 memory hogs
|
||||
debug:
|
||||
var: pssize.stdout_lines[:4]
|
||||
28
playbooks/group_vars/all/06_debug_info.yml
Normal file
28
playbooks/group_vars/all/06_debug_info.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
fact_scan:
|
||||
author: "Will Tome"
|
||||
category: infrastructure
|
||||
name: "SERVER / Gather Debug Info"
|
||||
description: "provide info for memory and CPU usage for specified systems"
|
||||
job_type: "run"
|
||||
inventory: "Workshop Inventory"
|
||||
playbook: playbooks/06_debug_info.yml
|
||||
credential: "Workshop Credential"
|
||||
survey_enabled: yes
|
||||
survey_spec:
|
||||
name: ''
|
||||
description: ''
|
||||
spec:
|
||||
- question_name: 'Enter host to configure'
|
||||
type: text
|
||||
variable: HOSTS
|
||||
required: false
|
||||
project:
|
||||
name: "Ansible official demo project"
|
||||
description: "prescriptive demos from Red Hat Management Buisness Unit"
|
||||
organization: "Default"
|
||||
scm_type: git
|
||||
scm_url: "https://github.com/ansible/product-demos"
|
||||
workshop_type:
|
||||
- f5
|
||||
- rhel
|
||||
28
playbooks/group_vars/all/07_security_patching.yml
Normal file
28
playbooks/group_vars/all/07_security_patching.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
fact_scan:
|
||||
author: "Will Tome"
|
||||
category: infrastructure
|
||||
name: "SERVER / Security Patching"
|
||||
description: "upgrade all yum packages for security related except kernel"
|
||||
job_type: "run"
|
||||
inventory: "Workshop Inventory"
|
||||
playbook: playbooks/02_patching.yml
|
||||
credential: "Workshop Credential"
|
||||
survey_enabled: yes
|
||||
survey_spec:
|
||||
name: ''
|
||||
description: ''
|
||||
spec:
|
||||
- question_name: 'Enter host to configure'
|
||||
type: text
|
||||
variable: HOSTS
|
||||
required: false
|
||||
project:
|
||||
name: "Ansible official demo project"
|
||||
description: "prescriptive demos from Red Hat Management Buisness Unit"
|
||||
organization: "Default"
|
||||
scm_type: git
|
||||
scm_url: "https://github.com/ansible/product-demos"
|
||||
workshop_type:
|
||||
- f5
|
||||
- rhel
|
||||
Reference in New Issue
Block a user