Skip to content

Instantly share code, notes, and snippets.

_________________
< GATHERING FACTS >
-----------------
\ ,+*^^*+___+++_
\ ,*^^^^ )
\ _+* ^**+_
\ +^ _ _++*+_+++_, )
_+^^*+_ ( ,+*^ ^ \+_ )
{ ) ( ,( ,_+--+--, ^) ^\
{ (@) } f ,( ,+-^ __*_*_ ^^\_ ^\ )
@bcoca
bcoca / gist:5137216
Created March 11, 2013 20:01
rewritten
- hosts:
- karen.dragonfear
- paola.dragonfear
- mathilda.dragonfear
user: root
vars:
backupserver: mathilda.dragonfear
tasks:
- name: get zpool data
action: shell zpool list -H -o name
@bcoca
bcoca / gist:6470362
Created September 6, 2013 21:43
sample of ansible inventory all
- inventory_dir/
- hosts
- group_vars/
- all
---
scripts_sha1: "{{lookup('pipe','git log -1 --format=%h chdir=' + ine_script_work_tree)}}"
deployed_scripts_dirname: "{{'scripts-' + scripts_sha1 }}"
- name: Install dependencies
apt: pkg={{item}} state=present
with_items:
- r-cran-rserve
- r-base
- r-base-dev
- r-base-core
---
- hosts: all # just here to gather facts on all hosts
- hosts: "{{target}}"
tasks:
- template: src....
...
ansible-playbook test.yml -e "target=targethost"
ansible-galaxy info briancoca.selenium briancoca.oracle_java7
- briancoca.selenium:
install_date = Wed Nov 12 17:14:04 2014
dependencies = ['briancoca.oracle_java7']
galaxy_info:
platforms = [{'name': 'Ubuntu', 'versions': ['precise', 'saucy']}]
description = Installs and configures Selenium server in any of 3 modes (standalone,hub or node)
license = GPLv2
author = Brian Coca
company = None
ansible-galaxy info abtris.nginx-passenger briancoca.selenium
- abtris.nginx-passenger:
average_composite:
avg_code_quality: 4.0
avg_documentation: 3.0
avg_reliability: 4.5
avg_wow_factor: 3.5
average_score: 3.8
bayesian_score: 0.0
company:
---
- hosts: localhost
gather_facts: no
vars_files:
- vars/vaulted_vars.yml
tasks:
- debug: var=secret
...
```
play.yml:
- hosts: localhost
connection: local
gather_facts: false
vars:
things:
- "{{ foo }}"
- "{{ foob }}"
foo: "Hello"