Skip to content

Instantly share code, notes, and snippets.

---
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"
- hosts: localhost
connection: local
gather_facts: false
vars:
things:
- "{{ foo }}"
- "{{ foob }}"
foo: "Hello"
tasks:
- name: debug things
[WARNING]: It is unnecessary to use '{{' in loops, leave variables in loop
expressions bare.
PLAY [localhost] **************************************************************
TASK: [debug things] **********************************************************
ok: [localhost] => {
"things": [
"Hello",
[WARNING]: It is unnecessary to use '{{' in loops, leave variables in loop
expressions bare.
PLAY [localhost] **************************************************************
TASK: [debug things] **********************************************************
ok: [localhost] => {
"things": [
"Hello",