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
{% for host in groups['staging'] %} | |
{{ hostvars[host]['yprox_hostname'] }} | |
{% endfor %} |
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
# located in /etc/ansible/library | |
#!/usr/bin/env python | |
# | |
# Get cloudstack zone name/id and add to ansible facts | |
# requires cloudmonkey >= v5 with json output set | |
import json | |
import os |
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
{% for service in services %} | |
{{ service['name'] }}; | |
{% endfor %} |
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
vars: | |
nginx_local_servers: | |
- src: 'hasta.la.vista.conf' | |
dst: 'terminator.conf' | |
- src: 'boom.baby.conf' | |
dst: 'cafe.ole.conf' | |
local_src: '/tmp/sites-local' | |
local_dst: '/tmp/sites-enabled' | |
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
# roles/sysctl/tasks/class_x.yml | |
- name: do some sysctl stuff for performance cluster | |
sysctl: name="net.ipv4.ip_forward" value=1 |
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 | |
vars_prompt: | |
- name: "leaking_password" | |
private: yes | |
prompt: "Google your leaking password?" | |
default: "skip" | |
roles: | |
- { role: leak, when: "leaking_password != 'skip'" } |
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: app | |
roles: | |
- common | |
- httpd | |
- { role: vmware-tools, when: ansible_virtualization_type == 'VMware' } |
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: install ntp | |
yum: pkg=ntp state=installed |
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
[root@server ansible]# ansible-playbook site.yml | |
PLAY [all] ******************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [localhost] | |
TASK: [be sure ntp is installed] ********************************************** | |
ok: [localhost] |
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
--- | |
# Creates Digital Ocean Droplet | |
- name: 'Create Digital Ocean Droplet' | |
digital_ocean: > | |
state=active | |
command=droplet | |
name={{droplet_name}} | |
client_id={{client_id}} | |
api_key={{api_key}} |
OlderNewer