Commit graph

15523 commits

Author SHA1 Message Date
Peter Sprygada
027f5955cc correctly maps task arguments for eapi transport (#22490)
The provider arguments where not correctly being mapped in the action
plugin for eapi transport.  This will now correctly map existing
arguments as well as set the correct defaults for values.

fixes #22442
2017-03-11 09:45:55 -06:00
Pierre Templier
ea0bae6bca Typo + rephrase (#22526) 2017-03-11 09:51:59 +00:00
THEBAULT Julien
374d491ba5 Check if file is not a directory with get_bin_path function (#13985) 2017-03-10 12:21:15 -05:00
Ricardo Carrillo Cruz
9173a7727c Fix issue on nxos modules when transport is passed via provider (#22488)
The nxos modules read the task level transport variable, thus if
the user pass it via provider the all fail with an UnboundLocalError.

Fixes #22355
2017-03-10 07:32:24 -07:00
Brian Coca
7ad6ce7ea1 moved network module magic from hardcoded to conf 2017-03-09 21:49:02 -05:00
Brian Coca
2d9bf88897 deal with other 'ungrouped' corner cases 2017-03-09 20:11:37 -05:00
Adrian Likins
ae31634c23 Make vault encrypt/create/etc confirm pass again.
Make the 'write' modes of vault confirm a new password
before using, again.

This was unintentionally disabled in
309f54b709 previously.

Fixes #22438
2017-03-09 14:32:21 -05:00
Adam Hamsik
6cf8318468 Add simple module to import/delete ssl certificate from/to java keystore (#20274)
* Add simple module to import/delete ssl certificate from/to java keystore.

* add diff/check mode support, fix reported issues and simplify decision logic

* Fix build by adding new line at the end of file.

* Some updates to module requested PR review

* Add simple executable parameter

* Fix build error
2017-03-09 14:14:43 -05:00
John R Barker
e5b990a55a Fix invalid fields in module DOCUMENATION (#22297)
* fix module doc fields

* More module docs corrections

* More module docs corrections

* More module docs corrections

* More module docs corrections

* correct aliases

* Review comments

* Must quote ':'

* More authors

* Use suboptions:

* restore type: bool

* type should be in the same place

* More tidyups

* authors

* Use suboptions

* revert

* remove duplicate author

* More issues post rebase
2017-03-09 16:20:25 +00:00
Dag Wieers
654e95ea49 wait_for_connection: Update the docs to implementation (#22400)
* Update the docs to conform to implementation

Somehow the docs were still mentioning a default timeout of 300 seconds.
Whereas the implementation defaults to 600 seconds.

* Improve examples even more
2017-03-09 14:00:36 +00:00
Ricardo Carrillo Cruz
c57729944b Fix the eos_banner idempotency (#22413)
The map_config_to_obj calls the run_commands  helper function,
which returns a list of results.
However, the map_params_to_obj return a single string.
Therefore, the comparison between the two datasets could never be equal,
breaking idempotency.
Also, the 'no banner' command should be run on absent only if there's a banner
text set.

Fixes #22194
2017-03-09 12:43:54 +00:00
Tim Rupp
32146acf4e Actual attributes were being created and messing with the modules (#22424) 2017-03-08 21:10:02 +00:00
Brian Coca
78e116077a readd all.add_host as for loop uses diff data 2017-03-08 15:56:10 -05:00
Nicolas Braud-Santoni
f689cca0b8 vault: Uniformize construction of cipher objects 2017-03-08 15:14:20 -05:00
Nicolas Braud-Santoni
680d61c609 vault: call is_encrypted directly in is_encrypted_file
Doing the conversion and checking for exceptions there is pointless
since is_encrypted already does it.
2017-03-08 15:14:20 -05:00
Brian Coca
385f1d82dc ensure all hosts in all
fixes #20252
2017-03-08 14:56:08 -05:00
Matt Clay
0b250016b0 Fix PEP 8 issue. 2017-03-08 10:05:19 -08:00
René Moser
6f426b9d06 cloudstack: cs_vpc: fix vpc in projects not found (#22416) 2017-03-08 18:52:29 +01:00
Dave Kasberg
8102e66425 Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385)
* misc fixes for idempotent issue in cnos_vlan

* Fix up hyperlinks in module documentation

* spell correction
2017-03-08 17:09:17 +00:00
Hao
96a19a4521 iptables module: match=conntrack with ctstate not working (#21976) 2017-03-08 11:01:47 -05:00
Brian Coca
406505bfe5 fixes cache file modules with bad path permissions
now module will fail to load and report an error (turned into warning as this should not be fatal)
fixes #13093
2017-03-08 10:58:53 -05:00
Dag Wieers
770ab76ed0 win_region: Small changes to Add-AnsibleParam and docs (#22310) 2017-03-08 15:58:14 +00:00
Alex Chvatal
f1d8d7ba13 include upgraded packages in pacman upgrade action (#20713)
* include upgraded packages in pacman upgrade action

* display upgraded packages as diff output for pacman upgrade

* document the packages return key

* add --diff support for installing, removing and checking packages

* include package versions in pacman diff output
2017-03-08 10:32:02 -05:00
René Moser
7f35220744 cloudstack: cs_firewall: fix pep8 and typo s/endpoint/endport/ (#22406) 2017-03-08 15:12:48 +01:00
Drew Russell
94f9bb962f Add a new module for Cisco Spark notifications (#19348)
* Add a new module for Cisco Spark notifications

* Added authentication validation to check mode

* Re-added description and removed Pylint references

* Moved the authentication test to the spark_message function

* removed duplicate fetch_url statements

* documentation formatting updates and if __name__ update

* recipient typo fix and added correct Formatting options to documentation options

* updated version added to 2.3
2017-03-08 12:49:38 +00:00
Dag Wieers
c45f6905fc wakeonlan: Bugfix and small improvements (#22389)
- Close the socket after use
- Use proper parameter types
- Remove redundant parameter options
- Clean up docs
- Move module from network/ to remote_management/
- Add check-mode support
2017-03-08 12:42:55 +00:00
Tim Rupp
a8910e78ca Using the wrong variable (#22386) 2017-03-08 08:43:36 +00:00
Tim Rupp
3c69cf6d7d Moved exception handler in a little bit (#22376)
It wasn't being caught in the previous indentation
2017-03-07 21:05:01 +00:00
Adrian Likins
edcbef27ec Retain vault password as bytes in 2.2 (#22378)
* Retain vault password as bytes in 2.2

Prior to 2.2.1, the vault password was read in as byes and then remained
bytes all the way through the code.  A bug existed where bytes and text
were mixed, leading to a traceback with non-ascii passwords.  In devel,
this was fixed by changing the read in password to text type to match
with our overall strategy of converting at the borders.  This was
backported to stable-2.2 for the 2.2.1 release.

On reflection, this should not have been backported as it causes
passwords which were originally non-utf-8 to become utf-8.  People will
then have their working 2.2.x vault files become in-accessible.

this commit pipes bytes all the way through the system for vault
password.  That way if a password is read in as a non-utf-8 character
sequence, it will continue to work in 2.2.2+.  This change is only for
the 2.2 branch, not for 2.3 and beyond.

Why not everywhere?  The reason is that non-utf-8 passwords will cause
problems when vault files are shared between systems or users.  If the
password is read from the prompt and one user/machine has a latin1
encoded locale while a second one has utf-8, the non-ascii password
typed in won't match between machines.  Deal with this by making sure
that when we encrypt the data, we always use valid utf-8.

Fixes #20398

(cherry picked from commit 5dcce0666a)
2017-03-07 15:30:09 -05:00
Alex Lo
8e910cce8a ec2_group: description is only required when group state is present (#19791)
* description is only required when group state is present

also note that AWS requires a non-empty description when creating a security group

* clarify description requirement
2017-03-07 20:55:17 +01:00
René Moser
e0d38fb137 composer: fix escape working_dir (#22363)
* composer: fix escaping of path working_dir

* composer: fix pep8
2017-03-07 20:51:04 +01:00
Brian Coca
c71b15a696 Bad extra early (#22322)
* catch bad extra vars data earlier

* incoporated @alkins feedback
2017-03-07 13:44:36 -05:00
Toshio Kuratomi
1ea3313c90 Document synchronize limitations around become and connections (#22373)
* Document synchronize limitations around become and connections
2017-03-07 10:22:24 -08:00
Brian Coca
c4cff44e77 fix 'ungrouped' issue with some inventory formats 2017-03-07 12:49:24 -05:00
Brian Coca
20bf02f6b9 rename return var to avoid conflicts
fixes #22323
2017-03-07 12:08:31 -05:00
Ricardo Carrillo Cruz
fd6429fbd1 Idempotency fix for iosxr_config (#22365)
Multiple fixes to address idempotency issues, along with refactor of
module_utils iosxr to look like ios, for code consistency.

Fixes #22315
2017-03-07 15:57:19 +00:00
Kamil Cholewiński
ec9582fd83 Fix invocations of module.fail_json with no msg=
Bonus: add missing % in cs_nic.py
2017-03-07 10:17:14 -05:00
Michael Scherer
91860b2423 Verify that the role specification is using a comma before warning
One way to trigger this is having this snippet in meta/main.yml:

dependencies:
  - role: foo
    when: "use_foo == True"

It shouldn't show a warning but since we assume that 'foo' is the old
style format, it always show one. So we should verify the
style before calling role_spec_parse.
2017-03-07 09:35:42 -05:00
Chris Alfonso
25827c85d2 Fixing issue #22193 - authorize argument is not deprecated for 2.3 for ios and eos (#22326) 2017-03-07 13:03:44 +01:00
Loïc Blot
792efbe3b6 virt.py: autostart VM attribute (#22208)
* virt.py: autostart VM attribute
autostart is now an idempotent VM attribute instead of a non idempotent forced autostart attribute set to True

* Make shippable happy

* Missing version added

* Fix some points

* Autostart default is now None

* Ident fix
2017-03-07 11:07:19 +00:00
Andrea Giardini
863c1ff38b Ec2_tag support for check mode (#21779) 2017-03-07 10:44:32 +00:00
John R Barker
8531547ec2 Correct module:, it should match filename (#22296)
* Validate module: matches filename

* remove testcase

* Revert module validation, move to different PR
2017-03-07 09:49:03 +00:00
Tim Rupp
c2180888f7 I think for now I'll just not use dunder setter (#22336) 2017-03-07 09:36:13 +00:00
Ricardo Carrillo Cruz
5357a67607 Remove 'update' param from documentation examples (#22350)
The 'update' param is no longer supported, thus removing from docs.
2017-03-07 10:32:36 +01:00
Ryan Brown
f0491b4261 [cloud] Fix ZeroDivisionError in ec2_elb_facts module (#22332) 2017-03-06 17:26:02 -05:00
Tim Rupp
6ff9bd0a33 Fixes baseclass for new f5 modules (#22333) 2017-03-06 22:04:49 +00:00
Lujeni
d942196666 Use a dedicated directory for the mongodb modules (#22187)
* Use a dedicated directory for the mongodb modules
* Missing the RETURN documentation in mongodb_user
2017-03-06 13:14:14 -08:00
JimFicarra
2206b5e900 Fix Issue #20553 #15737 - merge with reg functionality #19443 (#20555) 2017-03-06 12:56:17 -08:00
Robin Miller
9c20182bdf [cloud] Avoid failures in RDS modyue due to throttling while waiting (#22271)
1. Check less aggressively for resources that take a long time to return
(some resources can take an hour or more).
2. Handle throttling when checking for resources, and back off quickly
when it occurs.
2017-03-06 15:19:59 -05:00
Ricardo Carrillo Cruz
43aef4e868 Do not pass filters to os_group get_group call (#22321)
As default is set to None, the get_group call doesn't find groups
on domain 'None'.
Only pass filters in case we pass domain_id value.
2017-03-06 19:15:00 +01:00
Dan Vaida
433829769e [cloud] Fix data types in ec2_elb_lb causing resource to be spuriously updated (#21906)
fixes broken idempotence caused by the idle_timeout and cross_az_load_balancing params. (#21906)
2017-03-06 12:27:30 -05:00
Brian Coca
516d61f1ae simplified if 2017-03-06 12:13:05 -05:00
Marius Gedminas
15c7288ab9 Show diff when file: state=link changes the symlink target (#22243)
* Show diff when file: state=link changes the symlink target

* Integration test for symlink target change

* Also check soft link idempotency
2017-03-06 11:29:20 -05:00
Michał Masłowski
228131d1cd lambda: Fix adding environment variables to functions previously not having any (#22313) 2017-03-06 11:10:40 -05:00
Valentyn Boginskey
2d10ad4a3e [cloud] allow ec2_lc to take user data from binary files w/ user_data_path (#20138)
* Add user_data_path parameter to ec2_lc module

* Improve user_data_path parameter documentation

- Specify mutual exclusivity
- Specify `version_added`
- Change module parameter type to `path`

* Use correct comparison for user_data result

* Include traceback on error and use with block

* Only hide user data if provided in file
2017-03-06 11:09:25 -05:00
John R Barker
aa3fbb0d54 Restore extends_documentation_fragment: nxos (#22312)
* Restore extends_documentation_fragment: nxos

* Restore extends_documentation_fragment: nxos
2017-03-06 13:53:33 +00:00
Angus Williams
9be30f2eca Fixes idempotency issue when upgrading chocolatey packages (#21476) 2017-03-06 12:55:42 +00:00
Dhivyap
89cf8d83e4 dellos* modules- Documentation Update (#22306) 2017-03-06 12:53:35 +00:00
gaudenz
2772f9d9b0 cloudscale: Document SSH host key retrieval (#22299)
Document how the cloudscale_server module can be used to retrieve the
SSH host keys of the server.
2017-03-05 22:48:45 +01:00
René Moser
c1730c21ce cloudstack: cs_sshkeypair: fix fingerprint not used as identifier (#22276)
* cloudstack: cs_sshkeypair: fix fingerprint not used as identifier

* remove from legacy

* fix for 2 keys, one with name and one with fingerprint
2017-03-05 22:47:19 +01:00
John R Barker
3afb67e9b2 Fix Docs build issues (#22295)
* restore network docs fragments

* Fix RST errors

* code-block formatting
2017-03-05 11:41:29 +00:00
John R Barker
0775d39a87 Add extends_documentation_fragment back (#22293) 2017-03-05 08:37:01 +00:00
John R Barker
284b3e42d1 timezone: Inline emphasis start-string without end-string (#22292)
Fixes
`docs/docsite/rst/timezone_module.rst:20: WARNING: Inline emphasis start-string without end-string.`
2017-03-05 08:29:27 +00:00
tchernomax
f65661ab66 documentation: add important information about attributes parameter (#18732)
If the attributes aren't set in the right order the module always detect
an attributes change.
2017-03-04 21:27:38 -08:00
Adrian Likins
694c57de2e add python version info to --version (#22089)
* add python info to ansible --version
* Add unit tests for cli.CLI.version
2017-03-03 16:41:54 -05:00
Matt Davis
d12c93ef2b fix azure_rm version checks (#22270)
* Use packaging.version.Version instead of LooseVersion for better support of prerelease tags (eg, 0.30.0 > 0.30.0rc6)
* Add explicit check/error for msrestazure package
2017-03-03 13:28:08 -08:00
Clemens Weiß
7018aa3316 Update expired keys (#21539)
If a key has expired it will not be added by this module, so check for "expired" in the list of keys.
Example output with expired key:

pub   1024D/5072E1F5 2003-02-03 [expired: 2017-02-16]
uid                  MySQL Release Engineering <mysql-build@oss.oracle.com>
2017-03-03 20:53:21 +01:00
Will Thames
274016101f ec2_vpc_subnet: cope with empty tags (#21813)
ensure_tags fails if `tags` is None rather than an empty
dict. Ensure that not passing `tags` parameter is equivalent
to passing an empty dict.

Fixes #21778
2017-03-03 13:47:29 -05:00
Will Thames
699f0e861c [cloud] Add supports_check_mode to ec2_ami_find (#22180)
ec2_ami_find is a facts module, and makes no
changes, so trivially supports check mode
2017-03-03 13:34:38 -05:00
Jean-Philippe Evrard
19b49a9224 [cloud][lxc] Prevent hostname to be set (#22246)
If the host .bashrc holds a var named HOSTNAME, the container
where the lxc_container module will attach to will inherit from
this var, potentially breaking some applications (like rabbitmqctl)
due to an incorrect $HOSTNAME reported in the container.
2017-03-03 13:33:41 -05:00
Brian Coca
f53921093f respond with correct vaulting suggestion
fixes #22247
2017-03-03 11:38:44 -05:00
Viktor Fogelberg
b9ed3454e4 Change comment to reflect the actual code 2017-03-03 10:32:47 -05:00
Andrea Giardini
04e990281e Add flag to Docker pull_image to know when the image is already latest (#21508)
* Add flag to Docker pull_image to know when the image is already latest

Whenever the flag pull is set to 'yes' the resource is always defined
as 'changed'. That is not true in case the image is already at the
latest version.

Related to ansible/ansible#19549

* Docker pull_image does not change status if the image is latest
2017-03-03 10:16:16 -05:00
Artem Zinenko
7decd10c76 Fixes #22136 (#22137) 2017-03-03 09:50:42 -05:00
Peter Sprygada
6c8025ce5c adds eos_system integration tests (#22214)
* adds integration test cases
* updates eos_system with minor bug fixes
2017-03-02 21:20:17 -06:00
James Cammarata
a2599cab79 Fix variable precedence of INI/script vars to be in-line with docs.
This commit also adds a new test script (ansible-var-precedence-check.py in code-smell/)
to provide us with another line of defense against precedence bugs going forward.

The precedence docs state that the INI vars have a lower precedence than group/host
vars files for inventory and playbooks, however that has not been the case since 2.0
was released. This change fixes that in one way, though not exactly as the docs say.
The rules are:

1) INI/script < inventory dir < playbook dir
2) "all" group vars < other group_vars < host_vars

So the new order will be (from the test script mentioned above):

8. pb_host_vars_file - var in playbook/host_vars/host
9. ini_host_vars_file - var in inventory/host_vars/host
10. ini_host - host var inside the ini
11. pb_group_vars_file_child - var in playbook/group_vars/child
12. ini_group_vars_file_child - var in inventory/group_vars/child
13. pb_group_vars_file_parent - var in playbook/group_vars/parent
14. ini_group_vars_file_parent - var in inventory/group_vars/parent
15. pb_group_vars_file_all - var in playbook/group_vars/all
16. ini_group_vars_file_all - var in inventory/group_vars/all
17. ini_child - child group var inside the ini
18. ini_parent - parent group var inside the ini
19. ini_all - all group var inside the ini

Fixes #21845
2017-03-02 17:07:00 -06:00
Matt Martz
ff20ab7d44 Warn when jinja2 delimiters are found in a when statement (#20312)
* Warn when jinja2 delimiters are found in a when statement

* Use templar._clean_data to look for templating
2017-03-02 17:02:07 -06:00
Matt Martz
1fe67f9f43 Extend SSH Retry to put_file and fetch_file (#20187)
* Move retry logic into _ssh_retry decorator, and apply to exec_command, put_file and fetch_file

* Update tests to reflect change

* Move _ssh_retry to _run, and update tests to reflect

* piped should use exec_command instead of removed _exec_command

* Rework tests to support selectors instead of select.select
2017-03-02 16:56:29 -06:00
Peter Sprygada
911600acf9 update junos_command integration tests (#22213)
fixes integration test to check for full rpc-reply string when
converted from xml.  This is a change from 2.2 as the rpc-reply tag
is no longer stripped off
2017-03-02 16:46:23 -06:00
Robin Roth
3afc993f3a Fix git clone tag with depth=1
* Fixes #21316, add testcase based on this
* Add option `--branch NAME` to git clone command in case of branch or
tag in combination with depth=1
  * This option should work back to at least git 1.8 and thus on all
  supported distributions
* Provide better warning if depth is dropped
2017-03-02 14:11:50 -08:00
Peter Sprygada
7b2c013e5a returns xml as a display option to junos_command (#21833)
The display option xml as accidentially removed from the display
argument.  This patch adds xml back as an option.

fixes #21823
2017-03-02 16:05:20 -06:00
Peter Sprygada
8d76703a9d fix for handling commands that return no data or error (#22086)
This patch addresses a problem in nxos_facts where certain commands are
not supported or return no data, the module would raise an exception.
With this patch, the nxos_facts module will now print a warning for any
commands that return no data and not populate the facts.

fixes #22001
2017-03-02 16:02:16 -06:00
Dag Wieers
237411613d Ensure that filenames from archives are not expanded
This fixes #21795
2017-03-02 11:48:24 -08:00
Brian Coca
7966beb6c9 minor fixes to apt
fixes #22124
2017-03-02 13:56:58 -05:00
John R Barker
456b4ace7b Move cnos_backup. to correct dir (#22207) 2017-03-02 17:14:15 +00:00
Ivan Bojer
8b2ca79507 panos new module used for security policy creation (#20778)
* - new module used for security policy creation

* - added support for API key authentication
- added support for Panorama

* documentation changes

* documentation update

* minor doc changes based on review comments

* move ANSIBLE_METADATA

* changes to docs per reviewer comments
2017-03-02 16:42:54 +00:00
Ivan Bojer
563a0aea83 new module that allows for address service object creation (#20660)
* new module that allows for address service object creation

* added missing check for external library

* doc changes per review

* fixed choices string

* doc changes based on reviewer comments

* - changes per reviewer comments
2017-03-02 16:41:48 +00:00
Dave Kasberg
3c44644c08 New module: cnos_vlag (#21535)
* VLAG module and tests

* Correct the link in the description of the module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:37 +00:00
Dave Kasberg
9258b62707 New module: cnos_conditional_template (#21794)
* Initial commit of cnos_conditional_template

* fix compile error in module, change module short description, move roles to integration/roles

* fix line length

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:19 +00:00
Dave Kasberg
059a0d07a4 New module: cnos_condition_command (#21793)
* Initial commit of cnos_condition_command

* fix pep8 error of line too long

* fix pep8 tab/space issue

* Move roles to integration/roles directory and remove aliases file.

* Update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:09 +00:00
Dave Kasberg
2f126829bf Initial cnos_image commit (#21789)
* Initial cnos_image commit

* corrected required/default values in documentaiton

* fixed choices for imgtype

* removed a colon

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:00 +00:00
Dave Kasberg
70af90436a New module: cnos_rollback (#21788)
* Initial commit for cnos_rollback

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:10:27 +00:00
Dave Kasberg
267cc0edfc New module: cnos_backup (#21787)
* Initial commit of cnos_backup

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change import cnos statement
2017-03-02 16:10:14 +00:00
Dave Kasberg
6549c70091 New module: cnos_template (#21786)
* Initial cnos_template commit

* fix compile errs, update short description, move roles to integration/roles

* now commit the module

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:10:04 +00:00
Dave Kasberg
c112539538 New module: cnos_command (#21785)
* Initial commit for cnos_command

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:45 +00:00
Dave Kasberg
d96aa55d4c New module: cnos_save (#21754)
* initial comment of cnos_save

* Move roles to integration/roles directory and remove aliases file.

* update the module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:33 +00:00
Dave Kasberg
1b3e3407d8 New module: cnos_reload (#21753)
* initial commit of cnos_reload

* add parens to options

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:21 +00:00
Dave Kasberg
2e6df415b6 New module: cnos_showrun (#21752)
* initial commit of cnos_showrun

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:00 +00:00
Dave Kasberg
e5ceb3a99c Fix for cnos.py utility file for Python3.5 (#21750)
* fix in cnos.py utility file

* fix compile errors in cnos.py, update module short description in cnos_vlan.py, move vlan roles under integration/roles

* corrections in readme

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:08:49 +00:00
Dave Kasberg
709b03d1c8 New module: cnos_facts (#21743)
* cnos_facts module commit

* fix options string

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:08:23 +00:00
Dave Kasberg
c4d73b6765 New module: cnos_factory (#21740)
* Commit cnos_factory

* fix options {} issue

* update the module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:07:42 +00:00
Dave Kasberg
4bf20fb174 New module: cnos_interface (#21613)
* initial commit

* fix tab/space issue

* fix space issue in vars/main.yml

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change module directory name to Lenovo and change import cnos statement
2017-03-02 16:07:21 +00:00
Dave Kasberg
14c2c787cb New module: cnos_portchannel (#21589)
* cnos_portchannel initial commit

* Fix line length issue in module

* fix whitespace on line 90

* correct yamllint space issue

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:07:01 +00:00
Dave Kasberg
3ed34032cd New module: cnos_bgp (#21587)
* cnos_bgp module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:06:09 +00:00
Brian Coca
30c6a77045 moved any_errors_fatal to base (#21585) 2017-03-02 10:28:20 -05:00
Pierre-Louis Bonicoli
fb8aa5637a systemd: return an error when systemctl command isn't available 2017-03-02 10:13:24 -05:00
Wayne Witzel III
703d6cb02f Ansible Tower job_wait module (#22160)
* Ansible Tower job_wait module

* clean up documentation and update code comment
2017-03-02 14:34:23 +00:00
Wayne Witzel III
7a5173486d Ansible Tower job cancel module (#22161)
* Ansible Tower job cancel module

* fix interpreter line
2017-03-02 14:33:56 +00:00
Wayne Witzel III
7d584f3090 Ansible Tower job list module (#22164) 2017-03-02 14:33:39 +00:00
mikedlr
710b6c7209 [cloud] bugfix for lambda module with empty environment (#22196)
* lambda module - failing test case: shows lambda create mishandles empty environment

* lambda module - fix lambda create with empty environment

* lambda module - fix lambda create with empty environment - style fixes
2017-03-02 09:25:39 -05:00
Ondra Machacek
7d397e7d3e cloud: ovirt: Add download image support to disks module (#22101)
This PR fixes: https://github.com/ansible/ansible/issues/22088
2017-03-02 08:32:36 -05:00
molekuul
ef79932d16 added new RETURN block (#22183) 2017-03-02 12:51:31 +00:00
Matt Davis
a60d358e56 Revert "win_service_stat: Added module" (#22184) 2017-03-02 01:34:11 -08:00
Matt Davis
4901763d72 fix conflicts in win_chocolatey execution_timeout (#22182) 2017-03-01 23:13:24 -08:00
Branden Pleines
299e964dbf Adding registry functionality to win_acl module (#19443)
* Updated win_acl.ps1 module with registry functionality

* adding registry functionality to the most recent win_acl module in ansible/ansible

* updated in sync with win_regedit.ps1
2017-03-01 22:38:27 -08:00
David Baumann
7d44b2987e Add Support for CachingMode Setting (#21103)
Add Support for CachingMode Setting
2017-03-01 22:36:05 -08:00
Jordan Borean
778dc9ad38 win_copy: added remote and content options (#21546)
* win_copy: added remote and content options

* readded comment about original_basename accidentally removed
2017-03-01 22:35:03 -08:00
Dag Wieers
17a39e88a5 win_chocolatey: Add example to upgrade all installed software (#22167)
Add a missing example on how to upgrade all installed software using win_chocolatey.

This fixes #21559
2017-03-01 22:22:33 -08:00
Dag Wieers
868d19b509 Typo in Add-DeprecationWarning call (#22168)
Unfortunately the script does not stop/fail because of such errors.
2017-03-01 22:21:22 -08:00
Jordan Borean
f4f09c9dbf Rewrote win_service with more options/check_mode (#19143) 2017-03-01 22:17:16 -08:00
Jordan Borean
3da806f32a win_service_stat: Added module (#21944) 2017-03-01 22:04:57 -08:00
Matt Davis
c98647ccf8 initial commit of win_domain module (#22179) 2017-03-01 17:49:15 -08:00
azenk
bdf0ab451e Add role skeleton support (#17079)
* Add role skeleton support

The default role skeleton used by ansible-galaxy is good, but it doesn't
allow organizations to customize it to suit their needs.  This patch
addresses that by adding the option to point ansible-galaxy at a
role skeleton directory.  The contents of this directory are then
copied (or rendered) into the output role directory.  Appropriate
command line options and configuration entries are added to allow for
further customization from the role skeleton.

* Remove dependency on platforms list from test

Platforms are no longer provided to the template by galaxy init.
Removing the code in our test meta/main.yml template that relied on it.

* Fix whitespace issue
2017-03-01 20:23:18 -05:00
Matt Davis
a5edd6e635 initial commit of win_disk_image (#22175) 2017-03-01 16:31:01 -08:00
Matt Davis
42ccf9ca98 tweak transport_tests to avoid logic duplication (#22158) 2017-03-01 15:54:27 -08:00
Benjamin Jolivot
2ee3a5aa07 Fortios ipv4 policy (#21849)
* New module fortios_address_group

* New module fortios_ipv4_policy

* New module fortios_ipv4_policy

* Fix pep8

* Fix alias doc problem

* Fix string format for 2.5 compat + close cnx

* Forgoten if string != ""

* Fix doc, change action to policy_action & add action as alias

* fix doc + bug in timeout + duplicate code for config compare

* Create class AnsibleFortios in module_utils/forios.py + use in ipv4_policy module

* remove json import

* python3 error handling compatibility
bad examples for srcadd or dstaddr s/any/all/
remove pyFG dependency in module (moved to module_utils)
id type is int but casted as string
call fortiosansible object sooner
typo in doc
2017-03-01 14:11:36 -08:00
GwenaelPellenArkeup
17a4a655a3 [cloud] New module: gce_template (#20918)
* add gce_template.py

gce template manage GCE Instance Templates in Google Cloud Plateform.

* change gce_template on style/formating

Apply change on style/formating from reviewer request.

* change gce_template on style/formating again.

* Rename gce_template.py to gce_instance_template.py

* update gce_instance_template.py to pass CI

Oops :)
ERROR: Import found before documentation variables. 
All imports must appear below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA.

* Update gce_instance_template.py

change documentation replace gce_template by gce_instance_template

* Update gce_instance_template.py

Sorry for the typography fault. The day begins badly.

* Update gce_instance_template.py

apply text change
  s/Compte/Compute/
  s/Plateform/Platform/
  s/forword/forward/
change documentation for subnetwork, subnetwork is name.
add mutually_exclusive in AnsibleModule arguments.
change disk_type as an option type.

* Update gce_instance_template.py

change the documentation.

* Update gce_instance_template.py

RETURN is required for all new modules. Is empty because no new return variable returned.

* Update gce_instance_template.py

Ansible will verify that only present/absent are passed as the state. This else is not needed.
2017-03-01 16:50:07 -05:00
Fabrizio Colonna
f0de1e6c85 Added parted module (#20399)
* Added parted module

* Amended documentation

* Improved documentation

* Managed the case of parted not returning device information.

* Fixed Shippable test not passing

* Fixed compatibility with Python 2.4

* Cleanup of the state option, improved flags management, documentation refinements.

* Compacted format function, code style cleanups, amended comments.

* Fixed bug related to parted data parsing.

* Support for check-mode, amended size data type.

* Fixed Shippable test not passing.

* Added full suport for CHS and CYL units, applied suggested changes.
2017-03-01 22:31:04 +01:00
Ondra Machacek
9fe0ae082a cloud: ovirt: logout if token is not used (#21517) 2017-03-01 19:59:15 +00:00
Wayne Witzel III
b2d4eeb293 Ansible Tower job_launch module (#22148)
* Ansible Tower job_launch module

* Added RETURN documentation and fixed import locations

* remove superfluos required attributes, make tags a list, and fix some typos

* only join tags if they are actually a list

* use isinstance instead of type, cleanup imports
2017-03-01 19:57:35 +00:00
Ondra Machacek
ab16e4b40e cloud: ovirt: add note about ENGINE_API_FILTER_BY_DEFAULT (#22155) 2017-03-01 19:35:14 +00:00
Tom Melendez
0c14548e5f [GCE] New module: Google Cloud Spanner (#21731)
* [GCE] Google Cloud Spanner module

Supports the creation/updating/deletion of Spanner instances and create/drop databases.

* [GCE] On update, node count will not be reset to one if not specified.

* [GCE] fixed some imports.

* [GCE] rename display_name to instance_display_name

* [GCE] Recreate instance in order to have desired values at create time.

* Fix linter error on imports

* [GCE] Added force_instance_delete option to ensure an instance is not removed by mistake.

* [GCE] Google Cloud Spanner module

Supports the creation/updating/deletion of Spanner instances and create/drop databases.

* [GCE] On update, node count will not be reset to one if not specified.

* [GCE] rename display_name to instance_display_name

* Fix linter error on imports

* fixed doc bug

* Remove imports mistakenly brought in during merge
2017-03-01 14:26:07 -05:00
Dag Wieers
52959ebdc1 wait_for_connection: Wait for system to become reachable (#20011)
* WIP: wait_for_connection: Wait for system to be reachable

This action plugin allows to check when a system is back online and
usable by Ansible.

As an example, when doing a SysPrep and running Enable-WinRM.ps1, it
takes between 10 to 20 seconds between the WinRM TCP port to open, and
it actually being able to server Ansible requests. This time is variable
and depends on the boot process.

Current implementation is specific for Windows (WinRM) only, this will
be fixed shortly.

This fixes #19998

* Support other transport types

* Various improvements

- Fix reported typo
- Add transport_test support in accelerate plugin
- Ensure port is an integer

* Improve examples

* Small fixes

- Use correct ConfigureRemotingForAnsible.ps1 script name
- Only use win_ping when remote shell is known to be Powershell
- Add integration tests to CI framework
2017-03-01 11:00:49 -08:00
Brian Coca
7b9f16becb minor display changes in metadata 2017-03-01 13:12:24 -05:00
Brian Coca
b2f7e583d3 moved metadata to bottom 2017-03-01 13:09:18 -05:00
Peter Sprygada
c26cac2a53 catches exception in nxos_command and returns failed message (#22151)
Catches exception in Conditional check and returns appropriated failed
message
2017-03-01 12:41:31 -05:00
Nathaniel Case
d9d2e6deb6 Junos provider readd (#21869)
* Restore `provider` to junos_*

Fixes #21824
Fixes #21824
Fixes #21827

* Fix `confirm_timeout` related errors
* Fix glaring issues with _junos_template
2017-03-01 12:39:44 -05:00
Ondra Machacek
85fc930066 cloud: ovirt/rhev add note old modules were replaced (#22118) 2017-03-01 17:05:02 +00:00
Nathaniel Case
b8f4b1f951 Provide message instead of backtrace on bad operator (#21851)
Fixes #21847
2017-03-01 12:01:35 -05:00
Toshio Kuratomi
49194a66c8 Fix log_invocation function to pass unittests on python3
Normalize this function to use native strings.  Native strings won't
display an extra "u" or "b" character to denote py2 unicode or py3 bytes
types.
2017-03-01 08:50:37 -08:00
Matt Martz
6e8e90ceb4 Warn when using the deprecated HEADER_ arguments (#20236)
* Make sure the uri module warns about using the deprecated HEADER_ arguments, so that we can actually deprecate in a future version

* Use module.deprecate

* No need to de-dupe ourselves, looks like it is done somewhere I didn't initially see
2017-03-01 11:35:48 -05:00
Benjamin Jolivot
22d657d3c7 Fix #22130 (ini_file crash when destination file don't exists or is e… (#22132)
* Fix #22130 (ini_file crash when destination file don't exists or is empty)
2017-03-01 08:20:51 -08:00
Gaurav Rastogi
61288b14fd Renamed the avi_ansible_utils to avi. Fixed the import error and clea… (#22112)
* Renamed the avi_ansible_utils to avi. Fixed the import error and cleaned up code.

* Refactored all new modules to use the new module_utils.avi

* Added module_utils.avi to python 2.4 skip list
2017-03-01 16:16:59 +00:00
Dag Wieers
95096164dd hpilo_facts: Get facts from HP iLO mgmt board (#21673)
This is the original `hpilo_facts` module that was once accepted in
Ansible but had been removed subsequently because it could not be tested
by the Ansible project.

Since then it was moved to the ansible-provisioning project and
maintained by HP engineers going forward.

Now we are trying to get it upstreamed again.
2017-03-01 16:02:50 +00:00
jhawkesworth
1c2e8fde29 Add win_msg module (#22008)
* new implementation of win_msg.  TODO tests

* added check_mode.  Get-AnsibleParam for parameters.  Default msg is now 'Hello world!'. Use hash for $results.
Re-ordered some parameters alphabetically.
Documentation now in raw strings.  Removed spurious required: false.  Added metadata.

* Keep pep8 checks happy

* Really keep pep8 checks happy this time

* update Changelog.md

* make bracket style internally consistent

* added units to display_seconds description
2017-03-01 14:16:33 +00:00
Dag Wieers
65ee3a6f19 iso_extract: new module to extract files from ISO images (#21957)
This is the original iso_extract module from the ansible-provisioning project.
We are upstreaming all our modules, and this PR is part of that process.
2017-03-01 13:33:32 +00:00
Gaurav Rastogi
02af4fb868 Added new Avi module to setup Tenant configuration. (#21943) 2017-03-01 13:17:57 +00:00
Gaurav Rastogi
f2ca16b6ee Added new Avi module to setup System configuration. (#21942) 2017-03-01 13:17:27 +00:00
Gaurav Rastogi
9edc378333 Added new Avi module to setup Analytics Profile (#21941)
* Added new Avi module to setup Analytics Profile

* Fixed typos in documentation
2017-03-01 13:16:41 +00:00
Gaurav Rastogi
4b9bb88f63 Added new Avi module to setup Application Persistence profile. (#21940) 2017-03-01 13:15:57 +00:00