apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: '18'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for files in [ | |
{'cis': '5.3.3 Ensure password reuse is limited (Scored)', 'name': 'pwquality'}, | |
{'cis': '5.3.4 Ensure password hashing algorithm is SHA-512 (Scored)', 'name': 'unix'} | |
] | |
%} | |
{{ files.cis }}: | |
file.managed: | |
- source: salt://files/pam/{{files.name}} | |
- name: /usr/share/pam-configs/{{files.name}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Generate the report | |
uri: | |
method: GET | |
return_content: yes | |
status_code: 200 | |
user: "reporting_user" | |
password: "superduperpassword" | |
force_basic_auth: yes | |
url: "https://kibana.domain:5601{{ genreport.json.path }}" | |
dest: /tmp/test-max-cpu-stats-prod-wm.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"ansible_facts.disks": [ | |
{ | |
"bootable": true, | |
"bus_type": "SAS", | |
"clustered": false, | |
"firmware_version": "1.0 ", | |
"friendly_name": "VMware Virtual disk", | |
"guid": "{60c01450-65ba-4ecf-9049-f6e5a8e511db}", | |
"location": "SCSI0", | |
"manufacturer": "VMware ", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL : | |
https://kibana.domain.name:5601/api/reporting/generate/printablePdf?jobParams=(browserTimezone:America%2FToronto,layout:(id:print),objectType:dashboard,queryString:%27_a%3D(description:!%27!%27,filters:!!(),fullScreenMode:!!f,options:(darkTheme:!!f,hidePanelTitles:!!f,useMargins:!!t),panels:!!((gridData:(h:3,i:!%271!%27,w:6,x:0,y:0),id:!%27429a2060-fa0f-11e7-b9c9-f5587aa8afb7!%27,panelIndex:!%271!%27,type:visualization,version:!%276.1.1!%27),(gridData:(h:3,i:!%272!%27,w:6,x:6,y:0),id:!%2707f5a070-fa13-11e7-b9c9-f5587aa8afb7!%27,panelIndex:!%272!%27,type:visualization,version:!%276.1.1!%27),(gridData:(h:3,i:!%273!%27,w:6,x:0,y:3),id:!%27953aa2a0-fa13-11e7-b9c9-f5587aa8afb7!%27,panelIndex:!%273!%27,type:visualization,version:!%276.1.1!%27),(gridData:(h:3,i:!%274!%27,w:6,x:6,y:3),id:a5c408a0-fa13-11e7-b9c9-f5587aa8afb7,panelIndex:!%274!%27,type:visualization,version:!%276.1.1!%27),(gridData:(h:3,i:!%275!%27,w:6,x:0,y:6),id:f5ed6d30-fa13-11e7-b9c9-f5587aa8afb7,panelIndex:!%275!%27,type:visualization,versio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
#- hosts: en_utilisation:installed:&linux_red_hat:!production | |
- hosts: en_utilisation:installed:&sldadm* | |
- name: test for available disk space | |
assert: | |
that: | |
- not {{ item.mount == '/usr' and ( item.size_total <= 5368709120 ) }} | |
- not {{ item.mount == '/var' and ( item.size_total <= 5368709120 ) }} | |
msg: "{{ item.mount }} must be more than 5G" | |
with_items: "{{ ansible_mounts }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Monitoring Disk Usage | |
vars: | |
fstype: | |
- xfs | |
- ext4 | |
- ext3 | |
debug: msg="Adding Monitoring to {{ item.mount }}" | |
with_items: ansible_mounts | |
when: fstype in item.fstype |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if response_ncpa['root']['disk']['logical'][logical_disk]['fstype'] in ('xfs', 'ext3', 'ext4'): | |
# Classify DBA FS | |
if re.match(ymlregex.get('dba'), logical_disk_parse) is not None: | |
if not check_monitoring_exist(server['name'],'Disk Usage on ' + logical_disk_parse): | |
payload_dba = {'host_name': str(server['name']), | |
'use': nagiosxi_template, | |
'service_description': 'Disk Usage on ' + logical_disk_parse, | |
'check_command': 'check_xi_ncpa!-t \'' + ymltoken.get( | |
'linux') + '\' -P 5693 -M \'disk/logical/' + logical_disk + '\' -u M -w 90 -c 95!!!!!!!', | |
'force': '1'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ok: [zltxct0863] => { | |
"nagios_xi_services.json.servicelist.service|selectattr('service_description', 'search', nagios_cpu_usage_service_description)|list": [ | |
{ | |
"@attributes": { | |
"id": "24244" | |
}, | |
"action_url": "", | |
"active_checks_enabled": "1", | |
"check_interval": "15", | |
"config_type": "1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I setup the variable. | |
- name: Set Nagios XI Services Facts | |
uri: | |
url: 'https://{{ nagios_server }}/nagiosxi/api/v1/objects/service?apikey={{ nagios_api_key }}&host_name=in:{{ ansible_play_hosts | join(",") }}' | |
status_code: 200 | |
method: GET | |
return_content: yes | |
validate_certs: no | |
headers: |