Skip to content

Instantly share code, notes, and snippets.

Avatar

Toshio Kuratomi abadger

View GitHub Profile
View gist:9f3e1b791e2c00313bf9
787 if tmp_file:
788 installed = install_role(role.get("name"), role.get("version"), tmp_file, options)
789 # we're done with the temp file, clean it up
790 os.unlink(tmp_file)
791 # install dependencies, if we want them
792 if not no_deps and installed:
[....]
811 if not tmp_file or not installed:
812 if tmp_file and installed:
View keybase.md

Keybase proof

I hereby claim:

  • I am abadger on github.
  • I am abadger (https://keybase.io/abadger) on keybase.
  • I have a public key whose fingerprint is 1289 DAF3 C7FC 1108 C77D ADD9 5FAC 8089 CD84 EE48

To claim this, I am signing this object:

View gist:c8de61b23ff251566bed
diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst
index c5eeff0..44b5660 100644
--- a/docsite/rst/playbooks_variables.rst
+++ b/docsite/rst/playbooks_variables.rst
@@ -948,9 +948,10 @@ a use for it.
If multiple variables of the same name are defined in different places, they win in a certain order, which is::
- * -e variables always win
+ * variables defined in -e on the command line always win
View gist:e00f644881c3e80b3cf3
diff --git a/lib/ansible/modules/core b/lib/ansible/modules/core
--- a/lib/ansible/modules/core
+++ b/lib/ansible/modules/core
@@ -1 +1 @@
-Subproject commit db5668b84c3a19498b843d0bfe34574aef40c193
+Subproject commit db5668b84c3a19498b843d0bfe34574aef40c193-dirty
diff --git a/lib/ansible/modules/extras b/lib/ansible/modules/extras
--- a/lib/ansible/modules/extras
+++ b/lib/ansible/modules/extras
@@ -1 +1 @@
View gist:0c4cace2eb6f66da4fb5
$ PYTHONPATH=/srv/ansible/ansible3/v2/ nosetests test/v2/errors *[devel] (22:06:19)
FF
======================================================================
FAIL: test_basic_error (errors.test_errors.TestErrors)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/srv/ansible/ansible3/test/v2/errors/test_errors.py", line 20, in test_basic_error
assert e.message != self.message
AssertionError
View gist:cdcce06178980917ae31
from ansible.parsing.mod_args import ModuleArgsParser
import unittest
class CompatTestCase(unittest.TestCase):
def _assertIsNone(self, obj, msg=None):
"""Same as self.assertTrue(obj is None), with a nicer default message."""
if obj is not None:
standardMsg = '%s is not None' % (safe_repr(obj),)
self.fail(self._formatMessage(msg, standardMsg))
View gist:62b5c3af5a715470f49f
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
View gist:e37c0a50f5bf7f08dbc2
diff --git a/files/file.py b/files/file.py
index ff9feb4..be7b05a 100644
--- a/files/file.py
+++ b/files/file.py
@@ -151,56 +151,58 @@ def main():
elif os.path.isdir(path):
prev_state = 'directory'
elif os.stat(path).st_nlink > 1:
prev_state = 'hard'
else:
View gist:4a519b26b7480be20269
from mock import patch
import os.path
def test_func(path):
return os.path.exists(path)
def outer():
ope = os.path.exists
def inner(path):
return (ope(path), path)
View test_postgresql.yml
---
- hosts: localhost
sudo: True
sudo_user: postgres
tasks:
#
# Create and destroy db
#
- name: Create DB