Commit Graph

185 Commits (a1e4f826ca01cc409e5a0a171c68ce9ecf6952f4)

Author SHA1 Message Date
James Cammarata 10a850c70f Merge branch 'new_arg_splitting' into devel 2014-07-24 21:27:25 -05:00
Michael DeHaan 630f080cf0 Start of unit tests for split_args function, moved split_args to utils since not needed by modules (so far). 2014-07-24 20:15:04 -04:00
Michael DeHaan b5d64fdb36 Some notes/comment upgrades on split_args. 2014-07-24 16:34:06 -04:00
James Cammarata 43154e5101 Using custom splitting function for module param counting 2014-07-24 14:42:35 -05:00
Michael DeHaan e143d7dab7 Merge pull request #7543 from yangliping/fix_local_facts_file_checking_portability
Fix portability issue when checking local facts file permission.
2014-07-24 09:37:22 -04:00
Michael DeHaan 635bea645c Merge pull request #7992 from dehylton/devel
fix swap translation on 4.x openbsd with 2.5.4 python
2014-07-24 09:34:38 -04:00
James Cammarata 84759faa09 Security fixes:
* Strip lookup calls out of inventory variables and clean unsafe data
  returned from lookup plugins (CVE-2014-4966)
* Make sure vars don't insert extra parameters into module args and prevent
  duplicate params from superseding previous params (CVE-2014-4967)
2014-07-21 11:20:49 -05:00
Ruggero Marchei 909955f2e2 fix get_distribution_version() on amazon linux 2014-07-15 18:04:46 +02:00
Casey Fitzpatrick 7115cb1f37 removed port from domain name qualification, fixes 7941 2014-07-02 19:54:50 -04:00
James Cammarata 81f35323e9 Revert "Fix get_distribution() for platforms that may have spaces"
This reverts commit 2493020d9f.
2014-07-02 09:44:44 -05:00
dewey hylton 379e1a49cb fix swap translation on 4.x openbsd with 2.5.4 python 2014-06-30 17:23:55 -04:00
James Cammarata 9564818e1e Merge branch 'fix_lineinfile_newlines' into devel 2014-06-23 12:38:12 -05:00
Ivo Senner f4fd9d366b Check for empty os-release file, fixes #7885 2014-06-22 04:08:59 +02:00
James Cammarata 3c3c710a58 Merge branch 'module_safe_eval' into fix_lineinfile_newlines 2014-06-20 00:16:52 -05:00
James Cammarata d8bb116c1a Merge branch 'devel' of https://github.com/tgolly/ansible into tgolly-devel 2014-06-19 22:41:58 -05:00
Michael DeHaan 5156794738 Merge pull request #7861 from cchurch/devel
Windows Remote Support
2014-06-19 22:10:41 -05:00
Matt Martz 09dd535296 Make helper functions more robust against undefined powershell objects 2014-06-19 14:26:36 -05:00
Matt Martz df8866b8bd Add examples for how to use powershell common functions 2014-06-19 14:25:50 -05:00
Matt Martz e4e610565c Add convenience function (Get-Attr) for getting an attribute/member from a powershell psobject 2014-06-19 14:25:50 -05:00
Matt Martz 90c98ada7c Add ConvertTo-Bool filter function in powershell common code 2014-06-19 14:25:50 -05:00
Chris Church 243cd877ae Add integration tests for fetch/slurp, make powershell fetch/slurp work as close as possible to existing fetch/slurp modules. 2014-06-19 14:25:28 -05:00
Matt Martz 97f4f56286 Add Exit-Json and Fail-Json powershell helper functions 2014-06-19 14:24:15 -05:00
Matt Martz a25c441300 Add shared functions to module_utils/powershell.ps1 and refactor powershell modules to utilize the common powershell code 2014-06-19 14:24:13 -05:00
James Cammarata 360d8b0fc2 Don't try to scan SSH signatures for non-ssh urls
Fixes #7812
2014-06-18 14:22:20 -05:00
James Cammarata 2493020d9f Fix get_distribution() for platforms that may have spaces
The new CentOS 7 beta lists the distribution as "CentOS Linux", which
breaks the distribution detection and class loading. This patch fixes
that by taking just the first entry in the string when a space is
detected.
2014-06-18 13:10:39 -05:00
James Cammarata 3529b1cb33 Merge branch '7763' of https://github.com/rmarchei/ansible into rmarchei-7763 2014-06-18 12:16:01 -05:00
Michael DeHaan 627ff30a6f Add module replacer capability for powershell files. 2014-06-17 12:30:34 -05:00
Ruggero Marchei e3f5af377f move get_distribution_version() to basic.py 2014-06-17 10:22:14 +02:00
James Cammarata 9b17e8a555 Merge pull request #7771 from jkramarz/issue-5761
Added missing fallback to hw_sector_size
2014-06-16 15:15:41 -05:00
Matt Bray 578e881142 fix for urls like ssh://git@github.com/ansible/ansible.git 2014-06-16 11:58:59 +01:00
Jakub Kramarz df3188cef0 Added missing fallback from physical_block_size to hw_sector_size in sectorsize fact discovery for kernels older than May 2009.
References #5761
2014-06-14 19:42:41 +02:00
James Cammarata 3fb3e7e6dc Properly parse urls for ssh-keyscan use
Previously, the get_fqdn() function in known_hosts.py only worked
with urls that started with git@, and ignored any urls that started
with a normal schema type (ie. http:// or ssh://). This patch corrects
that by using urlparse to parse the hostname portion out of urls that
have a proper schema.

Fixes #7474
2014-06-12 16:16:42 -05:00
James Cammarata 395192ffbc Merge pull request #7740 from jkramarz/issue-5761
changed sector size fact source
2014-06-12 08:56:03 -05:00
James Cammarata b4d130d086 Add a new password pattern to the run_command filter 2014-06-12 07:42:25 -05:00
Jakub Kramarz 4e4c9235e8 changed sector size fact source from hw_sector_size to physical_block_size, fixes issue 5761 2014-06-12 12:14:40 +02:00
James Cammarata 849b0f87ce Fix error when using os.getlogin() without a tty 2014-06-03 09:36:19 -05:00
James Cammarata b94bde9711 Merge pull request #7609 from jimi-c/issue_7553_su_copy
Support checking for su user to atomic_move
2014-05-30 15:46:34 -05:00
James Cammarata 061911c9c2 Merge pull request #7558 from dermute/pkg_mgr
added solaris fact detection for ansible_pkg_mgr
2014-05-27 16:23:31 -05:00
James Cammarata e99df21647 Support checking for su user to atomic_move
Fixes #7553
2014-05-27 16:04:02 -05:00
Alexander Winkler 4980e76a3a added solaris fact detection for ansible_pkg_mgr 2014-05-27 06:40:47 +00:00
rik2803 cfcbc954f5 Differentiate machinfo output key/val separator
get_hw_facts for HP-UX: machinfo in HP-UX B.11.23 uses '=' as separator between key and value, while B.11.31 uses ':'.
2014-05-26 07:56:46 +02:00
Yang Liping aedf134fc4 Fix portability issue when checking local facts file permission. 2014-05-26 10:55:32 +08:00
James Cammarata 0ac74aaf59 Also set the environment variables when resetting the locale to C 2014-05-19 23:22:46 -05:00
James Cammarata d44ed533b3 Default use_proxy to True for fetch_url()
Also added some error handling to the fetch_url() call in the
apt_repository module, so that failures to look up the PPA info
are properly handled.

Fixes #7322
2014-05-19 23:04:13 -05:00
James Cammarata 08406c0ee2 Adding the capability to proxy the ssl cert check
The ssl cert check will now respect the http and https proxy
environment settings. The url may also have the username/password
embedded, in which case basic auth will be used to connect to the
proxy server.

Fixes #7413
2014-05-19 16:00:32 -05:00
James Cammarata 285d9878ae Reset locale to 'C' if the specified one is invalid
Fixes #7448
2014-05-19 10:26:06 -05:00
James Cammarata df877f2e79 Check module_path permissions when creating ssh_wrapper for git
If the module directory is not writable/executable to the current user
(most likely because of a sudo to a non-root user), the ssh_wrapper
will be created in the default location for mkstemp() calls. To facilitate
the deletion of these new files, a new mechanism for cleaning up files
created by the module was also added.

Fixes #7375
2014-05-14 21:22:22 -05:00
Michal Mach 60451c20ab Fix known_hosts.py to work on older versions of python 2014-05-14 22:36:32 +02:00
James Cammarata 56515a38d5 Only chown on atomic move if the uid/gid don't match the src/tmp file
This is a corner case for remote file systems that don't support
chown() and where the source and destination for the atomic_move
are on that remote file system.

Fixes #7372
2014-05-14 09:59:12 -05:00
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