Commit Graph

15488 Commits (4fb8b03f0569e2bc3ee0ed16ec9be54178840714)

Author SHA1 Message Date
Adrian Likins 3af6ad1687 Fix iptables TypeError if state/match/ctstate missing
Completely untested...

Fixes #22465
8 years ago
Alexander Gubin 06bcff8d92 Mark keystore_pass as 'no_log', to avoid leaking it 8 years ago
Joshua C. Randall 444b67ca0c s3_bucket: fixes #22464 without fully implementing support for ceph bucket update (#22538) 8 years ago
Ganesh Nalawade 8b6d786cff Fix junos prompt issue (#22536)
Need to handle junos shell prompt
that end's with '%'
8 years ago
Peter Sprygada 39c38bf30d fixes candidate var type in junos shared lib (#22551)
* candidate var can now be string, list or element
* fixes minor bug in junos_template for backup argument
* disabled invalid integration test for junos_template
8 years ago
Peter Sprygada b3004e19a5 Junos facts (#22550)
* Update metadata & docs

* basic facts add

* Start building facts

* Retrofit more junos_facts

* Reimplement facts again

* Hardware

* Hook up config

* Hook up interfaces

* updates junos_facts to use netconf

* updates default facts
* adds config facts
* updates hardware facts
* updates interface facts
8 years ago
Johannes Kohnen cc2eecc247 Enable path expansion in GCE modules
This is basically a replay of #16064 from `gce.py` to other pertinent
`gce_*.py` files. It enables expansions of paths in `gce.ini` like
`~/.project.json`
8 years ago
John R Barker 0d0c38400f eos_template is deprecated (#22549) 8 years ago
John R Barker d21c16d455 Remove invalid `type:` (#22548) 8 years ago
Peter Sprygada 2b2072a8c9 roll up of fixes and updates for junos modules (#22543)
* removes cli functions
* adds comment and confirm to arguments
* implements zeroize argument
* fixes get_diff function in junos shared lib to return diff
* lots of minor bug fixes in junos_config
* minor syntax fixes in junos_netconf
* updates netconf integration tests
8 years ago
Peter Sprygada 09c08e1939 minor clean up of junos_command (#22545)
* removes unneeded check_transport function
* removes unneeded global vars
* verifies all integration tests are passing
8 years ago
Peter Sprygada 995497129e updates junos_command to send commands over netconf (#22540)
* junos_command should send all cli commands over netconf
* task based credentials are now optional
* commands and rpcs are not mutually exclusive anymore
8 years ago
Peter Sprygada 3f0f7c4f4e updates junos shared lib and action handler (#22541)
* removes cli functions from shared lib
* adds cli functions to junos_netconf module
* statically pins junos_netconf to cli transport
* all other modules use netconf transport
* adds command rpc function to junos shared
8 years ago
Peter Sprygada 1825406e1e Junos fixes (#22423)
* Fixes for junos_config errors

* Check transport settings for core Junos

* Don't pop from the same list you iterate over

* use of persistent connections are now explicitly enabled in junos

* modules must now explicitly enable persistent connections
* adds rpc support to junos_command

fixes #22166
8 years ago
Peter Sprygada 17fc6832ca fixes mapping nxapi arguments for nxos action plugin (#22491)
The nxos action plugin does not properly map task arguments when using
provider.  This patch will fix the problem and properly map the
arguments
8 years ago
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
8 years ago
Pierre Templier ea0bae6bca Typo + rephrase (#22526) 8 years ago
THEBAULT Julien 374d491ba5 Check if file is not a directory with get_bin_path function (#13985) 8 years ago
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
8 years ago
Brian Coca 7ad6ce7ea1 moved network module magic from hardcoded to conf 8 years ago
Brian Coca 2d9bf88897 deal with other 'ungrouped' corner cases 8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Tim Rupp 32146acf4e Actual attributes were being created and messing with the modules (#22424) 8 years ago
Brian Coca 78e116077a readd all.add_host as for loop uses diff data 8 years ago
Nicolas Braud-Santoni f689cca0b8 vault: Uniformize construction of cipher objects 8 years ago
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.
8 years ago
Brian Coca 385f1d82dc ensure all hosts in all
fixes #20252
8 years ago
Matt Clay 0b250016b0 Fix PEP 8 issue. 8 years ago
René Moser 6f426b9d06 cloudstack: cs_vpc: fix vpc in projects not found (#22416) 8 years ago
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
8 years ago
Hao 96a19a4521 iptables module: match=conntrack with ctstate not working (#21976) 8 years ago
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
8 years ago
Dag Wieers 770ab76ed0 win_region: Small changes to Add-AnsibleParam and docs (#22310) 8 years ago
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
8 years ago
René Moser 7f35220744 cloudstack: cs_firewall: fix pep8 and typo s/endpoint/endport/ (#22406) 8 years ago
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
8 years ago
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
8 years ago
Tim Rupp a8910e78ca Using the wrong variable (#22386) 8 years ago
Tim Rupp 3c69cf6d7d Moved exception handler in a little bit (#22376)
It wasn't being caught in the previous indentation
8 years ago
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)
8 years ago
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
8 years ago
René Moser e0d38fb137 composer: fix escape working_dir (#22363)
* composer: fix escaping of path working_dir

* composer: fix pep8
8 years ago
Brian Coca c71b15a696 Bad extra early (#22322)
* catch bad extra vars data earlier

* incoporated @alkins feedback
8 years ago
Toshio Kuratomi 1ea3313c90 Document synchronize limitations around become and connections (#22373)
* Document synchronize limitations around become and connections
8 years ago
Brian Coca c4cff44e77 fix 'ungrouped' issue with some inventory formats 8 years ago
Brian Coca 20bf02f6b9 rename return var to avoid conflicts
fixes #22323
8 years ago
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
8 years ago
Kamil Cholewiński ec9582fd83 Fix invocations of module.fail_json with no msg=
Bonus: add missing % in cs_nic.py
8 years ago
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.
8 years ago
Chris Alfonso 25827c85d2 Fixing issue #22193 - authorize argument is not deprecated for 2.3 for ios and eos (#22326) 8 years ago
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
8 years ago
Andrea Giardini 863c1ff38b Ec2_tag support for check mode (#21779) 8 years ago
John R Barker 8531547ec2 Correct `module:`, it should match filename (#22296)
* Validate module: matches filename

* remove testcase

* Revert module validation, move to different PR
8 years ago
Tim Rupp c2180888f7 I think for now I'll just not use dunder setter (#22336) 8 years ago
Ricardo Carrillo Cruz 5357a67607 Remove 'update' param from documentation examples (#22350)
The 'update' param is no longer supported, thus removing from docs.
8 years ago
Ryan Brown f0491b4261 [cloud] Fix ZeroDivisionError in ec2_elb_facts module (#22332) 8 years ago
Tim Rupp 6ff9bd0a33 Fixes baseclass for new f5 modules (#22333) 8 years ago
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
8 years ago
JimFicarra 2206b5e900 Fix Issue #20553 #15737 - merge with reg functionality #19443 (#20555) 8 years ago
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.
8 years ago
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.
8 years ago
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)
8 years ago
Brian Coca 516d61f1ae simplified if 8 years ago
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
8 years ago
Michał Masłowski 228131d1cd lambda: Fix adding environment variables to functions previously not having any (#22313) 8 years ago
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
8 years ago
John R Barker aa3fbb0d54 Restore extends_documentation_fragment: nxos (#22312)
* Restore extends_documentation_fragment: nxos

* Restore extends_documentation_fragment: nxos
8 years ago
Angus Williams 9be30f2eca Fixes idempotency issue when upgrading chocolatey packages (#21476) 8 years ago
Dhivyap 89cf8d83e4 dellos* modules- Documentation Update (#22306) 8 years ago
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.
8 years ago
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
8 years ago
John R Barker 3afb67e9b2 Fix Docs build issues (#22295)
* restore network docs fragments

* Fix RST errors

* code-block formatting
8 years ago
John R Barker 0775d39a87 Add extends_documentation_fragment back (#22293) 8 years ago
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.`
8 years ago
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.
8 years ago
Adrian Likins 694c57de2e add python version info to --version (#22089)
* add python info to ansible --version
* Add unit tests for cli.CLI.version
8 years ago
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
8 years ago
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>
8 years ago
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
8 years ago
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
8 years ago
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.
8 years ago
Brian Coca f53921093f respond with correct vaulting suggestion
fixes #22247
8 years ago
Viktor Fogelberg b9ed3454e4 Change comment to reflect the actual code 8 years ago
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
8 years ago
Artem Zinenko 7decd10c76 Fixes #22136 (#22137) 8 years ago
Peter Sprygada 6c8025ce5c adds eos_system integration tests (#22214)
* adds integration test cases
* updates eos_system with minor bug fixes
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Dag Wieers 237411613d Ensure that filenames from archives are not expanded
This fixes #21795
8 years ago
Brian Coca 7966beb6c9 minor fixes to apt
fixes #22124
8 years ago
John R Barker 456b4ace7b Move cnos_backup. to correct dir (#22207) 8 years ago