hosts: servers roles:
- { role: username.rolename, x: 42 }
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 | |
################################# | |
# test.py (Playbook Execute Task) | |
################################# | |
from celery import Celery | |
from ansible.playbook import PlayBook | |
from ansible.runner import Runner |
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 | |
# -*- coding: utf-8 -*- | |
# (c) 2012, David "DaviXX" CHANIAL <[email protected]> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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
diff --git a/library/system/authorized_key b/library/system/authorized_key | |
index 7626a9a..5cae4a1 100644 | |
--- a/library/system/authorized_key | |
+++ b/library/system/authorized_key | |
@@ -114,6 +114,27 @@ import tempfile | |
import re | |
import shlex | |
+class keydict(dict): | |
+ |
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
#!/bin/bash | |
OLDRELEASE="1.4.3" | |
NEWRELEASE="1.4.4" | |
NEWRELEASENAME="Could This Be Magic" | |
cd ~ | |
rm -rf ansible | |
agc |
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
def _set_none_to_blank(dictionary): | |
result = dictionary | |
for k in result.iterkeys(): | |
if type(result[k]) == dict: | |
result[k] = _set_non_to_blank(result[k]) | |
elif not result[k]: | |
result[k] = "" | |
return result |
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 | |
from ansible.runner.action_plugins.synchronize import ActionModule as Synchronize | |
class FakeRunner(object): | |
def __init__(self): | |
self.connection = None | |
self.transport = None | |
self.basedir = None | |
self.sudo = None |
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
#!/bin/bash | |
OLDRELEASE="1.4.3" | |
NEWRELEASE="1.4.4" | |
NEWRELEASENAME="Could This Be Magic" | |
cd ~ | |
rm -rf ansible | |
agc |
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
def test_get_diff(self): | |
standard = dict( | |
before_header='foo', | |
after_header='bar', | |
before='fooo', | |
after='foo' | |
) | |
standard_expected_py27 = """--- before: foo | |
+++ after: bar | |
@@ -1 +1 @@ |
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
DEVEL | |
jtanner@u1204:~/issues/jlaska-awx-install-fail$ ansible -i inventory localhost -m file -a "path=/tmp/newfoo state=file" | |
localhost | FAILED >> { | |
"failed": true, | |
"msg": "file (/tmp/newfoo) is absent, cannot continue", | |
"path": "/tmp/newfoo", | |
"state": "absent" | |
} | |
1.4.5 |