Commit graph

31982 commits

Author SHA1 Message Date
Alvaro Aleman
bb9c6694a7 Allow the Openstack dynamic inventory to discover ansible_user (#17944) 2017-08-11 18:00:59 +02:00
Patrick Ogenstad
089226e372 Fixes for broken asa_config module (#27218)
* Fixes for broken asa_config module

* strip() prompt before checking
2017-08-11 11:42:42 -04:00
Sloane Hertel
40eb349ac6 [cloud] Make ec2_asg more resilient using AWSRetry around boto3 calls (#27598)
* Add AWSRetry to ec2_asg

* Paginate describing ASGs and launch configurations

pass connection to delete_asg

Fix a couple little bugs

* Use boto3's pagination build_full_result()
2017-08-11 11:30:23 -04:00
Thomas Stringer
e4cd899363 Add support for Azure 2.0.0 (#27920)
* Adapt azure_rm_resource_group to azure 2.0.0 + azure Cli support

* Fix exceptions in Azure ARM plugins

* update azure_rm_networkinterface documention to reflect required params

* change state param to not required for docs in azure_rm_subnet

* fix import to reflect azure==2.0.0 changes

* add aliases and fix docs for azure_rm_storageblob

* add resource_group_name alias to azure_rm_storageaccount_facts

* fix import bug due to change in azure==2.0.0

* fix args bug and enum modules issue

* update docs to reflect azure==2.0.0

* pin management clients to a specific api_version

* update docs to reflect the new azure-ansible-base python package

* add fallback for older api resource group listing

* rework azure dependencies installation

* refactor path joining to a cross-plat solution
2017-08-11 08:22:02 -07:00
Michael Price
1b9d9376e2 Refactor E-Series Hosts module to use module_utils (#20893)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
2017-08-11 11:05:52 -04:00
Ricardo Carrillo Cruz
a5b483da16 Replace username for name in eos_user integration tests (#28067)
username param is read by eos action plugion load_provider, if present
it is set as the play context remote user.
That means if you have a play remote_user: admin it won't be used, but instead
whatever is put in the task argument username.
Changing the tests to use name fixes the issue, we may want to remove username
as valid module argument in other change.
2017-08-11 16:42:43 +02:00
Brandon Schlueter
0e334ca821 Don't compare group_vars paths with bytestrings (#27922)
* Don't compare group_vars paths with bytestrings

* Compare spath with unicode string in VarsModule
2017-08-11 10:21:20 -04:00
Nathaniel Case
0464a21a85 Fix nxos_snmp_contact, others (#28000)
* Fix nxos_snmp_contact

Fixes #27714

* Fix nxos_snmp_community

Fixes #27711

* Fix nxos_install_os

Fixes #27604

* Update nxos_ntp_auth

Fixes #27521

* Fix nxos_igmp_snooping

Fixes #27501
2017-08-11 10:12:43 -04:00
Sloane Hertel
1de91a9aa0 [cloud] Convert s3 module to use boto3 (#21529)
* replace boto with boto3 for the s3 module

make s3 pep8 and remove from legacy files

fix s3 unit tests

* fix indentation

* s3 module - if we can't create an MD5 sum return None and always upload file

* remove Location.DEFAULT which isn't used in boto3 and tidy up the docs

* pep8

* s3: remove default: null, empty aliases, and required: false from documentation

fix incorrectly documented defaults

* Porting s3 to boto3. Simplify some logic and remove unused imports

* Fix s3 module variables

* Fix a typo in s3 module and remove from pep8 legacy files

* s3: add pagination for listing objects.

Fix logic and use head_object instead of get_object for efficiency.

Fix typo in unit test.

* Fix pagination to maintain backwards compatibility.

Fix incorrect conditional.

Remove redundant variable assignment.

Fix s3 list_object pagination to return all pages

* Use the revised List Objects API as recommended.

* Wrap call to paginated_list in a try/except

Also remembered to allow marker/prefix/max_keys to modify what keys are listed

* Simplify argument
2017-08-11 09:34:33 -04:00
Michele Zuccala
7d1308b0d8 [cloud] ovirt: add headers param to auth (#27881)
* Add filter param to ovirt module auth

* Update docs to include new filter param

* Fix broken YAML

* Replace filter param with headers
2017-08-11 09:31:20 -04:00
giovannisciortino
49209bfcc5 blockinfile: add --diff support in check mode (#27997) 2017-08-11 07:58:45 +02:00
Rich Murphey
88ccaf106b use of multiple chocolatey package names (#28046)
* use of multiple chocolatey package names

It might be helpful to users, to clarify whether/when <name:> must specify a single package.

Users who are familiar with chocolatey may be accustomed to installing multiple packages in a single invocation of 'choco install'.

I believe win_chocolatey currently accepts multiple package names when state: is latest or present.
For instance, this appears to work currently:

  - win_chocolatey:
      name: >-
        pscx
        windirstat
      state: latest

However, when state: is absent, uninstall is not performed if multiple package are specified.
The chocolate.log output suggests that chocolatey is treating the multiple packages as an 'exact' name of a single package name:
2017-08-10 19:04:04,087 2424 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" list --local-only --exact pscx windirstat
2017-08-10 19:04:04,087 2424 [DEBUG] - Received arguments: list --local-only --exact pscx windirstat

I find the current behavior helpful in terms of accepting multiple package names, even if uninstall must be treated differently.
It might be helpful to show an example of how multiple uninstalls can be handled by looping over them. 

  - win_chocolatey:
      name: "{{ item }}"
      state: absent
    with_items:
      - pscx
      - windirstat

* revise per Jordan Borean. remote colon (:) from text. revise formating.

* Update win_chocolatey.py
2017-08-11 12:36:14 +10:00
Nathan Hyde
241d38077f Use ChocolateyInstall env variable after installation (#27812)
* Use ChocolateyInstall env variable after installation

Fixes #19725 Custom install locations specified by the ChocolateyInstall
env variable in win_chocolatey

After an initial install of chocolatey, use the ChocolateyInstall
environment variable when assigning $script:executable .

* Improve process of locating "choco.exe" post-initial install

Implement feedback for locating choco:

* Check if choco.exe is in PATH, if there use this
* If not in path and ChocolateyInstall var is available, use that
* Otherwise, use the equivalent of Windows Special Folder CommonApplicationData for locating chocolatey.
  (Chocolatey install (v0.10.7) uses CommonApplicationData when ChocolateyInstall is not set.)
2017-08-11 11:28:13 +10:00
Dave
4cec83471c win_get_url.ps1 - enable TLS1.1/TLS1.2 if they're available but disabled (#26833) 2017-08-11 11:00:34 +10:00
Nick Chandler
22533c0932 New module: Add module or managing Windows Active Directory users (windows/win_domain_user) (#24075)
* Initial win_domain_user module support

* Add return information

* Update return values

* Add try/catch for PS module import

* Improve win_domain_user module

* Fix bad merge

* Fix pep8 failure

* Actually fix pep8 failure

* Update win_domain_user.py to meet standards

* Add check_mode support for win_domain_user

* Updated documentation before merge
2017-08-11 10:23:09 +10:00
Jordan Borean
7c59b66802 updated changelog for windows (#28040) 2017-08-11 08:55:51 +10:00
Matt Clay
869e90e12a Don't fail coverage reporting due to parse errors. 2017-08-10 15:36:47 -07:00
Peter Sprygada
edc3507c98 restore the ability to issue commands over junos cli (#28025)
* restore the ability to issue commands over junos cli

* add warn message for invalid arguments

* fix issue when checking if provider transport is set
2017-08-10 17:57:32 -04:00
Jordan Borean
5fbbf0e75a win_hotfix: new module to install Windows hotfixes (#27260)
* win_hotfix: new module to install Windows hotfixes

* revert to older module util loader style to satisfy the checks for now

* Changes from PR

* changed the test hotfix so we can run tests in shippable
2017-08-11 07:57:07 +10:00
Jordan Borean
44ed891290 win_mapped_drive: new module (#27020)
* win_mapped_drive: new module

* Rebased from upstream and updated copyright text
2017-08-11 07:54:18 +10:00
Jordan Borean
e46adece48 win_user_right: add module with tests (#26276)
* win_user_right: add module with tests

* fixed up name of module in docs

* forgot the test module

* fixed up whitespace

* changes made to win_user_right based on feedback

* moved away from using secedit to Win32 with P/Invoke

* tidied up copyright for documentation
2017-08-11 07:52:07 +10:00
Miyurz
3b4ff67b3b Made the applicable targets as PHONY (#27996)
https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
2017-08-10 17:35:58 -04:00
Brian Coca
914ae2fb26 added docs for undocumented play object entries 2017-08-10 16:22:34 -04:00
Gerard Lynch
d9d983160d support OS_CLOUD in openstack dynamic inventory
allow a user to limit to a single cloud in clouds.yaml, and support
per-cloud caching.
2017-08-10 12:43:16 -07:00
Alvaro Aleman
fe5e1a4bc4 OS dynamic inventory: respect OS_CLOUD env var 2017-08-10 12:43:16 -07:00
David Newswanger
ebb1d75ee0 fixed a syntax problem that was preventing a warning box from being displayed 2017-08-10 12:37:28 -07:00
Ganesh Nalawade
3b0e9ded91 Fix fallback and boolean check in argspec (#27994)
Fixes #27978

*  Add missing assignment for param key in fallback handling
*  Add check for frozenset type
*  Unit testcase
2017-08-10 12:10:18 -07:00
Philip Gough
fee42a01d9 Redhat subscription proxy support (#22544) 2017-08-10 20:26:57 +02:00
Prasad Katti
2a63693580 Minor fix in docs 2017-08-10 14:18:59 -04:00
David Newswanger
d0485779e8 nxos_smu: fix Structured output unsupported error in nxapi (#27976)
* fixed structured output unsupported error
2017-08-10 14:12:15 -04:00
Ricardo Carrillo Cruz
e8f1c1511c Implement purge on eos_vrf (#28013) 2017-08-10 19:59:32 +02:00
Martin Krizek
1c4e491eac yum: do not hide yum's errors (#27696) 2017-08-10 13:57:08 -04:00
Rémi REY
7974ad34f1 add playbook runtime stat in the logstash callback stats (#25785) 2017-08-10 13:43:21 -04:00
Raphael Nestler
ac0202fba1 win_file: Remove 'Create a file' example (#28009)
Fixes #28005
2017-08-10 13:30:37 -04:00
Peter Sprygada
145895dcf0 updates examples and documentation (#24211)
includes better examples of valid and invalid usage of the lines
argument

fixes #22828
2017-08-10 13:09:53 -04:00
Peter Sprygada
d8b005ec65 updates the prompt regexp for prompt handling in sros (#28015)
* thanks to @jurajama for tracking this down and providing the fix
* fixes #24192
2017-08-10 12:59:49 -04:00
Brian Coca
2015835759 updated author with github id 2017-08-10 11:42:49 -04:00
Dag Wieers
8451d945aa Add new maintainer 2017-08-10 17:11:55 +02:00
David Newswanger
a3ad614759 ignore failures when trying to remove interfaces that are already missing using nxos_config (#28003) 2017-08-10 20:23:13 +05:30
Luke Armstrong
fd18ade465 Documentation - modules/files/unarchive (#27998)
Last example is incorrect and will not run without throwing an error.
2017-08-10 10:32:08 -04:00
Ricardo Carrillo Cruz
87757ca385 Remove eos group_vars creds and increase eapi timeout (#28008)
We don't need provider creds as we set those at inventory group vars,
increasing eapi timeout as some eapi tests are flip flopping with
timeouts.
2017-08-10 16:25:38 +02:00
Juan Manuel Parrilla
2cfb30fc91 Fixes #24414, Added support for a ETCD folders (#24432) 2017-08-10 07:44:05 -06:00
Adrian Likins
220db9cdd2 Better vault pass prompt behav on EOF, more unit tests (#27981) 2017-08-10 09:34:57 -04:00
Adrian Likins
82f550e8cd Add prompt formats for 2.3 compat ask-vault-pass (#27974)
The prompt_formats dict didn't get the 'prompt_ask_vault_pass'
item added for interactive --ask-vault-pass, which
caused "KeyError: u'prompt_ask_vault_pass'"

Fixes #27885
2017-08-10 09:34:16 -04:00
Valentin Krasontovitsch
cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
2017-08-10 09:25:56 -04:00
Brian Coca
13d2eb6568 fix incorrect joingin of command for chpasswd
fixes #24638
2017-08-10 09:23:13 -04:00
Peter Sprygada
c4da61239d stops trying to filter out commands from config (#28002)
* stops trying to filter out commands from config

fixes #24874

* fix up pep8 issues and remove offending function
2017-08-10 09:18:44 -04:00
Nathaniel Case
ed8a5af3dc nxos_bgp: Fix idempotence for event-history (#27329)
* Fix idempotence for event-history

* `event-history detail` defaults to `False`, the rest to `size_small`
2017-08-10 08:55:43 -04:00
Lukas Bednar
29891bff19 ovirt_templates: fixed typo in doc (#27883) 2017-08-10 08:32:36 -04:00
Lukas Bednar
a48a7eecc8 ovirt_templates: added option to name imported disk as a template (#27902)
* ovirt_templates: added option to name imported disk as a template

* ovirt_templates: added version_added to new attribute

* ovirt_templates: added alias for image_name and example

* added alias glance_image_disk_name for image_name
* example how to import image from glance as template
* improve description of template_image_disk_name
2017-08-10 08:32:25 -04:00