Commit Graph

475 Commits (b9b1e294d7151aa2b0dbeeb597a7a2e3c80ecbed)

Author SHA1 Message Date
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
Monty Taylor b659621575 Remove unneeded required_one_of for openstack
We're being too strict - there is a third possibility, which is that a
user will have defined the OS_* environment variables and expect them to
pass through.
2015-05-29 13:09:45 -07:00
Toshio Kuratomi 2924c90a5d Merge pull request #10977 from emonty/fix-envvars
Fix envvars support in openstack modules
2015-05-29 13:05:03 -07:00
Jon Hawkesworth 12691ce109 Add -Compress to ConvertTo-Json calls in common powershell code 2015-05-29 10:40:24 -04:00
Jon Hawkesworth 9371c38af9 Add -Compress to ConvertTo-Json calls in common powershell code 2015-05-29 14:50:08 +01:00
Stefan Midjich e5190327f2 this fixes ansible on openbsd and freebsd systems. only tested on openbsd. 2015-05-28 19:17:31 -04:00
James Cammarata 60bea844b3 Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:27:09 -05:00
James Cammarata 2bad888f28 Merge branch 'v2_final' into devel_switch_v2
Conflicts:
	lib/ansible/inventory/__init__.py
	lib/ansible/modules/core
	lib/ansible/utils/__init__.py
	lib/ansible/utils/module_docs.py
2015-05-28 15:26:03 -05:00
Toshio Kuratomi afc19894e1 Make fetch_url check the server's certificate on https connections 2015-05-28 13:20:40 -07:00
Toshio Kuratomi 1ccf2a4685 Make fetch_url check the server's certificate on https connections 2015-05-28 12:35:37 -07:00
James Cammarata e59d4f3b51 More module_utils/basic.py unit tests for v2 2015-05-28 01:26:04 -05:00
James Cammarata 339a02c384 Started reworking module_utils/basic unit tests (v2) 2015-05-27 03:21:15 -05:00
Toshio Kuratomi d793ed360b Fix syntaxerror in the required_if arg spec check 2015-05-26 11:30:06 -07:00
Toshio Kuratomi 0f23d8a503 Fix syntaxerror in the required_if arg spec check 2015-05-26 11:29:35 -07:00
Monty Taylor 31609e1b16 Add required_if to AnsibleModule
There is a common pattern in modules where some parameters are required
only if another parameter is present AND set to a particular value. For
instance, if a cloud server state is "present" it's important to
indicate the image to be used, but if it's "absent", the image that was
used to launch it is not necessary. Provide a check that takes as an
input a list of 3-element tuples containing parameter to depend on, the
value it should be set to, and a list of parameters which are required
if the required parameter is set to the required value.
2015-05-26 11:21:38 -07:00
Toshio Kuratomi c6b286424f Merge pull request #9423 from emonty/features/required-if
Add required_if to AnsibleModule
2015-05-26 11:20:40 -07:00
Stefan Midjich 540c23dfce this fixes ansible on openbsd and freebsd systems. only tested on openbsd. 2015-05-26 12:04:35 -04:00
Brian Coca 16c70dd7d4 added equivalent of #9636 to v2 2015-05-26 11:55:52 -04:00
Brian Coca 6000db7e5d Merge pull request #9636 from Batmat/fix-message-i18n-parsing-error
Setting LC_MESSAGES: prevent unparseable messages (fixes issue #9635)
2015-05-26 11:49:56 -04:00
Etienne CARRIERE 3775dd5ec8 Factor F5 primitives 2015-05-25 09:53:23 +02:00
Toshio Kuratomi bb81f025b0 Merge pull request #8679 from j0057/support-arch-8653
Add support for Arch to module_utils.basic.py
2015-05-20 22:57:54 -07:00
Rene Moser 8da580a29c basic: fix ValueError if value of a type='int' is not an int
With this fix, we get a friendly error message:

    failed: [localhost] => {"failed": true}
    msg: value of argument start_port is not of type int and we were unable to automatically convert
2015-05-19 11:51:56 -04:00
Rene Moser 8f29ca23ae basic: fix ValueError if value of a type='int' is not an int
With this fix, we get a friendly error message:

    failed: [localhost] => {"failed": true}
    msg: value of argument start_port is not of type int and we were unable to automatically convert
2015-05-19 17:40:46 +02:00
Till Maas 02d784598f facts: Simplify ssh key fetching 2015-05-15 22:36:13 +02:00
Till Maas e7846343e5 facts: Add ed25519 ssh pubkey 2015-05-15 22:25:20 +02:00