mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
1738440b13
commit
eee2d1afd0
4 changed files with 15 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
14
setup.py
14
setup.py
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue