Commit Graph

15867 Commits (31045d58c659858c6ee9524411716a3d2a5f515b)

Author SHA1 Message Date
Antoine Cotten 7c308b3f8c Fix nonexistent module_name in callbacks (#23587) 8 years ago
Ken Celenza b8507b676b Remove Warning for provider (#23652) 8 years ago
Nathaniel Case e1dcc01d3a pep8 fix for Shippable 8 years ago
Daniel bbb9f3164c Nxos vxlan vtep vni netcfg fix (#23620)
* Code cleanup
Removed 'add' method from CustomNetworkConfig.  It is identical
to the one inherited from NetworkConfig

* Removed unused CustomNetworkConfig import

* Replaced
```
def get_existing(module, args):
    existing = {}
    netcfg = get_config(module)
    config = netcfg.get_section(parents)
```
with
```
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
```
get_config returns a string, not an object in 2.3.

* Removed non-functioning get_object method in CustomNetworkConfig in favor of the
inherited method.

Added child_objs property so that expand_selection would work.  The original
verion never worked correctly as it compared NetworkConfig obj's and str's.

* Removed ShellError method in favor or new load_config method.

* Removed ShellError method in favor or new load_config method.
fixes #20260

* nxos requires a "no" statement to change mcase group.  Corrected.
Corrected changed logic.

* Corrected deleted CustomNetworkConfig import
8 years ago
Nathaniel Case e518b6f5b4 Clean up import statements for nxos_rollback (#23540)
* Clean up import statements for nxos_rollback

* Don't try to deal with pre-2.3 logic
8 years ago
Ganesh Nalawade 89752cc34f Make logging consistent for network platforms (#23605) 8 years ago
Abhijeet 89fc098488 Update package installation warning (#23641)
Github_release requires github3.py==1.0.0a4, update warning
for the same.

Fixes https://github.com/ansible/ansible/issues/23626

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Andreas Olsson 40f9f98f7c Fix documented defaults in the nsupdate module (#23532)
Let the documentation reflect what the module actually implements.
8 years ago
Manuel Sousa 8b4f5ba064 Fix #23338 - rabbitmq_queue message ttl can't be 0 (#23448) 8 years ago
Peter Sprygada c2370f14dd fixes issue where network modules would ignore provider host value (#23589)
This addresses a problem where the action plugin would ignore the
remote_addr value for the host.  In this case, only the inventory values
for the hostname would be considered and populate the remote host
remote_addr value for the connection plugin.
8 years ago
Brian Coca 313591f8b8 removed debug print 8 years ago
Bradley Phipps abf5d6e682 eu-west-1a is an availability zone, not a region. (#23557) 8 years ago
Dag Wieers 246c84b92a Windows: Get rid of Set-Attr in remaining modules (#23525)
Only a few more modules were using Set-Attr on the $result object rather
than using a normal hashtable. This PR changes the PSObject to a
hashtable and gets rid of Set-Attr.
8 years ago
Łukasz Kostka 94bd647bc0 Fix alarm action comparison (#23523)
This fixes issue when list from module contains more than one element.
Ansible and/or boto may put same elements in list in different order,
thus resulting task as changed.

Fixes #3310
8 years ago
claer 811eb66703 Improve Fortios IPv4 policy with logging capabilities and use the backup_filename param (#23544)
* Improve Fortios IPv4 policy with logging capabilities. While there, fix typos in examples. forti_config: use the backup_filename param and dont enforce the the filename value.

* forti-typos

* Add version_added for new options in the documentation
8 years ago
John R Barker 92a425a532 Make it easier to find network modules (#23576)
* Make it easier to find network modules

Feedback has been it's difficult (via Google or directly) to find
modules as some people search for the company name vs product name,
therefore specify both.

* "IOS XR" (not "IOS-XR")
8 years ago
John R Barker 2bb25d031b network_cli modules don't always return stdout or stdout_lines (#23573)
It's possible that if the module has a low-level failure, such as
"unable to open shell", or something else in the action plugin that
stdout and stdout_lines will not be returned.

Update the documentation to clarify this point.
8 years ago
Brian Coca 952e842720 less code 8 years ago
Matt Parkes f0f20d8a1c ini_file 'create' parameter default value should be True
Updated create default value to True to match documentation (and common sense).
8 years ago
Brian Coca 5b7e8a7bd6 centralize ansible_managed and other template vars
now template lookup supports these again.
8 years ago
Brian Coca f7566ef1f1 removed extra 'changed' from debug output 8 years ago
Senthil Kumar Ganesan c86feeaed9 Error string:Regular expression updates (#23426) 8 years ago
Brian Coca df5895e585 fix environment validation, make setup exception
removed bare vars
now environment inheritance correclty prepends
this allows more local to override more general

fixes #23180
8 years ago
Patrick Marques 731fc288fa fixes #4441 passing subnet_name parameter (#18920) 8 years ago
John R Barker 902bc58509 [WIP] Network return docs (#23441)
Network return docs
8 years ago
Jamie Lennox 92dc61e869 Allow modifying security groups in os_server (#23207)
When the security groups specified to the os_server module change they
should be updated on the server. This will require shade 1.19 where the
server security group commands were added.

Fixes: #23206
8 years ago
Colin Nolan 57c67f0c08 Add checks to confirm that the output from `xfs_info` has the expected format. 8 years ago
Abhijeet Kasurde ba3295dd3f Pylint fixes for yum module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Abhijeet Kasurde db6d818865 Fix atomic pylint issues
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Sloane Hertel 2f64e2c7fb [cloud] ec2_asg: check autoscaling group for tags before trying to use them - partially fixes #23234 (#23259)
* check autoscaling group for tags before trying to use them

* Add warning

fix comparison
8 years ago
Sloane Hertel 5f517fdfa9 [cloud] route53_zone: allow split horizon for route53_zone and refactor - fixes #22939 (#23190)
* allow split horizon for route53_zone and refactor

* fix documentation

remove comment

fix version_added

* Remove unused imports

* Only include zone as matching if it has the same privacy setting

* Use `.endswith` instead of indexing into a string

* Update public zone behavior to only create new if there is no matching public zone

* Remove from legacy PEP8 files
8 years ago
Ritesh Khadgaray 40d888922b stat: better documentation
- md5 fails if the file is not a regular file ( symlink, dir,..)
8 years ago
Albert Casademont 54316f7da0 Fix Postgres user module always reporting changes (#23488) 8 years ago
Hao Wang 3b5dd4e0a0 file module doesn't create hard link to given target directory 8 years ago
Toshio Kuratomi b4f976e9b9 When apt errors, include it's exit code
We invoke /usr/bin/apt inside of the ansible module.  When that command
exits, it doesn't always include a helpful error message.  Include the
exit code so that user's have all the information we can gice them as to
why apt failed.

Addresses #19128
8 years ago
Luis Rueda 753d30b64d Rebase using latest devel branch in order to fix conflicts (#23199) 8 years ago
Ken Celenza 83a6d90899 Update Banner Doc (#23412)
I think most people's banner will come from an external file. Show an example, and clarify there is no extra lines allowed.
8 years ago
Khachatur Nazaretyan e8f1747a88 Adds attached volumes to instance facts (#23132)
* Adds attached volumes to instance facts

* Fixed identation and modified coding style

* includes revisions after maintainers review

* Coding style modified

* simplifies getting items from dict
8 years ago
Indrajit Raychaudhuri 971187e54c pacman: Fix package matching pattern in upgraded package list (#23433)
(cherry picked from commit 9a850db605)
8 years ago
Dmitry Sobolev 1cf607d8a8 Telegram notification module updated (#22858)
* msg_format parameter added
error message received from telegram API is added to fail json
compatibility with python3 added
* pep8 formatted
* version_added property added for msg_format
* bot token must be set without 'bot' prefix in module parameters
* formatting options described in documentation
* six module for compatibility used
telegram.py removed from legacy-files.txt
8 years ago
Dag Wieers a075c56dbf vmware_guest_facts: Add delegate_to directive to example (#22931)
Without it, this is not going to do what most people expect.

This fixes #22840
8 years ago
Lucas Alvares Gomes cee8cc2a52 rpm_key: Decode bytes to string to work with Python 3 (Fixes #20326) (#20385)
* rpm_key: Decode bytes to string to work with Python 3 (#20326)

The read() method will return bytes we need to then decode() those bytes
to a string before trying to match() it using the re module.

* Make the rpm_key pgp regex more robust on both py2 and py3
8 years ago
Nathaniel Case 86c714548f Redo #23418 (#23425)
* Check for provider values inside check_args of respective network code

* Partial revert of b9ee5aa

The no_log change is okay, but take out the action result munging
8 years ago
Karl Bergström c7860d4d4b Open unarchive file in binary mode
Recent Python3 versions require open() to specify binary mode if the data is anything other than text.

Python3: Use int() instead of long() in unarchive

Changes long() to int() for CRC values in the unarchive module. Affects unarchiving of zip files. Since CRC values in zipfile are 32 bits the behaviour should be unchanged even in Python 2.
8 years ago
Paul Montero 1963e506ec Open file in binary mode for python3 8 years ago
Toshio Kuratomi 2fdb8e7f90 Fix a traceback with python3 and diff output
When retrieving file contents for diffing we need to get the contents as
binary.  Otherwise python3 will try to convert the file to text and fail
with non-decodable contents.

Fixes #23171
8 years ago
Chris Alfonso d4bd54d3b8 Fixes #23388 Network provider masks too much (#23418)
* Fixes #23388 Network provider masks too much

* Fix trailing whitespace
8 years ago
Dag Wieers 3648e6fd2b vmware_guest: Add delegate_to directive to examples (#22932)
Without this it is likely not going to do what people expect.
8 years ago
Brian Coca 0d5d5f2bf6 correctly get all hosts in 'all' 8 years ago
Pierre-Alexandre 283a88444f BUGFIX : using yaml hosts inventory, hosts in groups weren't added to the group 'all' 8 years ago
Matt Martz 621e27b5dd Urls client cert auth (#18141)
* Build HTTPSClientAuthHandler more similarly to how HTTPSHandler works

* Add docs for new client cert authentication

* Support older versions of python

* Simplify logic

* Initial support for client certs in urls.py

* Add an extra test

* Add a get_url test for client cert auth

* Add additional test for client cert auth, with validation and ssl mismatch

* Skip assert when http tester not available

* Update version_added for new options
8 years ago
Ganesh Nalawade 3934513121 Fix a10 pylint issues (#23410)
* Fix a10 pylint issues
* Moving imports to standard location
8 years ago
Toshio Kuratomi 78ced5318f Fix for recursive copy slowness
Copy module was walking over files in subdirectories repeatedly (a
directory tree a few levels deep could bring the time spent into the
tens of minutes)

This was traced to the fix for this bug report: https://github.com/ansible/ansible/issues/13013

Fixed #13013 a different way and added an integration test to check for
regressions of #13013 as we optimize this code.

Fixes #21513
8 years ago
Matt Martz 13ac993d25 Fallback to old ssl_wrap_socket 8 years ago
Matt Martz 33f7a27cba Use PyOpenSSLContext instead of deprecated wrap_ssl_context from urllib3.contrib.pyopenssl. Fixes #18528 8 years ago
Strahinja Kustudić 9f0be5a556 Ignores ControlPersist broken pipe errors. Fixes #16731
Ansible will now automatically retry a connection if SSH returns an error:

mux_client_hello_exchange: write packet: Broken pipe

This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.
8 years ago
Ricardo Carrillo Cruz ba7ba7adc3 Check for proper response key on eos_banner map_config_to_obj (#23399)
If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!
8 years ago
Matt Clay 48eeab8a53 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
8 years ago
John R Barker 6633ae1afa look_for_keys & allow_agent actually added in 2.4
https://github.com/ansible/ansible/pull/22429 was merged, though not cherry picked into stable-2.3, so update docs
8 years ago
Guillaume Coré 3c75808c5c fix incorrect parsing of xfs_info
when device name ends with 'data' line matches in :
-                if 'data ' in line:

closes #23352
8 years ago
Toshio Kuratomi dcc63c8f93 Fix imports and pep8 problems so CI can pass again. 8 years ago
Ricardo Carrillo Cruz 3537b24742 Unhardcode the port and protocol on eos EAPI (#23350)
We were hard-coding the protocol, port and validate_certs on
eos EAPI via the action plugin.
Put defaults on the eos_argument_spec and pull those values from it.
8 years ago
Toshio Kuratomi 5f4673b5ae Update metadata for openssl_csr 8 years ago
Ganesh Nalawade 0cd50f0706 Fix #22880 junos_config update issue (#23333)
For update parameter add 'override' as acceptable value.
'override' name is in sync with junos naming convention.
8 years ago
Chris Alfonso 394cb3477b Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23363) 8 years ago
Ganesh Nalawade 990ba90380 Fix #23360 junos_config set format issue (#23365) 8 years ago
Nathaniel Case 98c23a3342 Attempt to clear up nxos_mtu tests and documentation (#23361)
nxos_system wasn't added until 2.3, so nxos_mtu should have been deprecated
then.
8 years ago
nerzhul 637e9942ff Nsupdate idempotency fix 8 years ago
Yanis Guenane 2705e7a8aa crypto: Add new module openssl_csr (#21004)
This new module allows one to automate the generation of OpenSSL
Certificate Signing Request. It supports SAN extension.
8 years ago
Peter Sprygada f0008248d4 fix iosxr commands to encode json (#23346)
the command dict in the iosxr module_utils wasn't encoding the request
to json.  this patch will fix that problem
8 years ago
John R Barker 13dc02d49d More network_debug_troubleshooting.html (#23335)
More "unable to open shell" -> network_debug_troubleshooting.html
8 years ago
Takuya Sato dff35bc205 ecs_taskdefinition module : Convert environment variables to string (#23297)
Before modification, it fails unless it is a string type
8 years ago
John R Barker 529df8640b 'unable to open shell' -> direct to web help (#23267)
* 'unable to open shell' -> direct to web help

The "unable to open shell" error is returned for a number of different,
direct people to online docs (we we can update out of band of releases)
to guide them though the various solutions.

* fix pep8 errors
8 years ago
Varadharajan 4540853a50 Pass CSRF token along with Jenkins POST requests (#23250) 8 years ago
Matt Davis b71b157fb3 Cleanse CLIXML from win_shell stderr (#23329)
prunes all but Error stream values
8 years ago
Matt Davis 8d291f91ee improve become_method: runas error handling (#23328)
Prescriptive errors for username/password issues and NTLM/Kerb auth failures, cleans up exception noise.
8 years ago
Dag Wieers e66c98281e Small consistency fixes (#23294) 8 years ago
Ricardo Carrillo Cruz b9b4e68206 Check text key exists on eos_banner absent case (#23319)
This can fail if we don't check the key exists.
8 years ago
Chris Alfonso 3a78861cb5 Fixes #23308 ios_banner: KeyError: 'text' on state: absen (#23313) 8 years ago
Nathaniel Case d890167575 Fix nxos_facts for nxapi transport (#23302)
* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation
8 years ago
John R Barker 485affeb12 eapi & nxapi: Document validate_certs (#23305)
* Document validate_certs for eapu & nxapi

* formatting
8 years ago
Tim Rupp 780b2f2c84 Fixes pylint errors (#23279)
Reported by gundalow, this fixes pylint errors in F5 modules
8 years ago
Will Thames b3a15e9ac3 [cloud] New AWS ec2_vpc_endpoint module for creating/deleting VPC endpoints (#20212)
* New AWS VPC Endpoint module for creating and deleting VPC endpoints

* Fix for python3, update version_added, fix flake8 issues

Change exception syntax for python 3
Update version_added to 2.3
Fix some minor flake8 issues

* ec2_vpc_endpoint: improve standards compliance

* Better documentation
* Return results in camel case format
* Improved exception handling
* Added `policy_file` argument
* Add ANSIBLE_METADATA

* Fix version_added

* Update ansible metadata to have metadata_version field
8 years ago
Benjamin Jolivot f74a9abbda fortios_ipv4_policy.py state=absent Fix 23239 (#23242)
* Resolve #23239:
  - path is missing when state=absent
  - update doc for unclear policy ID
  - required params based on state

* Fix pep8 + doc

* Fix doc

* Another doc problem...

* doc

* Update doc fot policy ID

* Fix doc string

* fix required in doc

* fix required in doc Required when I(state=present).
8 years ago
Ricardo Carrillo Cruz 2571d2f64b Refactor openvswitch_db module (#23288)
The openvswitch_db module uses the ovs-vsctl binary to
address changes.
On other network modules we follow the pattern of returning 'commands'
as part of the result, containing the commands run on the target device.
Follow that for code consistency and maintenance.
Also, adding state param, which allows to add/remove keys on columns.
8 years ago
Nathaniel Case e8538213fa Fix various junos errors (#23278) 8 years ago
Ganesh Nalawade 0b8ca98c48 Fix junos rollback id validate issue (#23283) 8 years ago
Toshio Kuratomi 572e9a8959 Update the metadata of the proxysql modules to 1.0 final format 8 years ago
James Cammarata a567c5de65 Only insert notified host if it's not already notified for certain cases
Fixes #18178
8 years ago
bmildren 21ab4343e3 Adding support for ProxySQL (#19872)
* Adding support for ProxySQL
8 years ago
Brian Coca 00231c29ba Revert "keep ansible_local as top level var, always present"
This reverts commit 97cb2016d8.

It was causing issues downstream as facts seem to be merged back for
subsequent tasks. Will restore if I ever figure out how to avoid that.
8 years ago
Matt Clay a6ca849643 Fix PEP 8 issues. 8 years ago
JP Mens 5a0b2fe3be dig lookup-plugin: add support for specifying rdclass (#10493)
* add support for specifying rdclass

* fix exception
8 years ago
Nathaniel Case 597bca3129 junos_config: Remove reliance on ability to output configuration in `set` format (#23225)
* Remove reliance on ability to output configuration in `set` format
* Support multiple warnings per rpc-reply
8 years ago
Robin Roth 6f40cb9647 Add workaround for evasive in apache2_module (#22649)
* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
8 years ago
Rob 7e3af115ce Add ability to use either sec group name or sec group id or combinati… (#21049)
* Add ability to use either sec group name or sec group id or combination to ec2_lc. Also fix header size in AWS Guidelines

* Fix ec2 import to only import neccessary packages. Remove pep8 double line
8 years ago
Brian Coca 2f3ca66fbf fixed version 8 years ago
anryko bd05c653fd ec2_group: add ports and multiple source lists (#19888). 8 years ago
Brian Coca 7d64ac95df doc notes 8 years ago
Mark Chappell c5edaf5e68 ec2_lc.py: Also pass 'encrypted' when adding a volume
This only allows for using the default KMS keys, but enables encryption
at rest without needing to migrate the module to boto3
8 years ago
rmcintosh 312494d452 Add support for custom kernelid specification in Linode module 8 years ago
Chulki Lee 99ef1f3a9f git: git reset with branch
`git reset <ref>` can be ambiguous and fail to switch to the correct branch.
To avoid it, specify branch as well.
8 years ago
Dag Wieers 0715430829 win_chocolatey: Perform exact presence check (#23098)
The current implementation matches libreoffice-oldstable when testing for libreoffice.
So uninstalling libreoffice fails when libreoffice-oldstable is installed.

```
PS C:\WINDOWS\system32> choco list --local-only libreoffice
Chocolatey v0.10.3
libreoffice-oldstable 5.2.6
1 packages installed.
PS C:\WINDOWS\system32> choco list --local-only --exact libreoffice
Chocolatey v0.10.3
0 packages installed.
```

The solution is easy, just add `--exact`.
8 years ago
Toshio Kuratomi 6bad4e57bd Migrate most uses of if type() to if isinstance()
Also convert those checks to use abcs instead of dict and list.

Make a sentinel class for strategies to report when they've reache the end
8 years ago
Ricardo Carrillo Cruz 64fe7402ff Pull filesystems from dict in case is not string on eos_facts (#23254)
Apparently in some devices the filesystems gathering command can return
a dict containing a 'messages' key with the filesystems, instead of a
plain string.

Fixes #23217
8 years ago
bentaylornz 95c1b07bdb [cloud] re-raise boto ClientError if throttling timeout is reached in efs.py (#23109)
* re-raise exception as expected

The current ThrottlingException handling code hides other actual exceptions from the user, and basically goes infinite loop instead. eg when the api caller doesn't have permission (example below) to use the api, ansible effectively hangs. adding the re-raise stops execution and shows the error to the command line as expected

can test by removing permission to the efs api, and calling the efs: module

The error was: botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the DescribeFileSystems operation: User: <x> is not authorized to perform: elasticfilesystem:DescribeFileSystems on the specified resource

* PEP8 fix
8 years ago
Will Thames bded5ac987 [cloud] Support check_mode for ec2_vpc_subnet_facts (#23111)
* Support check_mode for ec2_vpc_subnet_facts

facts modules support check mode by default

* ec2_vpc_subnet_facts pep8 tidy up
8 years ago
Will Thames 2be64b8c3a [cloud] Support check_mode for ec2_vpc_route_table_facts (#23116)
As a facts module, just needs supports_check_mode to be
set in the argument_spec
8 years ago
Will Thames ec01aac983 [cloud] Support check_mode for ec2_vpc_nat_gateway_facts (#23114)
As a facts module, just needs supports_check_mode switched on
8 years ago
Will Thames e61be9ea78 [cloud] Remove DryRun parameter in ec2_vpc_igw_facts check_mode (#23113)
* Remove DryRun parameter in ec2_vpc_igw_facts check_mode

Using DryRun in check mode causes errors, and is not required
(as nothing changes when calling describe_internet_gateways)

Prevents the following error:
```
{"changed": false,
 "failed": true,
  "msg": "An error occurred (DryRunOperation) when calling
          the DescribeInternetGateways operation: Request
          would have succeeded, but DryRun flag is set."}
```

* ec2_vpc_igw_facts pep8 tidy up
8 years ago
Matt Clay 64458bc9a1 Fix deploy_helper join exception on no release. 8 years ago
Ricardo Carrillo Cruz 2e89126af7 Remove dupe supports_session method from eos module_utils (#23240)
Fixes #23237
8 years ago
Matt Davis d85f4a443f mark runas become method experimental (#23235)
Due to the number of "real world" caveats in the current runas become method, it was agreed that we'd warn that it's experimental on use. A potential future version based on LogonUser/CreateProcessAsUser will have very different requirements and limitations.
8 years ago
Brian Coca eb78da68dd allow plugins to override fragments 8 years ago
Jordan Borean 3e1a16c574 win_find fix up age parameter (#23195) 8 years ago
Jordan Borean 4d1b97d1ae win_stat change return islink to islnk to match stat (#23196) 8 years ago
Jacob McGill 5918bebd6e Update fortios_config.py (#23230) 8 years ago
Sergey 9a43603761 [cloud] Added account selection to PubNub BLOCKS (#23160)
* . switched from 'user.id' to 'account.id' in REST API calls.
+ added ability to select desired account (by name or identifier) from list of accounts to which authorized user have access.

* + added account option addition version.

* Remove pubnub_blocks from PEP8-legacy list
8 years ago
Adrian Likins 15bd7e48da Add ansible executable path (argv[0]) to --version (#22262)
For example:

    ansible 2.3.0 (argv0_in_version f53921093f) last updated 2017/03/03 13:33:31 (GMT -400)
      config file = /home/adrian/.ansible.cfg
      configured module search path = Default w/o overrides
      executable location = /home/adrian/src/ansible/bin/ansible

This should help troubleshooting install issues.
8 years ago
Will Thames cd19964bca [cloud] Support check_mode for ec2_group_facts (#23164)
Update imports to use named imports
8 years ago
Prasad Katti 2b18c0ed07 [cloud][docs] Must use the count_tag option with exact_count (#23167)
Fixed an example in ec2 module. The example does not work without
count_tag option.
8 years ago
Adrian Likins dbc0c01c86 Show 'ansible' python module paths in --version (#22264)
* Show 'ansible' python module paths in --version
8 years ago
Strahinja Kustudić 7358bf88e2 Fixes ignoreerrors not working with sysctl_set 8 years ago
Sloane Hertel 224b5d5283 remove vpc requirement for default outbound traffic (#22743) 8 years ago
Ryan Brown 2196fa0e95 [cloud][tests] fixtures for placebo to test AWS modules using boto3 (#21253)
* [cloud][tests] Create fixtures for using placebo to test boto3-using modules

* Use pytest's importorskip instead of manually skipping on missing deps

* Fix imports in cloudformation module

* Delete unused code

* Add maybe_sleep fixtures to speed up recorded test runs

* Build basic placebo-CFN tests

* Commit placebo recordings of basic stack operations

* Add placebo to test-requires

* Allow unit tests to run regardless of environment by setting a default region

* Use explicit relative import for Python 3 compat

* Use __name__ attribute that works on Python 2 and 3
8 years ago
Senthil Kumar Ganesan 632270b913 Updated the Regex for promt matching (#23186) 8 years ago
AlexanderStock e4206d8ef5 Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot (#23141)
* Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot

* Update cs_firewall.py

Fixed whitespace

* Added doc for Cloudstack Tags in Volume,Template,FWRule,PF Rule,ISO,Snapshot
8 years ago
smaftoul 9812d211e7 typo: psuedo -> pseudo (#23177) 8 years ago
Will Thames 9a3a0d731f Fix typo in AWS guidelines doc (#23168)
Change `format_ex` to `format_exc`
8 years ago
Monty Taylor 443102c9f0 Remove old deprecated OpenStack modules (#23002)
These were deprecated back in the 1.x timeframe, so have been deprecated
for the 2 cycles required. They also do things wrong and should be
avoided anyway. Go ahead and remove them.
8 years ago
Will Thames ef0bc0aa52 Support check_mode for add_host
`add_host` doesn't really actually change anything - there's no
reason why it shouldn't work in `check_mode`.
8 years ago
Tim Rupp e27b4c2ae4 Removes expanduser in favor of type path
Removes the usage of expanduser in favor of the type 'path' for
module options. Related to #12263
8 years ago
Erwin Lang 3efb11e225 synchronize: Exclude ssh_args from quoting
Makes it possible again to pass more than one argument via ssh_args to the synchronize module.
8 years ago
Tom Melendez 8b677e25c4 [cloud][GCP]: New module gcp_backend_service for load balancer backends (#22857)
* GCP: backend service module

* GCP: rework param-checking code. Fixed a couple of bugs and changed to ValueError instead of custom tuple.

* GCP: fixed commit, spelled out Google Cloud for clarity in module description.
8 years ago
Tim Rupp 2bf7297bf3 Removes expanduser in favor of type path (#21369)
Removes the usage of expanduser in favor of the type 'path' for
module options. Related to #12263
8 years ago
Tim Rupp 2a576a1999 Fixes generators and other misc fixes (#22887)
fixed itertools.imap busting several things that used to be lists,
profiles not being set correctly, upon create, when it was a separate
method, allowed port having the wrong lowest port (zero is allowed),
empty port value should just be interpreted as None.
8 years ago
Alex Willmer f5aa9df1fd Include '/' & '.' when password_hash generates a new salt
The password_hash filter will generate a salt value if none is supplied.
The character set used by Ansible

(upper & lowercase letters, digits)

did not match that used by libc crypt

(upper & lowercase letters, digits, full stop, forward slash).

This resulted in a slightly smaller key space, and hence hashes would be
slightly easier to attack (e.g. by dictionary, brute force).
8 years ago
Sloane Hertel f5f7a8c681 [cloud] only create new eni if none of the filters lead to one match (#22919) 8 years ago
Sloane Hertel dab0e75ce0 [cloud] update the local variable route_table with the latest tag changes (#23136) 8 years ago
Jason DeTiberus 3642de9ecc k8s/openshift module_utils split (#23115) 8 years ago
Peter Sprygada 2e476e64cd fixes error parsing lldp neighbors when running nxos_facts (#23134) 8 years ago
Senthil Kumar Ganesan a0344acd78 Ansible 2.3 feature support for dellos6. (#23084)
* Ansible 2.3 feature support for dellos6.

- With the new Ansible 2.3 infra changes, the dellos modules doesn't work
  (the new infra changes are not backward compatible), so added the below
  changes support it.
- Added the new terminal plugin for DellOS6
- Added the new action plugin for DellOS6
- Modified the modules to work with the new infra.
- with that it adds support for DellOS6 Persistent Connection support.

* Remove pep8 confirming files from dellos6.py and dellos6_config legacy-files
8 years ago
Sloane Hertel 44b2859338 ec2: fix instids and res_list being referenced before assigned - fixes #22692 (#23053)
* add else statement to ensure instids is set

set res_list to None to avoid UnboundLocalError and fix iteration over a nonetype by adding an empty tuple

* make res_list empty tuple by default and check for instids before setting tags (fails otherwise)
8 years ago
Konstantin Suvorov c1b3d6a51f Fix 'sequence' lookup shortcut syntax and documentation (#22989)
* fix 'sequence' lookup shortcut syntax and documentation

* Update playbooks_loops.rst

Minor edits for grammar and clarity.

* Update playbooks_loops.rst

Another tweak for clarity.
8 years ago
Ricardo Carrillo Cruz 1abc73da68 Fix ios_config return on python 2.4 (#23094) 8 years ago
Chris Houseknecht 4099eb41b9 Treats both [] and {} as equal to None (#23088) 8 years ago
Ricardo Carrillo Cruz 66e29f0a7c Do not re.search show configuration stdout if empty (#23087)
If the banner is not set, the stdout of 'show configuration | begin banner <banner>'
returns empty string thus the re.search raises an exception.

Fixes #22216
8 years ago
Peter Sprygada 88ce6fd273 restores pre 2.3 behavior with respects to keys (#23083)
This removes the requirement to configure look_for_keys=False and
restores the behavior to disable key lookup if no key was provided.
8 years ago
Toshio Kuratomi 6f77498700 Split on newlines when searching for become prompt
The fix for leading junk in sudo output: fee6e29 causes problems with
ssh + sudo.  On the initial connection using ControlPersist, the output
that we scan for the prompt contains both the command we're sending to
configure the prompt and the prompt itself.  The code in fee6e29 ends up
sending the password when it sees the line configuring the prompt which
is too early.

Switch to a version that splits on lines and then checks whether the
first or last line starts with the prompt to decide if it's time to send
the password.

Fixes #23054
References #20858
8 years ago
jhawkesworth 4eba248a8e changed parameter name from forest_root_dns_domain to dns_domain_name (to match documentation and other win_domain* modules) and fix example which has win_domain_controller instead of win_domain for module name. (#23081) 8 years ago