Commit Graph

133 Commits (967de3cdf9ef222bd5a312c290e4a75c2d355fc1)

Author SHA1 Message Date
James Cammarata 54b1f820fb Modify the way we set the localization environment
Previously, we set the LANG (and LC_CTYPE) environment variables
directly in the module code and applied them with os.environ().
Instead, we are now pre-pending those variables to the environment
string used to execute the command which allows the user to
override the localization values by setting the environment values
directly (even on a per-task basis):

  - subversion: repo=file:///path/to/repos/svn_über dest=/tmp/svntest
    environment:
      LANG: "C"
      LC_CTYPE: "en_US.UTF-8"

So if a user wishes to default their LANG back to C, they can still
avoid unicode issues by doing the above.

Fixes #7060
2014-05-01 10:34:53 -05:00
Joost Cassee 978e6d2cd6 Make concatenating certs robust in urls.py
Add a newline after each certificate file explicitly to avoid problems
with files that do not end with a newline themselves.
2014-04-30 21:46:37 +02:00
Jiri Barton 9da06274a8 Set proper file permisions when a file is created with atomic_move
Fixes #7196
2014-04-29 08:41:22 -05:00
Michael DeHaan 9a6998aa17 While this code is unused, this remote module copy of this function should not be carried around in the source code. 2014-04-29 08:12:11 -04:00
Logos01 424ee36e05 Enable facts module on older SuSE systems
Modified logic of distribution_release for SuSE to retain the last discovered key/value pair's value in /etc/SuSE-release that contains a '=' character.
2014-04-28 14:37:23 -07:00
Michael DeHaan ad04b455d3 add missing license header 2014-04-24 10:31:04 -04:00
James Cammarata 117952cf6c Fixing a bug in the new fetch_url username/password logic 2014-04-24 00:44:39 -05:00
James Cammarata 89fa9b7305 Add parameters to get_url for the url username/password
Fixes #6928
2014-04-24 00:26:50 -05:00
James Cammarata c115c34a1f Set the default LANG to en_US.UTF-8 and also set LC_CTYPE
Fixes #6737
2014-04-22 00:48:32 -05:00
Brian Coca c3e559b914 should now work with versions older than 8.4 2014-04-21 21:00:58 -04:00
faust64 78b9a11ccf Update facts.py
Fixes #7093 --devel
2014-04-21 19:44:47 +02:00
James Cammarata 68c30548e0 Properly catch and decode unicode strings in module _log_invocation()
Fixes #7084
2014-04-21 11:33:23 -05:00
James Cammarata 39c6141b4a Merge pull request #7082 from bcoca/freebsd_mtu_fix
fixed issue with FreeBSD network facts
2014-04-21 10:53:22 -05:00
Brian Coca e5f297697a ifconfig changed on FreeBSD, tested this on 8,9 and 10 latest stable
versions and it now works
2014-04-19 22:03:30 -04:00
Brian Coca bc23926f42 fixed ETIME issue on FreeBSD 8 through 10, which broke all fact
gathering
2014-04-19 21:42:56 -04:00
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