Commit graph

27964 commits

Author SHA1 Message Date
Ner'zhul
7603ae33b5 vmware_guest improvements: annotations & customvalues (#20052)
* Idempotency fix on annotations permitting to change them on reconfiguration
* Permit to set VMware customvalues attributes on VM
* Gather annotation & customvalues and report it into module facts
2017-01-10 09:10:48 -05:00
Ner'zhul
78ed9793fe Various VMWare inventory (pyvomi fixes) + ini doc (#19926)
* Fix many points reported by PyCharm as PEP 8 code style
* Improve inventory performance by dropping vim.HostSystem & vim.VirtualMachine collect when depth >= 2
* Declare some class variables properly
* Remove some unused variables
* Add documentation in vmware_inventory.ini for VMWARE_USERNAME & VMWARE_PASSWORD env vars
2017-01-10 09:09:11 -05:00
Dag Wieers
aca60f1776 vmware_guest: various customizations changes and fixes (#19975)
* vmware_guest: various changes and fixes

Most of my queued changes were already implemented by @aperigault !

This was still open
- Typos
- Various fixes to dict.get() without quotes
- Defaults to fullname and orgname (so they are no longer mandatory)
- Add missing timezone implementation
- Remove the customize flag from the options
- Rename 'customizations' to 'customization' (cfr VMware docs and fora)

* Important fixes for idempotency and customization

- A password is mandatory for customization to work on Windows !
- An important fix for idempotency related to guestId
- Support all types of Windows guestId entries

* Suggestion by @aperigault

* Small documentation fixes
2017-01-10 08:34:38 -05:00
Jasper Lievisse Adriaanse
0937196df1 Sync changelog with recent illumos networking modules (#20074) 2017-01-10 13:18:52 +00:00
Jasper Lievisse Adriaanse
073c4df790 Update references to Passlib as homepage/docsite moved (#20082) 2017-01-10 13:17:32 +00:00
René Moser
bcf9cd1e2a cloudstack: cs_iso: fix async poll for state=absent (#20050) 2017-01-10 12:06:13 +01:00
John R Barker
3c4623d68b dellos9__config -> dellos9_config 2017-01-10 10:47:13 +00:00
Ivan Bojer
8d29406d74 new panos module that adds arbitrary service to the FW (#19896)
* new module that adds arbitrary service to the FW

* change exception handling

* minor code changes based on the review comments
2017-01-09 23:50:38 -05:00
Ivan Bojer
f8f388bdaf Panos mgtconfig (#19897)
* new module to manipulate mgmt interface

* new module for mgmt interface management

* minor code changes based on the review comments
2017-01-09 23:50:03 -05:00
Ivan Bojer
178e11473a new panos module to load configuration file (#19902)
* new module to load configuration file

* minor code changes based on the review comments
2017-01-09 23:48:59 -05:00
Ivan Bojer
23349ed638 new panos module for profile groups (#19904)
* new module for profile groups

* minor code changes based on the review comments
2017-01-09 23:48:40 -05:00
Adrian Likins
cf7b1108ff Fix 'No module named network' net_template error (#20060) 2017-01-09 23:45:52 -05:00
Brian Coca
54800ea47c better sections for module return docs 2017-01-09 20:18:30 -05:00
Matt Clay
cc3d131f50 Fix group_by test to work with jinja2 >= 2.9. 2017-01-09 15:20:34 -08:00
Brian Coca
0aad46c85b corrected common headers 2017-01-09 15:54:45 -05:00
Brian Coca
afbe3bd63f corrected service condition 2017-01-09 15:44:53 -05:00
Marius Gedminas
d9b89ca577 Fix a test failure on Python 3.6 (#20030)
* Fix a test failure on Python 3.6

tox -e py36 failed with

    ======================================================================
    ERROR: test_action_base__execute_module (units.plugins.action.test_action.TestActionBase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/mg/src/ansible/test/units/plugins/action/test_action.py", line 507, in test_action_base__execute_module
        self.assertEqual(action_base._execute_module(), dict(_ansible_parsed=True, rc=0, stdout="ok", stdout_lines=['ok']))
      File "/home/mg/src/ansible/lib/ansible/plugins/action/__init__.py", line 596, in _execute_module
        remote_module_path = self._connection._shell.join_path(tmp, remote_module_filename)
      File "/home/mg/opt/python36/lib/python3.6/unittest/mock.py", line 939, in __call__
        return _mock_self._mock_call(*args, **kwargs)
      File "/home/mg/opt/python36/lib/python3.6/unittest/mock.py", line 1005, in _mock_call
        ret_val = effect(*args, **kwargs)
      File "/home/mg/src/ansible/.tox/py36/lib/python3.6/posixpath.py", line 92, in join
        genericpath._check_arg_types('join', a, *p)
      File "/home/mg/src/ansible/.tox/py36/lib/python3.6/genericpath.py", line 149, in _check_arg_types
        (funcname, s.__class__.__name__)) from None
    TypeError: join() argument must be str or bytes, not 'MagicMock'

because os.path.join() now checks argument types since Python 3.6 (due
to pathlib support, I expect).

* Use a more realistic module name in test
2017-01-09 12:42:30 -08:00
James Cooke
fafe5bba59 Fix authorized_key crash in Python3 with remote key file (#20037)
* Decode downloaded keys bytes if Python3
* Fixes #20007
* Thanks @georgepsarakis
2017-01-09 12:21:51 -08:00
John R Barker
b8ee80ac4e junos Use inventory_hostname_short (#20061)
Don't use hardcoded hostnames
2017-01-09 20:15:16 +00:00
Steve Bussetti
8a8090e658 test related to pulls: #19257 / #19057 (#19346) 2017-01-09 12:08:56 -08:00
Adam Števko
ebd7e03425 Add ipadm_addr module (#19411)
* Add ipadm_addr module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES

* Fix version to 2.3
2017-01-09 14:32:05 -05:00
Evan Kaufman
ad9c25a54f Apply SELinux context only if cron_file param exists
Use selinux calls in module_utils/basic instead of native selinux bindings

Fixes #18768
2017-01-09 14:02:05 -05:00
Adam Števko
07a517aebd Add dladm_vlan module (#19412)
* Add dladm_vlan module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES
2017-01-09 12:32:23 -05:00
Adam Števko
a677f40457 Add dladm_linkprop module (#19413)
* Add dladm_linkprop module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES
2017-01-09 12:31:42 -05:00
Adam Števko
05bf7488cc Add dladm_iptun module (#19414)
* Add dladm_iptun module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES
2017-01-09 12:30:42 -05:00
Valentín Gutiérrez
6c448d3673 Fix pamd module (#20048)
* Fix string_types usage

* Fix adding arguments for argument=value arguments

* Remove unnecesary check on module_args

* Fix argument requirements

* Proper handling of parameter=value arguments
2017-01-09 09:30:32 -08:00
Adam Števko
457e94d21e Add ipadm_addrprop module (#19415)
* Add ipadm_addrprop module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit

* Use native YAML syntax in EXAMPLES

* Add temporary
2017-01-09 12:29:56 -05:00
Adam Števko
7b71e9a0de Add ipadm_ifprop module (#19416)
* Add ipadm_ifprop module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
2017-01-09 12:29:24 -05:00
Ganesh Nalawade
0305da6d6a Fix ios_command unit testcase (#20031) 2017-01-09 12:28:32 -05:00
John R Barker
fb3bef7f46 Use inventory_hostname_short (#20054)
When using AWS we have to use the full domain name in the inventory file, which
we rather than the short name. This change avoids that ending up being
set in the tests.
2017-01-09 17:21:04 +00:00
Ryan Brown
a2b4ad9da0 (docs) Remove/update mentions of git submodule in docs and error me… (#19941)
* (docs) Remove/update mentions of `git submodule` in docs and error messages.

* Remove parenthetical per @dharmabumstead
2017-01-09 12:11:39 -05:00
Marius Gedminas
0a7f2c202b Improve --diff output when files lack trailing newlines
The behavior now matches GNU diff.

Fixes #14094.

Example of output before this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null+curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

after this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null
    \ No newline at end of file
    +curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

The added unit tests contain more examples.

This commit also takes care to avoid "no newline at EOF" warnings when
no_log is in effect, and also when modules return dicts rather than
strings.  (It also removes trailing whitespace from using json
serialization when diffing dicts, because I hate trailing whitespace in
Python source files, even if they're test files.)
2017-01-09 11:49:03 -05:00
James Cammarata
a6fff93967 Fixing security bugs for CVE-2016-9587 2017-01-09 10:43:03 -06:00
Peter Sprygada
258c6ada52 refactors ios_config to use network_cli plugin (#20042)
* updates the ios_config module to use the network_cli plugin
* updates the local action plugin to derive from network
* add unit test cases for ios_config
2017-01-09 11:19:25 -05:00
Brian Coca
0ef60aeacb improved negative service status handling
This is still far from optimal but the nature of the initscripts does not really allow for much better.
fixes #20028
2017-01-09 11:09:11 -05:00
Marius Gedminas
74f07c66be Fix envlist in tox.ini
tox doesn't actually expand {brace,expressions} in envlist, so if you ran `tox` without specifying a `-e` parameter, tox would try to run `py26`, `py27`, `py3{5` and `6)`, defaulting to python2.7 for those non-standard environment names.
2017-01-09 10:13:09 -05:00
Michael Scherer
0847a137d3 Add a fact about apparmor, to see if that's loaded or not 2017-01-09 10:12:13 -05:00
Peter Sprygada
5bbab91452 fixes add() method in netcfg (#20041)
The add() method was not properly setting childen and parents objects
on instances of ConfigLine.  This only applied to the add method.  This
change fixes the problem by adding child and parent to the right
attribute.
2017-01-09 10:01:13 -05:00
Jiri Tyr
28050c1356 Update option desc of yum_repository module 2017-01-09 09:55:47 -05:00
Ner'zhul
c1f5432cc0 Better user report when OMAPI error occurs or key is invalid (#20035)
* Move imports after header
2017-01-09 12:40:53 +00:00
Ner'zhul
e87d6d8a70 Unbreak vmware_guest module which was break by 818ef493ad (#20036) 2017-01-09 11:29:18 +00:00
aperigault
8241675095 vmware_guest: Rename existing VM, or mark as template (#20018)
* vmware_guest: Add rename feature

* vmware_guest: Add feature to mark an existing VM as template
2017-01-09 09:37:36 +00:00
Adam Števko
d9ced3f4d1 Modules for gathering facts about ZFS datasets and pools (#19181)
* Add modules for gathering facts about ZFS datasets and pools

* Move zfs module to storage/zfs subcategory

* Replace dict.iteritems() with iteritems(dict)

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES

* Add zfs_facts and zpool_facts modules to CHANGELOG.md

* Add facts to return values
2017-01-09 07:53:42 +00:00
Adam Števko
3744764fae Add module for managing boot environments on FreeBSD/Solaris/illumos … (#19180)
* Add module for managing boot environments on FreeBSD/Solaris/illumos systems

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES

* Add beadm module to CHANGELOG.md

* Update version to 2.3
2017-01-09 07:52:06 +00:00
Peter Sprygada
63fbc1a764 adds missing __init__ to ios unit test 2017-01-08 23:07:30 -05:00
Matt Clay
7ba47bfd2d Correct test constraints and add sanity check. 2017-01-08 16:44:31 -08:00
Adam Števko
69559c184d Gather uptime and device facts from Solarish systems (#18733)
* Gather device information on Solarish systems

* Gather uptime information on Solarish systems

* Fix typo in variable name

* Add comments and example output from kstat command
Use frozenset instead of set
Make parsing of line a little bit safer
2017-01-08 13:26:52 -08:00
Michael
583136980d Adding os_quota support to the OpenStack modules (#19590)
* Adding os_quota support to the OpenStack modules

* Updated descriptions in doc string

* Updated version_added to 2.2 based on CI test feedback

* ready_for_review

* Changed exit_json to remove updating host var facts

* Updated version_added and docs

* Added support for state:absent paramater

This includes:
- Updated the doc string with the paramater information
- Updated the example section showing how to reset a project quota
- Added code support to handle state:absent
- Encountered a bug in delete_network_quota where it returns
an error instead of the current quota. Added support code to
workaround that issue until a proper fix can be added.

* Updated security groups kwarg to reflect Neutron kwargs

* Updated iteritems to be items based on CI feedback

* Updated descriptions and import statements based on code review feedback

* Updated CHANGELOG.md to include os_quota under new mods.
2017-01-08 18:55:12 +00:00
Toshio Kuratomi
08d6990e67 Fix code-blocks to use correct syntax highlighting 2017-01-08 09:18:45 -08:00
John R Barker
01849004e9 Correctly link to modules (#20019) 2017-01-08 17:06:07 +00:00