Commit Graph

707 Commits (9abb1070440337b209433843805e39a7c51b4fee)

Author SHA1 Message Date
Brian Coca 8d3da20302 fixed bsd service_mgr_facts using removed check_init fucntion 2015-11-03 11:43:50 -05:00
Brian Coca eb04650ffb Merge pull request #12162 from bcoca/service_mgr_facts
fact gathering service_mgr info
2015-11-02 15:34:43 -05:00
Brian Coca a1a5dadef6 remove uneeded module 2015-11-02 15:36:11 -05:00
Toshio Kuratomi 3219744d32 One more stdlib import in module_utils 2015-11-02 12:25:18 -08:00
Brian Coca d194e2c788 check_systemd is not inline but a private fact function now 2015-11-02 15:23:47 -05:00
Brian Coca e9efd008ed moved distutils import to mac, darn solaris would complain in certain cases 2015-11-02 15:23:47 -05:00
Brian Coca 99d775a0c1 fact gathering service_mgr info
also added dragonfly facts support
2015-11-02 15:23:47 -05:00
Toshio Kuratomi 1bc75374dc Add imports for stdlib modules that are used.
This is cleanup that will aid us when we get ziploader implemented for 2.1
2015-11-02 12:02:26 -08:00
Rene Moser c09a34bb10 cloudstack: clean up unneeded ";" 2015-11-01 17:13:46 +01:00
Brian Coca f528ad1848 added xbps pkg mgr to facts 2015-10-31 22:03:12 -04:00
James Cammarata 0e447e3f41 Merge branch 'devel' of https://github.com/mathieumd/ansible into mathieumd-devel 2015-10-21 13:59:51 -04:00
Toshio Kuratomi 6e5055e786 Update the use of no_log values to cover everything that heuristic_log_sanitize does.
Fixes #12792
2015-10-21 08:15:46 -07:00
gduke 744679601f Remove mutable default arguments. 2015-10-20 22:13:23 -07:00
Toshio Kuratomi c2d188baff Hide values in json returns which were given in parameters marked no_log. 2015-10-20 12:42:36 -07:00
Mathieu 260a3e5ce7 Fixes #11055 - Set locale via LC_ALL 2015-10-19 21:25:30 +02:00
Toshio Kuratomi 28c933ce5e properly fail_json when we don't have ssl on a non-redhat distro 2015-10-16 08:06:32 -07:00
Brian Coca c57200925f made syslog import optional as intel's edison custom compiles python w/o it 2015-10-14 09:12:02 -04:00
Toshio Kuratomi 15d7f53846 AnsibleModules.log() fix for python3
Also add unittests for AnsibleModules.log()

Fixes #12586
2015-10-12 13:30:27 -07:00
Charles Paul 3d533cb423 fixing calls to fail_json 2015-10-12 08:50:18 -05:00
Brian Coca 50372eecc9 Merge pull request #12455 from privateip/devel
added methods for retrieving vapp and vm
2015-10-12 09:37:47 -04:00
Brian Coca ec02b255c3 Merge pull request #12689 from soarpenguin/bugfix
Remove some warning of undefined name and fix classmethod syntax error.
2015-10-09 11:09:50 -04:00
Shayne Clausson 55b3f9e4e5 Use AWS_DEFAULT_REGION env var if none specified 2015-10-09 10:27:36 +02:00
soarpenguin 5efa4d29e3 fix some warning of undefined name. 2015-10-09 12:43:42 +08:00
= 345ce424c6 Explictly set the version of strict mode to use for powershell modules. 2015-10-07 06:24:37 +01:00
Peter Sprygada ab3239ecd7 added methods for retrieving vapp and vm 2015-10-02 18:01:35 -04:00
Brian Coca 1a56a5c442 created debug method, renamed debug attribute to _debug 2015-10-01 10:17:41 -04:00
Toshio Kuratomi 4cfcf5d61b Merge pull request #12568 from mgedmin/py3k
Python 3: fix most tests for ansible.module_utils.basic
2015-09-30 12:47:29 -07:00
Trond Hindenes 94cfbe7ee9 Get-AnsibleParam 2015-09-30 21:02:12 +02:00
Marius Gedminas cc1e1648f5 Tweak comment style 2015-09-30 18:46:50 +03:00
Marius Gedminas 213029a21e Python 3: don't convert unicode to unicode 2015-09-30 18:46:49 +03:00
Marius Gedminas c7be004c19 Python 3 has no dict.iteritems()
(Reminder: cannot use six here, module_utils get shipped to remote
machines that may not have six installed -- besides six doens't support
Python 2.4.)
2015-09-30 18:46:49 +03:00
Marius Gedminas 9f3e5ceb14 Make sure 'basestring', 'bytes' and 'unicode' are defined
Python 3 doesn't have 'basestring' and 'unicode'.

Python 2.4 doesn't have 'bytes'
2015-09-30 18:40:47 +03:00
Brian Coca ddafed4403 Merge pull request #12528 from bcoca/task_logging
task logging revamp
2015-09-30 11:38:34 -04:00
Brian Coca 7b64126c9d pushed up openvz detection for cases of 'stacked' virtualization 2015-09-30 11:27:50 -04:00
Linus Unnebäck 45f9800754 facts: correctly detect docker inside a xen host 2015-09-30 17:08:21 +02:00
Konstantin Manna 4226e49bc6 bugfix: statement had no effect => statement now has assumed effect 2015-09-28 23:33:48 -04:00
Brian Coca 8d024c3747 Merge pull request #12472 from resmo/for_ansible
cloudstack: improvements and tests
2015-09-28 14:27:22 -04:00
Toshio Kuratomi 056a020357 Do not fail if /proc/uptime is not present
This can happen in chroot environments that don't have all of /proc
available
2015-09-26 10:00:28 -07:00
Brian Coca 37a918438b task logging revamp
* allow global no_log setting, no need to set at play or task level, but can be overriden by them
 * allow turning off syslog only on task execution from target host (manage_syslog), overlaps with no_log functionality
 * created log function for task modules to use, now we can remove all syslog references, will use systemd journal if present
 * added debug flag to modules, so they can make it call new log function conditionally
 * added debug logging in module's run_command
2015-09-25 23:57:28 -04:00
Brian Coca 191ae0831d fixed syntax error 2015-09-25 17:15:26 -04:00
Brian Coca 48412c13b2 fixed copy n paste typo on future code 2015-09-25 17:08:03 -04:00
Brian Coca 1c49e3b842 draft shared service code for modules, part of spliting service module 2015-09-25 11:26:21 -04:00
Toshio Kuratomi dcdcd9e9c5 Move is_executable to the toplevel of basic.py so we can utilize it from other code 2015-09-25 07:48:57 -07:00
Gerben Geijteman 4c20964475 Add Weekday (0-6) as a number and add weeknumber (00-52) 2015-09-24 15:05:44 +02:00
Marius Gedminas 2c4982b58d Python 3: there's no itertools.imap
Because the builtin map() acts like an iterator already.
2015-09-23 10:04:26 +03:00
Marius Gedminas 6708d56a21 Python 3: avoid long integer literals
Even Python 2.4 automatically promotes int to long.
2015-09-23 10:04:25 +03:00
Marius Gedminas f5d4935197 Python 3: treat python as a function in module_utils/basic.py
NB: we can't use 'from __future__ import print_function', but luckily
print(one_thing) works fine on both Python 2 and Python 3 without that.
2015-09-23 10:04:25 +03:00
Marius Gedminas e71a986e16 Python 3: avoid octal constants in module_utils/basic.py 2015-09-23 10:04:25 +03:00
Marius Gedminas d2bec7f81f Python 3: avoid "except ..., e:" in module_utils/basic.py
Make the code compatible with Pythons 2.4 through 3.5 by using
sys.exc_info()[1] instead.

This is necessary but not sufficient for Python 3 compatibility.
2015-09-23 10:04:25 +03:00
Rene Moser b43939dfd6 cloudstack: make tags handling idempotence
Credits to @jeffersongirao, who provided the patch.
2015-09-22 16:12:35 +02:00
Rene Moser efd122c2f0 cloudstack: add returns_to_int return handling into utils
It is not uncommon that the API returns string for int values e.g. ports in listFirewallRules or listPortForwardings,
2015-09-22 14:44:08 +02:00
Rene Moser c9a3801a25 cloudstack: common argument_spec and requried_together to utils 2015-09-22 14:36:43 +02:00
Brian Coca d27b73e7b5 fixed case in which boto3 is present but module is not using it yet 2015-09-21 15:16:07 -04:00
Peter Sprygada e45b71d6cd added new module object to vca 2015-09-18 13:45:37 -04:00
Brian Coca aca83b15e5 Merge pull request #12425 from privateip/devel
initial add of vca common module
2015-09-18 11:24:54 -04:00
Brian Coca 11707576a3 fix for AIX network facts
fixes #12434
2015-09-18 10:43:53 -04:00
Brian Coca d7b61db6dc made boto3 non mandatory 2015-09-18 08:05:33 -04:00
Peter Sprygada 8f43d222c0 initial add of vca common module 2015-09-17 14:41:53 -04:00
Chris Church 5c65ee7f0c Add PowerShell exception handling and turn on strict mode.
* Add exception handling when running PowerShell modules to provide exception message and stack trace.
* Enable strict mode for all PowerShell modules and internal commands.
* Update common PowerShell code to fix strict mode errors.
* Fix an issue with Set-Attr where it would not replace an existing property if already set.
* Add tests for exception handling using modified win_ping modules.
2015-09-15 16:32:35 -04:00
Monty Taylor 3bdd6793ca Add no-log parameter to common openstack args
These bad boys can contain secret data, so should be marked no-log.
2015-09-13 19:48:37 +02:00
Benno Joy 6de13c3062 Merge pull request #11818 from Java1Guy/module_utils_ec2_for_ecs
change ec2 util to create only requested objects
2015-09-10 11:06:19 +05:30
Toshaan Bharvani 4702d2be09 added Manjaro as an Archlinux family 2015-09-05 12:49:20 +02:00
Tim Rupp 6f41a72158 Adds utf-8 encoding to f5 module_utils
The contributor's name on line 10 (originally line 7) includes a character
that the default Python encoding (ASCII) raises an error on when interpreting
the file.

Specifying the utf-8 encoding, as is done in other modules, resolves
the error.

The error being raised is

SyntaxError: Non-ASCII character '\xc3' in file /.../lib/ansible/module_utils/f5.py
on line 7, but no encoding declared; see http://www.python.org/peps/pep-0263.html
for details
2015-09-01 08:10:23 -07:00
Desmond O. Chang 58c3539196 Add host key for ssh url only.
Rewrite function `get_fqdn`.  It returns fqdn for all kinds of urls now.

`add_git_host_key` determines whether a url is ssh and whether its host
key should be added.
2015-08-31 13:42:32 -07:00
James Cammarata 2043fcd5db Merge pull request #12083 from resmo/for-ansible
cloudstack: implement general api_region support, update docs
2015-08-28 13:14:50 -04:00
maty0609 6f24e6f994 Adding support for Archlinux and Slackware in fallback
In some cases Archlinux and Slackware is not detected by
platform.dist(). This should solve the issue.
2015-08-27 10:22:02 +01:00
Rene Moser 3db4039ad1 cloudstack: implement general api_region support, update docs 2015-08-25 13:54:21 +02:00
James Cammarata db65503778 Revert "Add PowerShell exception handling and turn on strict mode." 2015-08-23 21:09:16 -04:00
Chris Church 4b2cdadc98 Add PowerShell exception handling and turn on strict mode.
* Add exception handling when running PowerShell modules to provide exception message and stack trace.
* Enable strict mode for all PowerShell modules and internal commands.
* Update common PowerShell code to fix strict mode errors.
* Fix an issue with Set-Attr where it would not replace an existing property if already set.
* Add tests for exception handling using modified win_ping modules.
2015-08-22 18:28:07 -04:00
Rene Moser d16429b59c cloudstack: rename returns for consistency 2015-08-19 21:25:19 +02:00
Rene Moser 2913d2b44d cloudstack: add more common returns 2015-08-17 08:21:37 +02:00
Brian Coca c6733cc1a7 Merge pull request #9225 from qvicksilver/aix_unprivileged
AIX unprivileged facts collection
2015-08-12 23:48:44 -04:00
Rene Moser 4f3c863b42 cloudstack: refactor get_result()
* A commen dict of keys has been defined, which we look in results returned from the API.
* self.returns dict can be use in subclass to extend this dict.
* Optionally the key name can be replaced with a new key name, often used to make the return keys identical to the arguments passed.
* Use new style class
2015-08-12 23:14:17 +02:00
Brian Coca 6bceee9a93 now lvs/vg facts are only attempted if binary found 2015-08-12 10:53:13 -04:00
Alexander Gubin 1ea1b9fb13 bugfix: missing path for lvm facts 2015-08-12 16:35:31 +02:00
Brian Coca ae9d264b86 Merge pull request #11762 from amenonsen/9795-rebase
Add LVM facts to setup module
2015-08-12 08:55:08 -04:00
Rene Moser e62fbf5fba cloudstack: add get_result() in utils to return common results 2015-08-11 18:03:50 +02:00
Toshio Kuratomi 00b1a2c865 Restore ValueError in md5 method and change finding the available hash algorithms so we only have to do it once 2015-08-06 14:40:28 -07:00
Toshio Kuratomi 80cb69214b Merge pull request #11840 from muffl0n/module_utils_hash_algorithms
Add get_available_hash_algorithms()
2015-08-06 14:29:31 -07:00
Brian Coca 08e6c1d82b avoid possible errors with new broadcast handling in linux 2015-08-06 09:00:52 -04:00
Brian Coca 262c75c253 Merge pull request #10971 from mightydok/debbraoadcastfix
Add missed broadcast address to linux network facts.
2015-08-06 08:52:55 -04:00
Brian Coca 2b9b3a08a1 make sure you only update pci data if there is a match 2015-08-05 09:44:37 -04:00
muffl0n 8d6d711a5c move get_available_hash_algorithms() from get_url 2015-08-04 08:57:36 +02:00
James Cammarata 13b8a57d3d Undo previous travis/tox fixes and fix underlying issue 2015-07-31 23:01:43 -04:00
Chris Church 74df17de29 Add an option for PowerShell modules to indicate support for check mode, skip running module if check mode is not supported. 2015-07-31 14:48:51 -04:00
Chris Church e87cf4a3cc Fixes for WinRM/PowerShell support in v2.
- Add support for inserting module args into PowerShell modules.  Fixes #11661.
- Support Windows paths containing spaces.  Applies changes from #10727 to v2.  Fixes #9999.  Should also fix ansible/ansible-modules-core#944 and ansible/ansible-modules-core#1007.
- Change how execution policy is set for running remote scripts.  Applies changes from #11092 to v2.  Also fixes ansible/ansible-modules-core#1776.
- Use codepage 65001 (UTF-8) for WinRM connection instead of default (CP437), convert command to UTF-8 and results from UTF-8.  Replaces changes from #10024.  Fixes #11198.
- Close WinRM connection when task completes.
- Use win_stat, win_file and win_copy modules instead of stat, file and copy when called from within other action plugins (only when using WinRM+PowerShell).
- Unquote Windows path arguments before passing to win_stat, win_file, win_copy and slurp modules (only when using WinRM/PowerShell).
- Check for win_ping module to determine if core modules are missing (only when using WinRM/PowerShell).
- Add stdout_lines to result from running low level commands (so stdout_lines is available when using raw/script).
- Update copy action plugin to use shell functions for joining paths and checking for trailing slash.
- Update fetch action plugin to unquote source path when using Windows paths.
- Add win_copy and win_template action plugins that inherit from copy and template.
- Support running .bat and .cmd scripts using default system encoding instead of UTF-8.
- Always send PowerShell commands as base64-encoded blobs to allow for running simple PowerShell commands via raw.
- Support running modules on Windows with interpreters other than PowerShell.
- Update integration tests to support above changes and test unicode fixes.
- Add test for win_user error from ansible/ansible-modules-core#1241 (fixed by ansible/ansible-modules-core#1774).
- Add test for additional win_stat output values (implemented by ansible/ansible-modules-core#1473).
- Add test for OS architecture and name from setup.ps1 (implemented by ansible/ansible-modules-core#1100).

All WinRM integration tests pass for me with these changes.
2015-07-31 14:38:31 -04:00
Mark Chance 437d4deffc change ec2 util to create only requested objects 2015-07-31 09:47:24 -06:00
Jonathan Süssemilch Poulain 02294c52ce Typo 2015-07-31 13:25:42 +02:00
Jonathan Süssemilch Poulain 4614a574ea Allows network network interface facts collection as an unprivileged user and adds more facts 2015-07-31 10:39:02 +02:00
Jonathan Süssemilch Poulain e181bcf62b Allows to fetch machine architecture as an unprivileged user 2015-07-31 10:35:10 +02:00
Brian Coca b37be236d9 Merge pull request #11475 from nibalizer/cfacter_support
Use cfacter instead of facter if possible
2015-07-29 22:46:21 -04:00
Brian Coca 527ae360b0 Merge pull request #10652 from vodik/nspawn
Support querying systemd container information
2015-07-29 21:51:58 -04:00
Joseph Callen 2f5ced8856 Moving VMware Utilites module
Moved `vmware.py` from v1 to `lib/ansible/module_utils/vmware.py`.

No other changes has been made since these two PRs:
https://github.com/ansible/ansible/pull/10812
https://github.com/ansible/ansible/pull/10760
2015-07-29 17:16:15 -04:00
Brian Coca 80ecab5317 Merge pull request #11761 from amenonsen/9843-rebase
Add pciid to LinuxNetwork interface fact
2015-07-27 22:20:04 -04:00
Hugh Saunders f344ec463f Add LVM facts to setup module
This commit adds LinuxHardware.get_device_facts() and calls that from
.populate().

LVM facts are only gathered if the setup module is running as root and
the lvm utilities are available (tested by searching for 'vgs').

If the conditions are met, facts are set for each volume group and
logical volume.

Example:

Test LVM Data:
$ sudo vgs
  VG   #PV #LV #SN Attr   VSize VFree
  test   1   2   0 wz--n- 5.00g 2.00g
$ sudo lvs
  LV      VG   Attr      LSize Pool Origin Data%  Move Log Copy%  Convert
  testlv  test -wi-a---- 1.00g
  testlv2 test -wi-a---- 2.00g

Facts Returned:
$ ansible localhost -i /tmp/inv -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {
        "ansible_lvm": {
            "lvs": {
                "testlv": {
                    "size_g": "1.00",
                    "vg": "test"
                },
                "testlv2": {
                    "size_g": "2.00",
                    "vg": "test"
                }
            },
            "vgs": {
                "test": {
                    "free_g": "2.00",
                    "num_lvs": "2",
                    "num_pvs": "1",
                    "size_g": "5.00"
                }
            }
        }
    },
    "changed": false
}

Test as non-root:
$ ansible localhost -i /tmp/inv-user -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {},
    "changed": false
}

Test without lvm utilities available
$ sudo mv /sbin/vgs{,.bk}
$ ansible localhost -i /tmp/inv -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {},
    "changed": false
}
2015-07-28 07:46:01 +05:30
Brian Coca 5f8db9cd4b changed verbose_override to the new _ansible_verbose_override to keep in line with previous changes
output now defaults back to having indent=4
2015-07-27 22:15:44 -04:00
Trapier Marshall 250620f2ab Add pciid to LinuxNetwork interface fact
This commit adds pciid to the LinuxNetwork fact object.

pciid is gathered if the symlink /sys/class/net/*/device exists.

Example [>>>> emphasis <<<<]:

$ readlink /sys/class/net/eth0/device
../../../0000:01:00.0

$ ansible localhost --ask-pass -i /tmp/hosts -m setup -a "filter=ansible_eth0"
SSH password:
localhost | success >> {
    "ansible_facts": {
        "ansible_eth0": {
            "active": false,
            "device": "eth0",
            "macaddress": "0c:d2:92:5d:6e:8e",
            "module": "alx",
            "mtu": 1500,
       >>>> "pciid": "0000:01:00.0", <<<<
            "promisc": true,
            "type": "ether"
        }
    },
    "changed": false
}
2015-07-28 07:30:03 +05:30
Brian Coca 8746e692c1 changed check to allow for powerpc
fixes #11528
2015-07-27 21:44:17 -04:00
Toshio Kuratomi d2346fd2e2 Python2.4 compat fix 2015-07-27 15:34:51 -07:00
Toshio Kuratomi 6a68be4e28 Handle quoting of values in dict parameters 2015-07-27 12:31:05 -07:00
Reed Loden eb1fb41576 Add several DNS-related facts by parsing /etc/resolv.conf
Facts include nameservers, domain, search path, sortlist, and options.
2015-07-26 10:46:59 -07:00
Toshio Kuratomi 8ee3b7384d Guard the PROTOCOL setting so that we work on older pythons 2015-07-24 15:07:02 -07:00
Brian Coca 3bf1edfd96 Merge pull request #11591 from defionscode/boto3
Connection function for boto3
2015-07-23 15:54:28 -04:00
Toshio Kuratomi ddec06ccfe Detect the old python-json library
Fixes #11654
2015-07-20 12:35:26 -07:00
Toshio Kuratomi a0a6d12b05 Merge pull request #11603 from ansible/get_url-tls-compat
Have openssl autonegotiate tls protocol on python < 2.7.9
2015-07-20 09:43:59 -07:00
Brian Coca 03d7c8d7ca fixed new HPUX networking facts 2015-07-20 10:27:04 -04:00
Brian Coca 91f2acb029 Merge pull request #10203 from pdelared/devel
Add HP-UX network facts
2015-07-20 10:16:31 -04:00
Brian Coca 4f98fac494 Merge pull request #10914 from bcoca/non_posix_file_copy_fix
hack to prevent tempalte/copy errors on vagrant synced folders
2015-07-18 23:08:08 -04:00
Indrajit Raychaudhuri 4553a41ab5 Add homebrew to package managers' list 2015-07-18 19:46:26 -05:00
Jonathan Davila 6ea772931f Connection function for boto3
Boto3 conn
2015-07-15 16:52:01 -04:00
Toshio Kuratomi 3d3e1c82a2 Have openssl autonegotiate tls protocol on python < 2.7.9
This allows usage of tls-1.1 and tls-1.2 if the underlying openssl
library supports it.  Unfortunately it also allows sslv2 and sslv3 if
the server is only configured to support those.  In this day and age,
that's probably something that the server administrator should fix
anyhow.
2015-07-15 13:17:00 -07:00
Toshio Kuratomi 327b1676a8 Add support for SNI and TLS-1.1 and TLS-1.2 to the fetch_url() helper
Fixes #1716
Fixes #1695
2015-07-14 12:48:35 -07:00
Brian Coca 8793308c39 made md5 into generic checksum function that uses sha now 2015-07-14 07:28:32 -04:00
Iiro Uusitalo 4e7542af37 Merge upstream changes 2015-07-10 08:44:20 +03:00
Iiro Uusitalo 403f4881ee Enables 'basic auth force' -feature globally 2015-07-09 23:11:52 +03:00
Toshio Kuratomi dd058a1dc2 Fix required_if (needed to pass list to _count_terms) 2015-07-08 09:45:02 -07:00
Brian Coca 2c9d1257ba put type checking before looking against choices array to always get type comparrison correctly 2015-07-05 19:55:11 -04:00
Jon Hadfield 82e00b1022 add facts for datetime 8601 basic and basic short. 2015-07-05 17:23:22 +01:00
Spencer Krum 3887173c2c Use cfacter instead of facter if possible
CFacter is the facter replacement written in C++. It is available from
the puppetlabs repo.
2015-07-04 09:13:20 -07:00
verm666 d91947ee96 facts: add aliases to ansible_all_ipv4_addresses on OpenBSD 2015-07-02 15:36:56 +03:00
James Cammarata cf51d0a790 Fixing up some check-mode stuff 2015-07-01 15:10:25 -04:00
James Cammarata 7fa37870c8 Merge pull request #9683 from justinwyer/logical-block-size-and-sectors-9549
Disk size for advanced drives over 2 TB is incorrect
2015-07-01 14:14:04 -04:00
Toshio Kuratomi be6db1a730 Refactor the argspec type checking and add path as a type 2015-06-29 08:05:58 -07:00
Rene Moser 7952723530 cloudstack: fix domain name is not unique, use full path 2015-06-26 09:25:26 +02:00
Rene Moser b9b1e294d7 cloudstack: add get_or_failback() 2015-06-26 09:25:26 +02:00
Toshio Kuratomi 9911a947ed Vendorize match_hostname code so that ansible can push it out to clients along with the code that uses it. 2015-06-25 08:17:58 -07:00
Toshio Kuratomi 160e71e2cf Some flake8 cleanup 2015-06-25 07:13:37 -07:00
Toshio Kuratomi a1a7d6c462 Fix forwarding the user-given params from fetch_url() to open_url() 2015-06-23 15:17:26 -07:00
Dag Wieers 4ca4d36ae6 Change syslog (priority) level from LOG_NOTICE to LOG_INFO
If you look at the meaning of the different syslog levels, NOTICE means that the event may need someone to look at it. Whereas INFO is pure informational.

Since module invocations are in fact requested (deliberate) actions, they shouldn't need any additional post-processing, and therefore should not be logged as NOTICE.

This may seem like hairsplitting, but correctly categorizing system events helps weeding through the noise downhill.

According to Wikipedia: https://en.wikipedia.org/wiki/Syslog

5 	Notice 		notice 	Events that are unusual but not error conditions .
6 	Informational 	info 		Normal operational messages -no action required. Example an application has started, paused or ended successfully.
2015-06-18 11:00:10 +02:00
Brian Coca d7fcd9456a Merge pull request #11288 from kstrauser/aixfixes
Don't panic if AIX's uname doesn't support -W
2015-06-16 19:02:50 -04:00
Kirk Strauser eb820837ac Don't panic if AIX's uname doesn't support -W
The current code expects "uname -W" on AIX to always succeed. The AIX 5
instance I have doesn't support the -W flag and facts gathering always
crashes on it.

This skips some WPAR handling code if "uname -W" doesn't work.
2015-06-16 15:26:02 -07:00
Kirk Strauser 935da01068 Fixes for FreeBSD get_memory_facts
- swapinfo on FreeBSD 6 (maybe 7 too?) doesn't support the "-m" flag for
  fetching amounts in megabytes. This patch fetches amounts in kilobytes
  and divides by 1024 (and also returns the result as an int instead of
  a string).

- When no swap is configured, swapinfo prints a header line and nothing
  else:

    $ swapinfo
    Device         1K-blocks     Used    Avail Capacity

  The old version unexpectedly parsed that header line and emitted
  nonsense values like:

    "ansible_swapfree_mb": "Avail"
    "ansible_swaptotal_mb": "1K-blocks"

  This version emits those items altogether.
2015-06-16 14:35:36 -07:00
Toshio Kuratomi 4161d78a94 Split the fetch_url() function into fetch_url and open_url().
open_url() is suitable for use outside of a module environment.  Will
let us use open_url to do SSL cert verification in other, non-module
code.
2015-06-12 12:54:56 -07:00
Brian Coca f174682e19 facts should now not be overriten with NA option unless they are NA
this way we don't need a break per distro that matched already with
the python default functions
2015-06-11 00:48:40 -04:00
Brian Coca aa6e204b6e Merge pull request #11115 from jhawkesworth/second_go_at_fixing_1404
Part fix for https://github.com/ansible/ansible-modules-core/issues/1404 (replaces #11086)
2015-06-10 20:43:32 -04:00
Rene Moser 0b074c449b cloudstack: methods renaming 2015-06-10 17:31:46 +02:00
Rene Moser 7b3dd55c3d cloudstack: remove unused methods used for backward compatibility 2015-06-10 17:28:45 +02:00
Rene Moser fc3020c57a cloudstack: prevent getting the wrong project.
Since we use domain and account data to filter the project, listall is not needed and can return the wrong identical named project of another account if root admin permissions are used.

Fixed projects names are not case insensitive.
2015-06-09 16:16:58 +02:00
Etienne CARRIERE 94fa5e8794 Simplify Fully Qualified function 2015-06-03 21:19:11 +02:00
Etienne CARRIERE 5204d7ca88 Add common fonctions for F5 modules (FQ Name functions) 2015-06-03 08:20:26 +02:00
Rene Moser caf3cf6930 cloudstack: add timeout to utils 2015-06-02 14:51:25 +02:00
James Cammarata e547e1f9ba Merge branch 'devel' into devel_switch_v2 2015-06-01 16:53:15 -05:00
James Cammarata fe41f109a9 Merge branch 'v2_final' into devel_switch_v2 2015-06-01 16:42:59 -05:00
James Cammarata 4bc7703db3 Fixing some small bugs related to integration tests (v2) 2015-06-01 16:42:10 -05:00
Jon Hawkesworth 30b92a6f4c Get-FileChecksum allways returns a string now,
and the test_win_copy integration tests that depend on the checksum
have been updated in this change too.
2015-06-01 21:53:49 +01:00
Brian Coca 9a90ca5a36 Merge pull request #11062 from Etienne-Carriere/factor_f5
Factor primitives for F5 modules
2015-06-01 10:34:11 -04:00
sysadmin75 816b20af0b Fixes #11046 2015-06-01 10:24:20 -04:00
sysadmin75 908d6c0ef2 Fixes #11046 2015-05-31 20:05:02 -04:00
Brian Coca 7e020d21de correctly identify ubuntu now in all cases
made NA the last resort
2015-05-29 16:19:09 -04:00
Brian Coca a8c290cc3b fixed ubuntu facts for all versions
made sure NA is option of last resort
2015-05-29 16:14:30 -04:00