Commit Graph

266 Commits (7cb489eca3bb167ac9e22b310075e944b8254a27)

Author SHA1 Message Date
James Cammarata 28fd4df787 Merge pull request #9382 from gquintard/WIP/newdockerdetection
Detect docker as virtualization_type
10 years ago
James Cammarata efb40969b3 Merge pull request #9381 from debfx/facts_virt_kvm
Detect kvm guests through sys_vendor.
10 years ago
Guillaume Quintard 895da79d87 Detect docker as virtualization_type
New docker versions use "docker" in /proc/1/cgroup, which disturbs the
virtualization_type detection. So, grep for docker, in addition of
"lxc".
10 years ago
Felix Geyer ee5f5ee00d Detect kvm guests through sys_vendor.
The two detection methods currently implemented do not cover all cases.

For example qemu guests invoked like this:
qemu -machine pc-i440fx-1.4,accel=kvm -cpu SandyBridge

return this information:
product_name: Standard PC (i440FX + PIIX, 1996)
cpuinfo: model name      : Intel Xeon E312xx (Sandy Bridge)
10 years ago
Toshio Kuratomi 139e4767e4 Merge pull request #9329 from mcodd/devel
python2.4 compatibility issue with urlparse
10 years ago
Marcin Praczko 1917906dd6 Fix detecting distribution release on OpenSuSE
Ansible raised exception during parsering /etc/SuSE-release file.
Regular expresion should use string instead of list.
Fix tested on OpenSuse 13.1
10 years ago
Matt Coddington 10113e6a67 python2.4 compatibility issue with urlparse 10 years ago
Toshio Kuratomi 2b9e235ffd Rework distribution fact checking to be a little less heinous and add
support for Mandriva.

Fixes #9282
10 years ago
James Cammarata 2a0d18b092 Insert newlines correctly when splitting literal blocks
Fixes #9274
10 years ago
Toshio Kuratomi a10d10f647 Workaround more python-2.6 shlex not being able to handle unicode strings 10 years ago
Jakub Roztocil 0073d2dd92 Remove unreachable code. 10 years ago
James Cammarata b376e208c7 Adding "follow" param for file/copy options
Also modifies the template action plugin to use this new param
when executing the file/copy modules for templating so that links
are preserved correctly.

Fixes #8998
10 years ago
James Cammarata e54178f904 Catch additional errors in fetch_url
Fixes #8971
10 years ago
James Cammarata 317ab06bc6 Fixing multiline parsing to preserve newlines
Fixes #8813
10 years ago
James Cammarata 8bafc646cb Disable custom https handler for fetch_url on older pythons
Fixes #8898
10 years ago
Toshio Kuratomi 8233522a7a Reduce commenting as basic.py is copied to the remote host with every module transfer.
Move some comments to the unittest as we might look at that if we decide
to refactor the code.
10 years ago
Toshio Kuratomi 1afc8161a1 New password obfuscation in syslog messages that:
* makes speed acceptable for some datasets
* obfuscates multiple detected passwords
* obfuscates more characters to account for some corner cases when
  trying to detect passwords.

Fixes #8364
10 years ago
Toshio Kuratomi 4f55bcc298 Standardize on bytes internally to _log_invocation 10 years ago
James Cammarata cd99821f8a Fix py26 difference in ssl socket connect call from 99ba9d6 10 years ago
James Cammarata b827f791e1 Merge pull request #8832 from sivel/rax-validate-regions
rax modules: Perform region validation early
10 years ago
James Cammarata 35dfbff2e1 Merge pull request #8817 from meatballhat/support-sunos-certs-location
Supporting SSL cert location on SunOS (SmartOS, really)
10 years ago
Matt Martz 55ed4489e3 Perform region validation early to be more explicit about invalid region failures 10 years ago
Dan Buch 290f2759e1 Supporting SSL cert location on SunOS (SmartOS, really) 10 years ago
Trond Hindenes 72760f5999 All changes referenced in PRs #8767 , #8768 , #8769 :
This changes the get-attr function slightly, and lets the module specify whether a param is needed and auto-fails if it is not present. A module can now verify params like so::
 $params = Parse-Args $args;
 $result = New-Object psobject;
 Set-Attr $result "changed" $false;
 $path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result

or

$params = Parse-Args $args;
 $result = New-Object psobject;
 Set-Attr $result "changed" $false;
 $path = Get-Attr -obj $params -name path -failifempty $true -emptyattributefailmessage "Oh man. You forgot the main part!" -resultobj $result

slight tweak in how the powershell module converts to json in order to support nested objects (allows for more complex facts, among others)

This script gathers some extended facts on windows hosts in a json array attribute called "ansible_interfaces". This info is needed for some network-related modules I'm working on. Required the update to powershell.ps1 to return deeply nested json objects.
10 years ago
James Cammarata dbc980eaf4 Merge branch 'mischapeters-devel' into devel 10 years ago
James Cammarata 70ff6d35aa A10 module improvements
* moved common code to an module_util snippet
* rewrote logic to make each module idempotent
* added new capabilities like the write_config option
10 years ago
Michael DeHaan b7082677de Merge pull request #8790 from sivel/issue/8784
Don't use ternary if statements. Fixes #8784
10 years ago
James Cammarata 7fbdbcdec7 Default fetch_url to use TLSv1 instead of SSLv2/3 10 years ago
James Cammarata 99ba9d6e24 Default fetch_url to use TLSv1 instead of SSLv2/3 10 years ago
Matt Martz 2b307985bc Don't use ternary if statements. Fixes #8784 10 years ago
James Cammarata c21c66c740 Merge branch 'file_symbolic_mode' of https://github.com/pbitty/ansible into pbitty-file_symbolic_mode 10 years ago
James Cammarata 3b19b83806 Add GovCloud region to list of regions for AWS
Fixes #8604
10 years ago
James Cammarata 24c4277479 Remove tabs added from 677de07 10 years ago
James Cammarata 5e240fec71 Merge branch 'devel' of https://github.com/l1k/ansible into l1k-devel
Conflicts:
	test/integration/roles/test_copy/tasks/main.yml
10 years ago
James Cammarata 3a7aca6066 Fix no_log value for content in common file args settings
Also adds a test to ensure the content value is not logged.

Related to #8647
10 years ago
Lukas Wunner 677de07f44 Try optimistic chown, do not error out if not permitted to chown
Add unit test
10 years ago
James Cammarata 8dafacd4e9 Make env param a dict type instead of list
Also modifies param type checking code to remove whitespace from
around params before splitting them into k=v pairs.

Fixes #8199
10 years ago
James Cammarata 600a4657b4 Catch error in atomic_move when creating temporary file
Fixes #8480
10 years ago
Lukas Wunner f4053fcf3a Only chown on atomic move if invoked as root
Linux and BSD derivatives do not allow unprivileged users to
"give away" files to others for security reasons. (System V
derivatives allow that but they're rare nowadays.)
10 years ago
James Cammarata 83fa9a8cde Make sure we only use unquote on quoted lines in lineinfile when needed 10 years ago
James Cammarata 9f34ea54f5 Correct parser to ignore escaped quotes when not in quotes already
Related to #8481
10 years ago
Michael DeHaan e01d5f9d84 Revert "Added cross-platform uptime fact" since causing failures on Ubuntu.
This reverts commit 14a9966984.

Conflicts:

	lib/ansible/module_utils/facts.py
10 years ago
Michael DeHaan ea53576759 Merge pull request #6777 from GuiGui2/devel
Setup module: Additional facts when using ansible with Linux on System z
10 years ago
Michael DeHaan 5d05049ee1 Merge pull request #7670 from dagwieers/patch-3
Added cross-platform uptime fact
10 years ago
Michael DeHaan a48328fa12 Merge pull request #7725 from slapers/network-secondaries-issue
fix incorrect secondary ip handling, fixes #7724
10 years ago
James Cammarata 63bf2f6d9a Preserve all line breaks in literal blocks
Fixes #8512
10 years ago
Michael DeHaan d0205b2878 Merge pull request #8500 from sivel/rax-de-dupe
rax: Move additional shared code into module utils
10 years ago
Michael DeHaan 8c4161d4a1 Merge branch 'retf_py' of git://github.com/berendt/ansible into devel
Conflicts:
	lib/ansible/inventory/vars_plugins/group_vars.py
	plugins/callbacks/mail.py
10 years ago
Michael DeHaan 66eddfd491 Merge branch 'nova-compute-enhancements' of git://github.com/emonty/ansible into devel
Conflicts:
	lib/ansible/module_utils/openstack.py
	library/cloud/nova_compute
10 years ago
Michael DeHaan b413a7d7f3 Merge pull request #8449 from emonty/feature/openstack-auth-handling
Handle auth arguments across openstack modules consistently
10 years ago