สำหรับท่านที่ศึกษาและใช้งาน Ansible ก็คงจะรู้จักและคุ้นเคยกับ INI Inventory file กันเป็นอย่างดีอยู่แล้ว หน้าตามันก็จะประมาณนี้:
[centos]
centos1 ansible_port=2222
centos[2:3]
[centos:vars]
# Kernel sysctl configuration file for Red Hat Linux | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Turn on execshield | |
# 0 completely disables ExecShield and Address Space Layout Randomization | |
# 1 enables them ONLY if the application bits for these protections are set to “enable” | |
# 2 enables them by default, except if the application bits are set to “disable” | |
# 3 enables them always, whatever the application bits |
--- | |
centos: | |
hosts: | |
centos1: | |
ansible_port: 2222 | |
centos2: | |
centos3: | |
vars: | |
ansible_user: root | |
ubuntu: |
[centos] | |
centos1 ansible_port=2222 | |
centos[2:3] | |
[centos:vars] | |
ansible_user=root | |
[ubuntu] | |
ubuntu[1:3] |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Zabbix SMTP Alert script for gmail. | |
""" | |
import sys | |
import smtplib | |
from email.MIMEText import MIMEText | |
from email.Header import Header |
Summary: Coova-Chilli is a Wireless LAN Access Point Controller | |
Name: coova-chilli | |
Version: 1.3.0 | |
Release: 1 | |
URL: http://www.coova.org/ | |
Source0: %{name}-%{version}.tar.gz | |
License: GPL | |
Group: System Environment/Daemons | |
BuildRoot: %{_tmppath}/%{name}-root |
#!/bin/bash | |
if [[ "$#" < "2" || "$#" > "3" ]]; then | |
cat <<END | |
Glusterfs GFID resolver -- turns a GFID into a real file path | |
Usage: $0 <brick-path> <gfid> [-q] | |
<brick-path> : the path to your glusterfs brick (required) | |
# General | |
http_port 3130 | |
http_port 3128 intercept | |
https_port 3129 intercept ssl-bump cert=/etc/squid/ssl_cert/srtpl.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB | |
acl DiscoverSNIHost at_step SslBump1 | |
acl NoSSLIntercept ssl::server_name_regex -i "/etc/squid/url.nobump" | |
ssl_bump splice NoSSLIntercept | |
ssl_bump peek DiscoverSNIHost |