diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2012-08-16 21:34:55 -0400 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2012-08-16 21:34:55 -0400 |
commit | eee2d1afd06039d3ae7ff85ac7bdfa13a96ddb41 (patch) | |
tree | ef83aa303f3ec159fe696a85793a3b6c914937c8 | |
parent | 1738440b132409d0c7fdd3302f364aae773df5be (diff) | |
download | ansible-eee2d1afd06039d3ae7ff85ac7bdfa13a96ddb41.tar.gz |
If ANSIBLE_KEEP_REMOTE_FILES=1 is set as an environment file, remote files will not be deleted, which is useful only for development debugging purposes.
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | lib/ansible/runner/__init__.py | 4 | ||||
-rw-r--r-- | setup.py | 14 |
4 files changed, 15 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f42daeb629..a69ca058b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ Ansible Changes By Release * -u and user: defaults to current user, rather than root, override as before * new module boilerplate code to check for mutually required arguments, arguments required together, exclusive args * /etc/ansible/ansible.cfg and ~/ansible.cfg now available to set default values and other things +* --list-hosts to show what hosts are included in each play of a playbook +* ANSIBLE_KEEP_REMOTE_FILES=1 can be used in debugging (envrionment variable) 0.6 "Cabo" -- August 6, 2012 @@ -101,8 +101,6 @@ python: python setup.py build install: - mkdir -p /usr/share/ansible - cp ./library/* /usr/share/ansible/ python setup.py install sdist: clean diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index f3e67653ae..27ad7829d8 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -172,6 +172,10 @@ class Runner(object): def _delete_remote_files(self, conn, files): ''' deletes one or more remote files ''' + if os.getenv("ANSIBLE_KEEP_REMOTE_FILES","0") == "1": + # ability to turn off temp file deletion for debug purposes + return + if type(files) == str: files = [ files ] for filename in files: @@ -1,16 +1,19 @@ #!/usr/bin/env python -# NOTE: setup.py does NOT install the contents of the library dir -# for you, you should go through "make install" or "make RPMs" -# for that, or manually copy modules over. - import os import sys +from glob import glob sys.path.insert(0, os.path.abspath('lib')) from ansible import __version__, __author__ from distutils.core import setup +# find library modules +from ansible.constants import DEFAULT_MODULE_PATH +data_files = [ (DEFAULT_MODULE_PATH, glob('./library/*')) ] + +print "DATA FILES=%s" % data_files + setup(name='ansible', version=__version__, description='Minimal SSH command and control', @@ -31,5 +34,6 @@ setup(name='ansible', 'bin/ansible', 'bin/ansible-playbook', 'bin/ansible-pull' - ] + ], + data_files=data_files ) |