This file contains 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
input { | |
http { | |
port => 8080 | |
} | |
} | |
filter { | |
if [logger_name] == "awx.api.generics" { | |
if [message] =~ /[Uu]ser/ { | |
grok { |
This file contains 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: all | |
gather_facts: no | |
become: yes | |
vars: | |
nginx_ssl_cert: "/etc/ssl/certs/nginx.crt" | |
nginx_ssl_key: "/etc/ssl/private/nginx.key" | |
nginx_ssl_csr: "/etc/ssl/csr/nginx.csr" | |
handlers: | |
- name: "Restart Nginx" |
This file contains 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
# Vagrant file for a three node Ceph cluster on VirtualBox | |
Vagrant.configure("2") do |config| | |
config.vm.define "node0" do |node0| | |
node0.vm.box = "centos/7" | |
node0.vm.hostname = 'node0' | |
node0.vm.network :private_network, ip: "192.168.54.100" | |
node0.vm.provider :virtualbox do |v| | |
v.customize ["modifyvm", :id, "--memory", 512] |
This file contains 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: localhost,all | |
gather_facts: yes | |
tasks: | |
- name: Dump all vars | |
copy: | |
dest: "/tmp/ansible.all" | |
content: | | |
Module Variables ("vars"): | |
-------------------------------- |
This file contains 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
vboxmanage list hdds | awk '{printf("%s,",$0)}'| sed -e $'s/,,/\\\n/g' | sed -e $'s/,/\ /g' |awk '/inaccessible/ {print $2}' | xargs -I vboxmanage closemedium disk {} --delete |
This file contains 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
#!/bin/bash | |
# Requires the following yum packages: | |
# gcc | |
# python | |
# python-pip | |
# python-virtualenv | |
# krb5-devel | |
# openssl-devel | |
# libcurl-devel | |
# sshpass |
This file contains 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
#!/bin/python | |
# Sample Script to Launch Tower Jobs and Monitor progress. | |
# This script can leverage tower_cli.cfg for user, host, and password. | |
# Extra_vars and Job Template should be passed through the command line | |
# BEGIN Defaults | |
tower_polling_interval = 60 | |
tower_job_extra_vars = '{}' | |
tower_certificate_verify = True | |
# END Defaults |
This file contains 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
##GET TOKEN | |
#Query to retrieve token | |
curl -X POST -k -v \ | |
-H 'Content-Type: application/json' \ | |
--data @/tmp/cred.json \ | |
https://tower.super.io/api/v1/authtoken/ | |
#cat /tmp/cred.json | |
{ "username": "admin", | |
"password": "secretpass" } |
This file contains 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
# Convert is part of the ImageMagick package | |
yum install -y ImageMagick | |
# Loop through resizing every image | |
for i in *.JPG; do convert "$i" -resize 25% "${i%%.*}_reduced.jpg"; done | |
# Remove the full size files | |
rm -f *.JPG |
This file contains 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: Use openssl to verify system rebooted | |
local_action: shell openssl s_client -connect {{ ansible_host }}:{{ ansible_port| default(22) }} | |
become: false | |
ignore_errors: True | |
register: openssl_test_result | |
changed_when: False | |
- name: Email notification if server is not reachable |
NewerOlder