adding additional demos

This commit is contained in:
ipvsean
2020-03-12 13:23:01 -04:00
parent 014efcd558
commit 851173e853
4 changed files with 96 additions and 0 deletions

View File

@@ -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 }}"

View 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]

View 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

View 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