Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| --- | |
| # ^^^ YAML documents must begin with the document separator "---" | |
| # | |
| #### Example docblock, I like to put a descriptive comment at the top of my | |
| #### playbooks. | |
| # | |
| # Overview: Playbook to bootstrap a new host for configuration management. | |
| # Applies to: production | |
| # Description: | |
| # Ensures that a host is configured for management with Ansible. |
| input { | |
| tcp { | |
| type => "syslog" | |
| host => "127.0.0.1" | |
| port => 3514 | |
| } | |
| tcp { | |
| type => "eventlog" | |
| host => "10.1.1.2" | |
| port => 3515 |
| /etc/logstash/logstash.conf : | |
| # We handle the syslog part of the Cisco PIX/ASA messages | |
| grok { | |
| tags => "cisco-fw" | |
| patterns_dir => "/etc/logstash/patterns" | |
| pattern => "^<%{POSINT:syslog_pri}>(?:(%{TIMESTAMP_ISO8601:timestamp8601} |%{CISCOTIMESTAMP:timestamp} ))?%{SYSLOGHOST:logsource}?[ :]+%{GREEDYDATA:syslog_message}" | |
| } | |
| syslog_pri { | |
| tags => "cisco-fw" |
| # download and make Redis | |
| $ wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz | |
| $ sudo tar xzf redis-2.6.7.tar.gz -C /usr/lib/ | |
| $ cd /usr/lib/redis-2.6.7 | |
| $ sudo make | |
| # create symlinks to the /usr/local/bin | |
| $ sudo ln -s /usr/lib/redis-2.6.7/src/redis-server /usr/local/bin/redis-server | |
| $ sudo ln -s /usr/lib/redis-2.6.7/src/redis-cli /usr/local/bin/redis-cli |
| # | |
| # Depends on: puppetlabs/stdlib | |
| # | |
| define buildsource( | |
| $dir = $title, | |
| $user = 'root', | |
| $path = '/usr/bin:/bin', | |
| $timeout = '0', | |
| $options = '' | |
| ) { |
| puppetdb install & conf | |
| wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb | |
| sudo dpkg -i puppetlabs-release-trusty.deb | |
| sudo apt-get update | |
| apt-get install puppetdb-terminus puppetdb |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| BOX_NAME=vagrant-build | |
| BASE_DIR="`pwd`/machines" | |
| BOX_DIR="${BASE_DIR}/${BOX_NAME}" | |
| mkdir -p ${BASE_DIR} | |
| VBoxManage createvm --name "${BOX_NAME}" --ostype RedHat_64 --basefolder ${BASE_DIR} | |
| VBoxManage registervm "${BOX_DIR}/${BOX_NAME}.vbox" | |
| mkdir -p tmp |
| group :production do | |
| gem "unicorn" | |
| end |