This file contains hidden or 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
--- | |
- block: | |
- name: Retrieve some information | |
stat: | |
path: /path/to/a/file | |
register: info_result | |
- name: Check a condition | |
assert: |
This file contains hidden or 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: localhost | |
connection: local | |
tasks: | |
- ec2_ami_find: | |
name: "arch-linux-hvm-*.x86_64-ebs" | |
virtualization_type: hvm | |
owner: 093273469852 # Uplink Labs | |
sort: name |
This file contains hidden or 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
#!/usr/bin/python | |
DOCUMENTATION = ''' | |
--- | |
module: git_facts | |
version_added: "devel" | |
short_description: retrieve facts about a git repository | |
description: | |
- retrieve facts about a git repository. This module has a dependency on GitPython. | |
options: |
This file contains hidden or 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
#!/usr/bin/env python | |
import re, sys | |
filename = sys.argv[1] | |
match = sys.argv[2] | |
append = sys.argv[3] | |
f = open(filename, 'r+') | |
content = f.read() |
This file contains hidden or 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
$ ansible-playbook -i test.ini test.yml --limit group1 | |
PLAY [all] ******************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [group1] | |
TASK: [command true] ********************************************************** | |
changed: [host1] |
This file contains hidden or 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: localhost | |
connection: local | |
tasks: | |
- set_fact: | |
is_test: "{{ env == 'development' or 'test' in env }}" | |
- set_fact: | |
security_group: blah |
NewerOlder