Commit Graph

118 Commits (c87afc1109c4d67bb02ddc89103ce6e872c45b43)

Author SHA1 Message Date
James Cammarata ae29e43f93 Merge branch 'issue_7009_nfs_selinux' into devel 2014-04-18 22:21:03 -05:00
James Cammarata 3715482d7c Determine selinux context for NFS mount points correctly
Fixes #7009
2014-04-18 09:39:58 -05:00
Wim 6ed4ca97a8 hint to install python-ssl on redhat systems 2014-04-18 00:07:07 +02:00
James Cammarata d240d073eb Changing SSL cert detection method to allow for auto-negotiation of SSL protocols
Fixes #6904
2014-04-15 13:45:21 -05:00
James Cammarata 23c5f4524d Make sure args in run_command are encoded for shlex.split calls on py2.6 2014-04-15 13:04:41 -04:00
James Cammarata eebc72ab9b Add a timeout decorator for timing out functions that may hang
Fixes #6891
2014-04-08 13:21:42 -05:00
Eric Lake 7f9736198a add distribution_major_version to fact gathering 2014-04-04 11:41:20 -05:00
James Cammarata 82b24c162e Adding delimiter fixes to action_plugin + fixing local assembling with a delimiter
Also added a new integration test for assemble using local assembly
with a delimiter.
2014-04-03 16:32:35 -05:00
Harlan Lieberman-Berg 876b8085aa Add directory_mode to common file parameters to prevent errors. 2014-04-02 17:41:39 -04:00
James Cammarata b698f7a44b Add option to create host_key directory if it doesn't exist
Fixes #6731
2014-03-30 01:34:33 -05:00
Michael DeHaan a6b25e8657 Allow type=list module arguments to accept integers and floats. 2014-03-28 11:19:49 -04:00
Michael DeHaan 9921f804f9 Merge pull request #6643 from herbygillot/fact-full-hostname
Add a fact providing the full hostname, without the domain portion
2014-03-27 17:09:34 -04:00
Cristian Ciupitu 1eaf85b89f Micro-optimization: replace s.find(x)!=-1 with x in s
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-27 20:35:20 +02:00
James Tanner 3194fbd365 Fixes #6655 catch unicode encoding errors before sending to syslog 2014-03-25 16:07:12 -04:00
James Cammarata 4ea12c1b86 Make sure stat of dest is available in atomic_move
Fixes #6682
2014-03-25 14:03:21 -05:00
Michael DeHaan 3eecc039b9 Merge pull request #6656 from Jmainguy/setup
Added ansible_date_time.weekday as a fact. This returns Monday,Tuesday,W...
2014-03-25 13:32:57 -04:00
Herby Gillot 94297950a0 Name platform.node() fact as "nodename" 2014-03-25 11:20:19 -04:00
Sébastien Gross ef6b437d0d Fix TypeError when using old simplejson lib.
On some very old simplejson does not support the 'encoding' and give
following exception:

   TypeError: __init__() got an unexpected keyword argument 'encoding'

This fix runs json.dump with no encoding key (such as before #a023cb) on
TypeError exception only.
2014-03-25 14:50:29 +01:00
James Cammarata bc93732b1d Catch permissions errors related to opening a known_hosts file in modules
Fixes #6644
2014-03-24 16:32:31 -05:00
James Cammarata db345391e3 Fixing ownership when atomic_move is creating a file while sudo'ing
Fixes #6647
2014-03-24 15:10:43 -05:00
Jonathan Mainguy b17b5ad85b Added ansible_date_time.weekday as a fact. This returns Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, or Sunday depending on the remote servers time. Useful for backups the way I use it 2014-03-24 13:43:00 -04:00
James Cammarata bb723bedee Merge branch 'atomic_move_restore_owner_group_rebase' of https://github.com/tyll/ansible into tyll-atomic_move_restore_owner_group_rebase 2014-03-24 09:34:51 -05:00
Herby Gillot c0886a5f3a Add a fact providing the full hostname, without the domain portion
truncated.
2014-03-23 21:59:47 -04:00
Francisco José Marques Vieira e9d7476c28 Add missing sha1 import on known_hosts.py 2014-03-23 17:19:23 +00:00
Till Maas 898a38b074 module_utils/atomic_move(): Use tempfile module
Fix a potential race condition by using the tempfile module.
2014-03-20 12:34:19 +01:00
Till Maas 8f778a83df module_utils/atomic_move(): Restore owner/group
Manually restore owner and group if both src and dest are on a separate
file system.
2014-03-20 12:34:19 +01:00
James Cammarata 4880cfb5ea Merge pull request #6568 from sivel/ssl-cert-validation-osx
Make SSL verification on Mac OS X work out of the box
2014-03-19 13:45:45 -05:00
James Tanner 67517e96d3 Fixes #6567 put the git wrapper script in the module temp dir 2014-03-19 10:30:10 -04:00
Matt Martz 1d3d73a0b6 Only write the DUMMY_CA_CERT on OS X 2014-03-19 09:01:13 -05:00
Matt Martz 3b5aa8bd30 Provide a dummy ca to allow OS X to do it's OpenSSL keychain magic 2014-03-18 17:16:44 -05:00
James Cammarata 3f5440f7df Make modules set a valid working directory
Fixes #6546
2014-03-18 10:37:52 -05:00
Michael DeHaan 13f69dad05 Merge pull request #6527 from patrickheeney/hosts-bug
Fix for hostkey directory
2014-03-17 17:35:27 -04:00
James Cammarata 5d8c9d3f0f Merge branch 'file_fixes_clean' of https://github.com/bcoca/ansible into bcoca-file_fixes_clean 2014-03-17 14:03:26 -05:00
patrickheeney a9aab23f11 Fix for hostkey directory 2014-03-17 09:00:08 -07:00
Greg Dallavalle 77229553a3 fetch_url: Avoid credential stripping for FTP-scheme URLs 2014-03-16 20:41:03 -05:00
Michael DeHaan b0dbc61d63 Move facts to 'module_utils' so they can be referenced by other modules. Note unlike other module_utils/ dirs this keeps the original
license -- so usage of facts code in modules will be limited to GPLv3 modules.
2014-03-16 16:12:02 -04:00
Brian Coca 2d25577e11 Fixes and cleanup to file functions and module
- unified set attribute functions ... not sure why 2 identical functions
exist with diff names, now there are 3 while i repoint all modules to 1
- fixed issue with symlinks being created w/o existing src when force=no
- refactored conditionals, simplified where possible
- added tests for symlink to nonexistant source, with both force options
- made symlink on existing attomic (force)
2014-03-15 13:54:24 -04:00
James Cammarata a0cb974575 Be sure to return to the old directory if cwd is set in run_command 2014-03-13 16:24:29 -05:00
James Tanner a348f67238 Reset the current directory after running subprocess.Popen 2014-03-13 17:15:23 -04:00
James Cammarata 677008bef7 Rejoin args list into a string for run_command when using an unsafe shell
This allows the use of an args list with leading environment variables,
which otherwise would fail due to the way Popen works.
2014-03-13 14:31:32 -05:00
James Cammarata 5233d4bc31 Fix typo in run_command when sending data that is not binary 2014-03-13 14:28:51 -05:00
James Cammarata b1a37dcc08 Revert "Rejoin args list into a string for run_command when using an unsafe shell"
This reverts commit 4273cb2d8e.
2014-03-13 14:04:51 -05:00
James Cammarata 4273cb2d8e Rejoin args list into a string for run_command when using an unsafe shell
This allows the use of an args list with leading environment variables,
which otherwise would fail due to the way Popen works.
2014-03-13 13:51:59 -05:00
James Cammarata 303e085f8b Only use cwd in run_command kwargs if the directory exists 2014-03-12 15:59:55 -05:00
James Cammarata 60a7f57300 Make sure the cwd exists in run_command before trying to use it 2014-03-12 14:33:31 -05:00
Dan Koch bbf320fd22 Work around for cwd stat problems with run_command and sudo
This fixes issue #6443
2014-03-12 14:59:50 -04:00
James Cammarata 2c7d58abe0 Compile ca certs into a temp file to reduce number of attempts
For those who may have a large number of certs found, this can reduce
the number of ssl connections attempted.
2014-03-12 13:45:16 -05:00
Michael DeHaan d37f0c6d12 Use same implementation as ssh.py for "is in host file" checks in module code, prevents git module from adding keys more than once. 2014-03-12 14:11:45 -04:00
Michael DeHaan 6d841d120e Don't process shell commands as arrays. 2014-03-12 11:57:28 -04:00
James Cammarata a9017af2bb Adding validate_certs to all modules that use fetch_url 2014-03-12 10:19:54 -05:00