Commit Graph

20 Commits (8d733dbdf0eb7bbda5f3a783e893d71a3a35a646)

Author SHA1 Message Date
Brian Coca bbd6b8bb42 Temporary (#31677)
* allow shells to have per host options, remote_tmp

added language to shell
removed module lang setting from general as  plugins have it now
use get to avoid bad powershell plugin
more resilient tmp discovery, fall back to `pwd`
add shell to docs
fixed options for when frags are only options
added shell set ops in t_e and fixed option frags
normalize tmp dir usag4e

- pass tmpdir/tmp/temp options as env var to commands, making it default for tempfile
- adjusted ansiballz tmpdir
- default local tempfile usage to the configured local tmp
- set env temp in action

add options to powershell
shift temporary to internal envvar/params
ensure tempdir is set if we pass var
ensure basic and url use expected tempdir
ensure localhost uses local tmp
give /var/tmp priority, less perms issues
more consistent tempfile mgmt for ansiballz
made async_dir configurable
better action handling, allow for finally rm tmp
fixed tmp issue and no more tempdir in ballz
hostvarize world readable and admin users
always set shell tempdir
added comment to discourage use of exception/flow control

* Mostly revert expand_user as it's not quite working.

This was an additional feature anyhow.

Kept the use of pwd as a fallback but moved it to a second ssh
connection.  This is not optimal but getting that to work in a single
ssh connection was part of the problem holding this up.

(cherry picked from commit 395b714120522f15e4c90a346f5e8e8d79213aca)

* fixed script and other action plugins

ensure tmpdir deletion
allow for connections that don't support new options (legacy, 3rd party)
fixed tests
7 years ago
Matt Martz 19ab882790
Fix inconsitencies between code assumptions and schema (#34901)
* Fix inconsitencies between code assumptions and schema

* Address a couple of RETURN issues, where the description was parsed as a dict
7 years ago
jctanner b10d5f34ea Extend validate-modules to check the next to last line (#34819)
* Add validation for the next to last line of a module

* Fix last error code

* Reduce to a single conditional

* Fix conditionals

* Move the final warnings statement to main() in mysql_replication
7 years ago
Matt Martz dcc05093db Validate modules arg spec fixes (#34477)
* Update validate-modules arg_spec introspection to be faster, by only mocking the imports we explicitly list
* The use of types.MethodType in redhat_subscription wasn't py3 compatible, use partial instead
* Remove argument_spec import hacks, make them errors, we can ignore them with ansible-test
* Enable the --arg-spec flag for validate-modules
7 years ago
Matt Clay 513e0547b9 Fix version_added validation when empty. 7 years ago
Abhijeet Kasurde 2b6af10982 Misc. fix for typo (#34262)
Changed 'assginment' to 'assignment'

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Will Thames 5f29cd5e60 Add validation test for new copyright (#32919)
* Update validation test for new copyright

Ensure new modules without the new copyright header fail
validation
Ensure existing modules without copyright in top 20 lines fail

* Add documentation of 108 error

Create label in developing modules documentation so that
the validation page can point to it

* Ensure new style copyright header passes test!
7 years ago
Matt Clay 90ac38bd4c Fix module validator handling of empty options. 7 years ago
Matt Clay e45c763b64 Fix invalid string escape sequences. 7 years ago
Matt Clay cf1337ca9a Update ansible-test sanity command. (#31958)
* Use correct pip version in ansible-test.
* Add git fallback for validate-modules.
* Run sanity tests in a docker container.
* Use correct python version for sanity tests.
* Pin docker completion images and add default.
* Split pylint execution into multiple contexts.
* Only test .py files in use-argspec-type-path test.
* Accept identical python interpeter name or binary.
* Switch cloud tests to default container.
* Remove unused extras from pip install.
* Filter out empty pip commands.
* Don't force running of pip list.
* Support delegation for windows and network tests.
* Fix ansible-test python version usage.
* Fix ansible-test python version skipping.
* Use absolute path for log in ansible-test.
* Run vyos_command test on python 3.
* Fix windows/network instance persistence.
* Add `test/cache` dir to classification.
* Enable more python versions for network tests.
* Fix cs_router test.
7 years ago
Matt Davis 0c34cdd0f7 fix #Requires to be valid in real Powershell (#31858)
* module_utils #Requires should not have .psm1 extension if "real" Powershell will ever execute them
* updated validate-modules to enforce this
* added check to disallow multi-module syntax on Ansible.ModuleUtils #Requires
7 years ago
Matt Clay f012c94fa5 Handle bad options syntax in validate-modules. 7 years ago
John R Barker bc2f4365b5 Correctly validate module name for modules with aliases (#29957)
* Correctly validate module name for modules with aliases

If a module has an alias (ie is a symlink) then we need to ensure that
DOCUMENTATION.module is set to the main name, not the aliased name

* formatting
7 years ago
Toshio Kuratomi af2073d057 metadata 1.1
* Add network value to support_by field.
* New support_by value, certified
* Deprecate curated in favor of certified
* Add conversion from 1.0 to 1.1 to metadata-tool
* Add supported by Red Hat field to ansible-doc output
7 years ago
Jordan Borean 8bb10bb225 removed requirements on WANT_JSON and POWERSHELL_COMMON (#27679) 7 years ago
Toshio Kuratomi 6f69cd4501 Add code to allow from __future__ in docs-only modules 7 years ago
Toshio Kuratomi 3a2670e0fd Allow specific __future__ imports in modules
We do want to allow certain from __future__ imports in modules that make
it easier to code compatible python2 and python3.  Note that
unicode_literals is specifically left out and should never be allowed.
Now that python-3.4+ allows u"" there's no good reason to use
unicode_literals.

Also switch tables in the validate_modules documentation to simple table format
7 years ago
Matt Clay 75a3ac5ca5 Fix test for missing __init__.py for modules. 7 years ago
Matt Martz cb704a4310 If there are no DOCs provided at all, don't traceback, skip the _ensure_imports_below_docs test (#25621) 7 years ago
Matt Martz e86b00b917 Make validate-modules a .py file, and symlink back to validate-modules (#25227)
* Make validate-modules a .py file, and symlink back to validate-modules

* Set prog for argparse in valdiate-modules
7 years ago