* Add a banner which will display on the testing site.
Thanks to shane for the javascript code
* change to more noticable color
Co-authored-by: Sandra McCann <samccann@redhat.com>
* Fix netconf plugin related to collections
Fixes#65655 (partly)
* Make netconf plugins configurable so that the
information of ncclient device handler
for give platform resides in the platform
specific netconf plugin.
* If the device handler value in ncclient is
different from the ansible_network_os value
the right value of `ncclient_device_handler`
should be set in the plugin documentation.
* Fix review comments
* Fix CI issue
* Fix review comment
When an ansible module, e.g., command, does not support check mode, you can use "check_mode: no" in that task to execute the task in normal mode, even when "--check" flag is used. The current document basically says, use "check_mode: no" to run in check mode, which is confusing and inaccurate.
* win_find - refactor to make more performance and use newer style
* win_find - refactor for performance improvements and alignment to find
* More path alignment to find
* Fix yamllint error
* Mention that Python keywords are invalid Ansible variable names
Using a Python keyword as a variable name triggers the error `Invalid variable name in 'register' specified: 'return'`.
* Inventory CLI - Ignore settings for when vars plugins should run and just always run them
* Add note to porting guide
* Fix loading vars plugins
* changelog
* Remove a staging test for ansible-inventory since it ignores that setting
* iam_user: use AnsibleAWSModule.client to fetch connection rather than C&P code
* iam_role: Add deprecation warning so we can switch purge_polices default behaviour from true to false
* iam_user/role/group: Rename 'managed_policy' and 'purge_policy'
Rename from singluar to plural (we accept a *list* of policies), and add aliases for the old values.
* Cleanup documentation
* Changelog
* reworked iam_policy
* Deprecate policy_document option
* deprecate defaulting skip_duplicates to true
* No longer explicitly catch ParamValidationError.
ParamValidationErrror is already caught by ClientError
* Work with complex policy objects rather than json documents
comparisons can better cope with the special cases (eg True vs "True" )
* Enable check_mode tests and fix related 'changed' bug
* changelog
* doc cleanup based on review
* Update cache plugin documentation since all cache plugins shipped with Ansible can be used for caching inventory since 2.8
* Update docs/docsite/rst/plugins/cache.rst
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
Co-Authored-By: John R Barker <john@johnrbarker.com>
* Add ldap_attrs module
* Fix codesyle error
* Apply deprecation rules
* Add support for X-ORDERED extension in ldap_attrs
The 'X-ORDERED' LDAP extension allows definition of ordered LDAP object
attributes. This extension is used in OpenLDAP "cn=config" database to
support ordered configuration options.
Specification: https://tools.ietf.org/html/draft-chu-ldap-xordered-00
* Update ldap_attr deprecation notice
* Documentation improvements based on suggestions
* Remove redundant dots from documentation
* Correct 'insertations' to 'insertions'
* Remove insecure 'params' option
* Fix sanity ignore errors
* Improve module documentation
* Change example value from string to list
* Fix support for "" values
* Restore module vmware_dns_config
* Remove domainname and change_hostname_to
* Changed version_added from 2.10 to '2.10'
* Add setup_attach_host: true to test case
* Add 'vcsim is not defined' block to integration tests
* Change 'result' to 'dns_config_result'
* Bugfix: Changing some static configurations while keeping others can crash the module
* Implement changing DNS config from DHCP to static on a cluster
* Update documentation for vmware_host_dns
* vmware_host_dns integration tests: Always revert to original DNS configuration, even if a test fails
* Deprecate vmware_dns_config
Use the --venv option instead.
This option was only available when running from source to test the ansible/ansible repository.
This will have no effect on testing collections or running from an installed version of Ansible.
Also update docs to reference the --venv option instead of the --tox option.
* Add advice how to prevent jinja2 warning
##### SUMMARY
This addition helps users to demonstrate how to prevent `[WARNING]: when statements should not include jinja2 templating delimiters`.
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
* Update playbooks_tests.rst
* Update playbooks_tests.rst
Refer to the advised FAQ about when to use `{{ }}`.
While deleting gitlab user, several parameters such as email, name,
password are not required. This fix removes this requirement from the
module.
Fixes: #61921
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* ipaddr: add an option to return peer of a point-to-point link
Signed-off-by: Vincent Bernat <vincent@bernat.ch>
* ipaddr: extend "peer" to also work with /30
* ec2_ boilerplate
* Deprecate unused options.
* ec2_vol: Perform explicit type checking on volume_size and iops when parsing the args
Boto would through a type exception if the string couldn't be converted to an int.
* ec2_lc_find: remove duplicate definition of region
It's defined in ec2_argument_spec and ec2 doc fragment
* ec2_lc_info: Move responsibility for type checking/conversion of sort_start and sort_end into arg parser
* General sanity test related doc fixups
* Remove EC2 related sanity/ignore.txt entries
* Add changelog fragment
* Move var plugins handling to a separate file
* Allow var plugins to require whitelisting
* Add global configuration ('demand', 'start') for users to control when they execute
* Add 'stage' configuration ('all', 'task', 'inventory') for users to control on a per-plugin basis when they execute
* Update ansible-inventory and InventoryManager to the global and stage configuration
* Update host_group_vars to use stage configuration and whitelisting
* Add documentation for using new options and to the developer's guide
* Add integration tests to exercise whitelisting and the new configuration options, using vars plugins in collections, and maintain backward compatibility
* Changelog
Co-Authored-By: Brian Coca <brian.coca+git@gmail.com>
Co-Authored-By: Sandra McCann <samccann@redhat.com>
* Remove Sanity test ignore.txt entries
* Fixup boilerplate
* Remove use of blacklisted _ variable name
* cloudformation: Add an explicit removal version for template_format
This option's been ignored since ansible 2.3
* General docs cleanup to clear sanity errors
* elasticache_parameter_group: Add list of choices
- matches documented choices
- other values wouldn't have worked
* data_pipeline: Deprecate 'version' - always ignored
* Add deprecation documentation
Let the caller choose a namespace for `to_uuid` and document the
behaviour of both the default case, and the new explicit case.
This PR does not change the existing behaviour of the `to_uuid` UUIDv5
filter.
* Make docker_stack adhere to standard return values
The names of the various fields returned from ansible modules are e.g defined here https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#msg.
Adhering to this improves usability and makes use of functionality for e.g stdout_lines etc.
* Update lib/ansible/modules/cloud/docker/docker_stack.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Fix under-indentation of continuation line (pep8)
Issue exposed in test here https://app.shippable.com/github/ansible/ansible/runs/146667/1/console
* Don't break old playbooks/roles
Made sure the changes are only adding new variables, not removing anything existing yet.
* Added comment
* Minor fixes
* Update lib/ansible/modules/cloud/docker/docker_stack.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Update lib/ansible/modules/cloud/docker/docker_stack.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* minor change to docker_stack.py
* Add changelog fragment for PR 63467
* Format changelog fragment
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Add fragment about docker_stack return val depr
* Add docker_stack doc note about deprecated vals
* Remove whitespace in empty line
* Add docker_stack depr notice to porting guide
* Update changelogs/fragments/63467-docker-stack-return-fix.yml
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Update lib/ansible/modules/cloud/docker/docker_stack.py
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Added back a missing new line
* Fix validate-modules support for collections.
- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.
* Remove obsolete validate-modules code ignores.
* Handle sys.exit in validate-modules.
* Add check for AnsibleModule initialization.
* Remove `missing-module-utils-import` check.
This check does not support relative imports or collections.
Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.
* Fix badly named error codes with `c#` in the name.
The `#` conflicts with comments in the sanity test ignore files.
* Add changelog entries.
##### SUMMARY
The example code to configure TLS 1.2 Support using Ansible had an indention error. The register variable 'enable_tls12' was not indented. This caused the subsequent task to fail since the variable was not registered.
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
* Deprecate openssl_csr's version.
* Add changelog.
* Change PR so that version will no longer accept values != 1 from 2.14 on.
* Make sure it is a string.
* By requiring a slightly newer Vagrant version (from 2015) we get the
same generated Ansible inventory format is still used by today's
version of Vagrant. That extended inventory format also has the
benefit of allowing for simpler Ansible examples.
* Switching to a current and supported Ubuntu LTS version.
* Add examples for various inventory setups to the documentation. This closes#12480.
* Update docs/docsite/rst/user_guide/intro_inventory.rst
Co-Authored-By: Sandra McCann <samccann@redhat.com>
* Update docs/docsite/rst/user_guide/intro_inventory.rst
Co-Authored-By: Sandra McCann <samccann@redhat.com>
* Update wording in inventory examples
Co-Authored-By: Sandra McCann <samccann@redhat.com>
* Update wording in inventory examples
Co-Authored-By: Sandra McCann <samccann@redhat.com>
* Use code-block and rename groups in inventory setup examples
* Fix group name in inventory setup example
Co-Authored-By: Sandra McCann <samccann@redhat.com>
Following module used internal results key as part of return json, this commit
changes this to appropriate values -
* vmware_datastore_maintenancemode.py
* vmware_host_kernel_manager.py
* vmware_host_ntp.py
* vmware_host_service_manager.py
* vmware_tag.py
Fixes: #62083
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Add a list of previously used release names to make it easy to tell what
release names are no longer usable.
Add a test that new release names have been added to the used list.
Fixes#61616
* Add caution about handlers & import to Pitfalls on the playbooks_reuse page.
The fact that handlers lose their name: when using import_tasks:, while logical, is not intuitive and should be noted.
Co-Authored-By: Sandra McCann <samccann@redhat.com>
* Cleanups and version bumping for 2.10
* Fix changelog url now that stable has been branched
* Fix the lenth of the porting guide title now that the version is two digits
* play, block, task: New attribute forks
With this it is possible to limit the number of concurrent task runs.
forks can now be used in play, block and task. If forks is set in different
levels in the chain, then the smallest value will be used for the task.
The attribute has been added to the Base class as a list to easily provide
all the values that have been set in the different levels of the chain.
A warning has been added because of the conflict with run_once. forks will
be ignored in this case.
The forks limitation in StrategyBase._queue_task is not used for the free
strategy.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
* Handle forks in free strategy
The forks attribute for the free strategy is handled in run in the free
StrategyModule. This is dony by counting the amount of tasks where the uuid
is the same as the current task, that should be queued next. If this amount
is bigger or equal to the forks attribute from the chain (task, block,
play), then it will be skipped to the next host. Like it is also done with
blocked_hosts.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
* Test cases for forks with linear and free strategy
With ansible_python_interpreter defined in inventory file using
ansible_playbook_python.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
* Changing forks keyword to throttle and adding some more docs
* update theme.conf, header, footer, etc.
* clean up layout.html
* move large Ansible changes out of theme.css
* maxify theme to help merge
* remove redundancies, fix top nav bar
* add Ansible color to header and left-nav menu
* Change collection PS util import pattern
* Add changes for py2 compat
* fix up regex and doc errors
* fix up import analysis
* Sanity fix for 2.6 CI workers
* Get collection util path for coverage collection
* remove support from Windows pages, add Windows Server 2019
* jborean feedback
* Removed CBT info
Removed the CBT note about what transports Ansible actually supports. We've worked with both NTLM and Kerberos for a while now.
* Rename OneView _facts modules -> _info
* Adjust PR #.
* Forgot to update test names.
* Remove superfluous blank line.
* Some more things from review.
* Renaming `onepassword_facts` to `onepassword_info`.
* Update module examples.
* Add changelog fragment.
* Add module rename to the 2.9 porting guide.
* Document the parameter types in the module docs.
* Fix incorrect parameter name.
* Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Remove `onepassword_facts` as it has been renamed to `onepassword_info` including fixes for the sanity tests.
* Add support for SubjectKeyIdentifier and AuthorityKeyIdentifier to _info modules.
* Adding SubjectKeyIdentifier and AuthorityKeyIdentifier support to openssl_certificate and openssl_csr.
* Fix type of authority_cert_issuer.
* Add basic tests.
* Add changelog.
* Added proper tests for _info modules.
* Fix docs bug.
* Make sure new features are only used when cryptography backend for openssl_csr is available.
* Work around jinja2 being too old on some CI hosts.
* Add tests for openssl_csr.
* Add openssl_certificate tests.
* Fix idempotence test.
* Move one level up.
* Add ownca_create_authority_key_identifier option.
* Add ownca_create_authority_key_identifier option.
* Add idempotency check.
* Apparently the function call expected different args for cryptography < 2.7.
* Fix copy'n'paste errors and typos.
* string -> general name.
* Add disclaimer.
* Implement always_create / create_if_not_provided / never_create for openssl_certificate.
* Update changelog and porting guide.
* Add comments for defaults.
* Rename hcloud_datacenter_facts to hcloud_datacenter_info
* Rename hcloud_location_facts to hcloud_location_info
* Rename hcloud_image_facts to hcloud_image_info
* Rename hcloud_floating_ip_facts to hcloud_floating_ip_info
* Rename hcloud_server_type_facts to hcloud_server_type_info
* Rename hcloud_server_facts to hcloud_server_info
* Rename hcloud_ssh_key_facts to hcloud_ssh_key_info
* Rename hcloud_volume_facts to hcloud_volume_info
* Fix typo in hcloud_image_info
* Add to porting guide and add changelog fragment
* Reword porting guide
* Install ansible-test
Modify the install script to install ansible-test and its supporting
code. Alternative to #60701 that doesn't change package_dir ansible for
fear that it might regress https://github.com/ansible/ansible/issues/10437
Also:
* No longer use package_data. Everything in the package dirs is going
to be installed. Anything that shouldn't be installed needs to be
moved elsewhere.
* modify the algorithm to store symlinks which are in the same tree
instead of same directory
* Add ansible_test files to package-data sanity test
* MANIFEST.in cleanups
* Add lib/ansible/config/*.yml
* Make most things in code directories (lib/ansible and test/lib/ansible_test/)
use explicit file extensions instead of wildcards for maintainability
* Exclude common file extensions that we don't want included in the code
directories
* Change package-data test to be more complete
* Now compares the repository, sdist, and install
* Compares both that everything in the sdist is in the repo and
everything in the install is in the sdist in addition to comparing that
everything in the repo that we want is in the install
* Leave out test artifacts
Only include the directory structure for test/results and test/cache not
any files that may have been generated by test runs
Remove test/utils files from the sdist as these are only needed for our CI
cleanup of docs in MANIFEST.in; getting rid of build files.
* Add the ability to output sdist and snapshot to specific directory
* Add a warning about modifying the heuristic to setup.py
* Address generated files
* Use make snapshot instead of sdist to generate changelog and man pages
and make sure they're included
* Ignore both the test/utils and generated test files (results, cache)
* Deal with Python3 __pycache__ byte code caches
* Don't check documentation, that isn't built for the sdist
* Restructure for clarity
* Add cli web docs to make clean
This was causing problems when attempting to test that the sdist didn't
have extra files
* Fix bug constructing python names from __pycache__ names
* Create a clean repo to work from
* Exclude test/legacy and be more explicit on extensions
* Exclude the legacy directory from sdist
* ansible-galaxy: support multiple servers on install
* Added docs for the server configuration file
* Fix up doc string for requirements file format
* Fix bugs after testing
* Fix kwarg doc and added version
* Fix typo and doc improvement
* Fix base64 encoding and allow --server to override list
* Add support for configurable terminal plugin options
Fixes#59404
* Add terminal options to support platform specific login menu
* Add terminal options to support configurable options for stdout
and stderr regex list
* Fix CI failures
* Fix CI issues
* Fix review comments and add integration test
* Fix sanity test failures
* Fix review comments
* Fix integration test case
* Fix integration test failure
* Add support to configure terminal related options
Fixes https://github.com/ansible/ansible/issues/59404
* Add network_cli configurable options to support platform specific login menu
* Add network_cli configurable options to support configurable options for stdout
and stderr regex list
* Fix review comment
* Fix review comment
* Change formatting of the network/user_guide tables
* Tables had hardcoded line breaks to workaround a bug in the
read-the-docs theme. Change those so that they now flow according to
the browser size.
* Also switch away from grid tables to the simpler to create and read
simple tables
* Changes to table stylesheet
* valign all content, not just the first column. This becomes important
with more than two columns
* Set the font-weight to the first <p> element inside of the first
column. This allows us to simplify the first column when everything
there is the attribute name
* Change platform_index footnote from numbered to dagger symbol
The footnote notation was very odd to read. Try using a symbol for the
footnote instead of a number to see if that will clarify it. We can't
manually specify symbolled footnotes, though, so we have to emulate a
footnote with an internal link. This loses the backref to each place
that the footnote was used but since that was the portion which was hard
to read, perhaps that's for the best.
* Use an rst table instead of a raw html table
* Rst is easier to read so we want to use it wherever possible
* Fix the jinja2 filters which create links so that they do not include
extraneous whitespace in the URL
* Normalize description data before sending them to the templates
* Add writing new tests subsection to vmware_guidelines
Specifically address use of the prepare_vmware_tests role
Point to common vars for use by test writers
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
This will help prevent accidental merging of content to recently obsoleted directories when adding new files.
It may also help contributors who have modified obsolete files understand where their changes should now be made.
* Some framework for docs
* Separate CSS file for our site-specific CSS.
* Override the read-the-docs theme for tables so that tables don't
always horizontally scroll
* Add a |br| substitution that lets us line break inside of tables
* Add |_| non-breaking-space substitution which is also for formatting
tables
* Configure rstcheck to ignore all substitutions which are being added
by sphinx in the conf.py
* Fix table of auto interpreter options
The table was being hardcoded at a certain width to work around a
read-the-docs theme bug. Fix the bug instead and format the table using
better sphinx practices.
* Remove unused substitutions
We had substitutions defined that were never used in our documentation.
Remove those.
Also add to the rstcheck whitelist three substitutions which are defined
by sphinx itself, version, release, and today.
* Relocate module validator code and tests.
* Fix validate-modules entry point and imports.
* Fix paths and test entry points.
* Fix up unit tests.
* Fix shebang and execute bit.
* Relocate ansible-only sanity tests.
* Get "code smell" sanity tests from multiple dirs.
- `test/lib/ansible_test/_data/sanity/code-smell/` - General purpose tests used for both Ansible and Ansible Collections.
- `test/sanity/code-smell/` - Tests specific to Ansible, will not be used for Ansible Collections.
* Try to clarify the wording
People were confused by this paragraph. They read it as Ansible won't
auto-detect the python interpreter until 2.12. Tried to reword it so
that they'll see that Ansible will auto-detect it currently if
/usr/bin/python is not present and in the future will always autodetect.
* Format the other instances of /usr/bin/python using :command:
Refactor vmware_cluster into several modules (vmware_cluster, vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan) as discussed in #58023.
vmware_cluster lacks a lot of configuration options for DRS, HA and vSAN. Implementing them
all in vmware_cluster would make the module hard to maintain. Therefore, splitting it into several
modules and implementing the missing configuration options in them seems a good idea to me.
This is step one, refactoring vmware_cluster into several modules. Step two, implementing more
configuration options for DRS, HA and vSAN, will follow.
* Render elements in module doc and sanity test for suboptions
* Add support to render module elements value in ansible-doc output
module html
* Add validate-module sanity test of sunoptions.
* Add current validate module failures to ignore list
* Fix CI failure
* fix rebase conflict
* Fix CI issues
* Fix review comments
* Add validate-modules failure in ignore list
- Use predictable VM name during the tests (test_vm1, test_vm2 and
test_vm2). This to simplify the teardown of the newly created resource
before the next test.
- Update the documentation to explain the new requirement
- Avoid VM creation with `with_items` when it's not mandatory. This to:
- speed up the test execution, our hypervisors have limited resources
- simplify the teardown
- Remove `create_d1_c1_f0_env.yml`, the test was just testing how Ansible
pass environment variables.
- Correct the name for the `f0` variable (`f1`)
- Fix the DVS tests, the hosts can now reach the dvswitch1 vswitch
- Provision the VM with a poweroff status, this to improve the
idempotency and sleep up the tests
- Avoid the use of `prepare_vmware_tests` to prepare virtual machines
when we just need one machine
* Add sanity test to ensure all non-py files are installed
* Fix mode and regex
* Fix role skel inventory package_data
* Add docs
* Update package_data for inventory files
* Address pylint concerns
* Another tweak to package_data
* Address review feedback
* Change index to 1
* add to ansible-only.txt
* Generate galaxy.yml based on single source of truth
* Fix up tests and align file names
* Minor Makefile tweak
* Remove link in galaxy.yml file and make it a template file
* Moved collections docs to dev_guide
* change Makefile clean path
* Added readme to example meta file
* review fixes
* Use newer style for doc generation script
* Fix mistake in dev_guide index
* removed uneeded file, fixed links and added preview banner
* Moved banner for sanity test
* Windows - Add common util for web requests
* Use different method of retrieving options from module arg spec
* Added proper version_added for module options
* Fix linting errors
* Fix proxy issues and updated cred docs
* Fix FTP usage with proxy settings
* Removed uneeded function added in bad rebase
* Fix up client certificate auth
* fix new sanity checks
* Edit http agent code and update porting guide
* Added support to create/delete mulitiple databases in MySQL
Fixes: #58370
* Added additional tests cases and fixed documentation changes
* Code refactoring and added tests for better test coverage
- Removed db_exists usage from most of the code. Used existence_list
and non_existence_list instead
- Added additional tests to cover all scenarios w.r.t creation and deletion
on multiple databases
- Added tests for dump operations
* Minor fix
* Minor fix - create check mode test
* Added dump tests for better dump tests coverage
* Removed minor database connection details
* fixed error
* Added test case for import operations
* Code refactoring and review fixes
- Added dump all test case
* Fixed review comments
* Minor review comment fixes
* Altered db_create return value
* Removed db_list and altered "does exist" to just "exist"
* Kept db and db_list in module.exit_json
* Refactored tests
- Added removal of dump2 file
* Moved import tests to state_dump_import file
* Removed import tests from multi_db_create_delete
* Updated porting guide, added RETURN block
* Minor identation fix
* Added validation to check if databases are dumped
* Fix dump_keywords to require attribute docs
* Change the documentation commands to make definition files positional
Since the definition files are mandatory, make them positional
parameters instead of options.
We have some common code used by several docs scripts. Migrate that
into the build-only shared code repository.
* Move lib/ansible/utils/_build_helpers.py to the directory for common
build code
* Migrate docs/bin/dump_config.py to a build-ansible subcommand
* Migrate dump_keywords to the build-ansible framework
* Make the script more maintainable by using functions and good
variable names
* Port to Python3 idioms
* Fix bug so that private attributes will be undocumented
* Move generate_man to a build-ansible subcommand
* Port plugin_formatter to a build-ansible subcommand
* Rework command_plugins so that docs scripts can target Python-3.4+ and
releng-only subcommands can use more recent versions of Python.
The architecture is now that command_plugins/* need to be importable
on Python-3.4. The init_parsers() method needs to run on Python-3.4.
But the main() method can utilize features of more recent Python as
long as it fits within those parameters.
* Update docs build requirements
Port the plugin_formatter to build-ansible framework
ansible-test only passes files which have the .py suffix for sanity
tests on python files. This change will allow sanity tests to run on
the Python files in hacking/
* Rename test-module to test-module.py
* Symlink test-module for backwards compat since end users may be using
test-module
* Fix test-module sanity errors that are now triggered
* Rename ansible_profile to ansible-profile.py
* Rename build-ansible
The metaclass boilerplate is safe to apply en masse. The future import
boilerplate needs code to be inspected to be sure that there aren't any
py2isms that need to be fixed. Split these two checks so that we can
fix them independently
Be explicit about which files are grandfathered so we can fix them up one by one
VMware specific documentation that explains:
- how to run the functional tests
- and the conventions.
- clarify the difference between govcsim and vcsim
Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
* Fix notifying handlers by using an exact match rather than a string subset if listen is text rather than a list
* Enforce better type checking for listeners
* Share code for validating handler listeners
* Add test for handlers without names
* Add test for templating in handlers
* Add test for include_role
* Add a couple notes about 'listen' for handlers
* changelog
* Add a test for handlers without names
* Test templating in handlers
* changelog
* Add some tests for include_role
* Add a couple notes about 'listen' for handlers
* make more sense
* move local function into a class method
* Update playbooks_strategies.rst
##### SUMMARY
This page is very confusing and may suggest, that there is still a `serial` strategy (like it used to), but now it is just a directive of `linear` strategy. Multiple people reported this to me and it needs change.
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
* Update docs/docsite/rst/user_guide/playbooks_strategies.rst
Co-Authored-By: Sam Doran <sdoran@redhat.com>
* Update docs/docsite/rst/user_guide/playbooks_strategies.rst
Co-Authored-By: Sam Doran <sdoran@redhat.com>
* Updates strategies page more broadly
* incorporate samdoran feedback
* fixes broken link
* new page title, focus on user intent
* more sdoran feedback
* adds details on setting the number of forks
* Remove lexers which have been fixed in Pygments 2.4.0.
* Add Pygments >= 2.4.0 to test runner.
* Fix pages that triggered lexer errors.
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* Updated the section under "Aborting the play"
Updated "Aborting the play" section in the Error Handling In Playbooks page. Removed the reference to marking all hosts as failed.
+label: docsite_pr
* Update docs/docsite/rst/user_guide/playbooks_error_handling.rst
Co-Authored-By: Sandra McCann <samccann@redhat.com>
Ansible galaxy role download checked for `.tar.gz`, but `tarfile.is_tarfile(...)` can identify and open any valid tarfile. This change uses transparent stream compression to make `.tar.gz` and `.tar.bz2` formats valid with python 2.6.x/2.7.x (as well as `.tar.xz` with python 3.x).
* Add a few examples of how to correctly use `regex_replace` filter
because it behaves differently on different Python versions when using
regex qualifiers that can match an empty string (e.g. '*', '?', etc).
Often when I am helping others learn Ansible, they are using nodes spun up on Amazon/Google/etc. where private key files (pem) are needed. Mentioning just a bit more on how to handle those private key files on the intro_getting_started page will help more folks get started faster.
I even reviewed the changes with my learning team and they all agreed this helped clarify immediately for them how to really get started with Ansible from a practical perspective.
* Make datacenter as alias and optional
* Add folder param to place datastore cluster in specific folder
* Updated examples
* Updated tests
Fixes: #48010
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Clarify that GPLv3+ module_utils need core team approval.
* Update docs/docsite/rst/dev_guide/shared_snippets/licensing.txt
Co-Authored-By: Sam Doran <sdoran@redhat.com>
* More 'module_util' -> 'file in module_utils'.
* Moves developer docs for AWS, ovirt, and openstack modules out of lib/ansible/, integrates them with dev_guide, with abadger's fix to make python snippets pass rstcheck
* Document the clarifications that I usually remark when doing reviews
* Update docs/docsite/rst/dev_guide/developing_modules_documenting.rst
Co-Authored-By: dagwieers <dag@wieers.com>
* Update docs for the 2.7 change to AnsiballZ which invokes modules with one
less Python interpreter
* Add a section on how module results are returned and on trust between modules, action plugins, and the executor.
* Update docs/docsite/rst/dev_guide/developing_program_flow_modules.rst
Co-Authored-By: abadger <a.badger@gmail.com>
Clarify the documentation for `async` and `poll`; describe the behavior when `poll` = 0 and when it does not.
* Update docs/docsite/rst/user_guide/playbooks_async.rst
* Update the default poll value in async doc
Co-Authored-By: tacatac <taca@kadisius.eu>
updates docs/docsite/rst/user_guide/vault.rst
* Add reference to single variable vault encryption
* rST ref to jump to the section
* Clarify the two targets of vault encryption, with notes about advantages and drawbacks of each
* Add the default form for --vault-id
* Add Vault ID examples for normal operations
Co-Authored-By: tacatac <taca@kadisius.eu>
* Start of migration to argparse
* various fixes and improvements
* Linting fixes
* Test fixes
* Fix vault_password_files
* Add PrependAction for argparse
* A bunch of additional tweak/fixes
* Fix ansible-config tests
* Fix man page generation
* linting fix
* More adhoc pattern fixes
* Add changelog fragment
* Add support for argcomplete
* Enable argcomplete global completion
* Rename PrependAction to PrependListAction to better describe what it does
* Add documentation for installing and configuring argcomplete
* Address rebase issues
* Fix display encoding for vault
* Fix line length
* Address rebase issues
* Handle rebase issues
* Use mutually exclusive group instead of handling manually
* Fix rebase issues
* Address rebase issue
* Update version added for argcomplete support
* -e must be given a value
* ci_complete
-Add: Test cases for ansible_parent_role_names and ansible_parent_role_paths
-Add: ansible_parent_role_names/paths variables for when a role is being included by another role.
* initial port over from gdoc
* crosslink httpapi pages
* Add some examples?
* Add quick example of using Connection
* Fix indentation of python code blocks
* moved to a full developer guide for networks
* Try to clarify some examples
* Fix typos
How did I even do that?
* Update docs/docsite/rst/dev_guide/testing_units_modules.rst
`set_unit_args()` should be imported and used in the unit test documentation.
Co-Authored-By: kbreit <kevin.breit@kevinbreit.net>
* migration docs for gce, with example playbook
* Update docs/docsite/rst/scenario_guides/guide_gce.rst
Co-Authored-By: rambleraptor <alexstephen@google.com>
* Document replacements
Document suggested replacement moduels for kubernetes, oc, and ec2_ami_find
modules in the porting guide
* remember the _module suffix
* Remove code but leave the metadata so that they can be listed as
removed in documentation.
* Remove removed modules from validate-modules ignore
* Remove unittests for the removed nodules
* Remove links to removed modules and add list of removed moduels to the
2.9 porting guide
* Fewer connection: local lines in module examples and scenario guides
The line 'connection: local' is not required. See
./docs/docsite/rst/inventory/implicit_localhost.rst
* Initial commit for module to manage Vexata storage volumes + fixes form code review in pr #47091.
* Fix indent errors reported by lint.
* Refactor, implement code review changes
* Moved doc fragment file to new layout
* Added explicit types for all module parameters, updated copyrights + raw string for block text.
* Added idempotency logic to openssl_pkcs12
Also decoupled the 'parse' and 'generate' function from the file write
as they are now used in different places that do not need the file to be
written to disk.
* Added idempotency tests for openssl_pkcs12
Also adds a new test for pkcs12 files with multiple certificates
* Regenerate if parsed file is invalid
* pkcs12_other_certificates check was wrong
* Updated ca_certificates to other_certificates
ca_certificates is left as an alias to other_certificates;
friendlyname depends on private key, so it will be ignored while
checking for idempotency if the pkey is not set;
idempotency check only checks for correct certs in the stack
* use different keys for different certs
* Added other_certificates in module docs
* Added changelog and porting guide
* removed unrelated porting guide entry
* renamed ca_cert* occurrence with other_cert
This reverts commit 85d836171b.
As discussed in WWG IRC meeting, we don't want Get-ADObject to be a dependency of win_domain_membership, and we need to be able to authenticate to the DC in some configs. We can revisit this change a different way for 2.9.
* Adding more information about blocks and blocks error handling.
* Update docs/docsite/rst/user_guide/playbooks_error_handling.rst and playbooks_blocks.rst
* Removing undefined variables as not rescuable errors.
Signed-off-by: Caio Ramos <caioramos97@gmail.com>
Signed-off-by: Gabriely Pereira <gabriely.pereira@usp.br>
* Apply suggestions from code review
Co-Authored-By: caiohsramos <caioramos97@gmail.com>
* Update guide_azure.rst
Added a note to the 'Storing in a file' section, that the secret value of the ini file should be UrlEncoded.
Otherwise the user might get login errors (depends on the characters used in the secret).
* Remove default use of paramiko connection plugin on macOS
This fix was originally to work around a bug that caused a kernel panic on macOS
that has since been fixed.
* Remove paramiko from requirements.txt
* Move paramiko checking to common place
* Drop the warnings obfiscation code
* Update pip installation instructions to reflect upstream instructions
* Fix tests on CentOS 6 (Python 2.6) that now show Python deprecation warnings
* Add changelog fragment
* win_nssm: rename cmdlets to use approved verbs, rename service name parameters
* win_nssm: improve code style and cmdlets ordering
* win_nssm: always escape all command line parameters with Argv-ToString
fix error when the service name contains quotes
* win_nssm: use Fail-Json instead of exceptions and remove global try/catch
* win_nssm: small refactoring, inline some functions
* win_nssm: refactoring - add a generic cmdlet to idempotently set any nssm service parameter
* win_nssm: refactoring - inline some functions
To make the code more malleable for future changes
* win_nssm: change application, stdout_file and stderr_file options type to path
* win_nssm: deprecates app_parameters, rename app_parameters_free_form to arguments, and add support for list of parameters
* win_nssm: add support of check mode
* win_nssm: add working_directory option
* win_nssm: add display_name and description options
* win_nssm: minor changes
* win_nssm: remove some sanity exclusions
* win_nssm: avoid using aliases and minor style fixes
* win_nssm: doc and ui improvements
* win_nssm: remove sanity exclusions
* win_nssm: minor revision
* win_nssm: deprecates dependencies, start_mode, user and password parameters and some choices of state in favor of win_service
* win_nssm: fix style
* win_nssm: add executable option to specify the location of the NSSM utility
* win_nssm: add missing parameter types
* win_nssm: add diff mode support
* win_nssm: avoid displaying depreciation warning if default value is assigned
* win_nssm: fix variable scope
* win_nssm: use the explicit -LiteralPath parameter name instead of -Path
* win_nssm: fix documentation
* win_nssm: add porting guide entries
* win_nssm: add changelog fragment
* docs: Add example of anchor and aliases in playbook
YAML supports anchors and aliases, add examples for explaining
this functionality with respect to Ansible playbook. Fix headers, fix
local TOC, remove unused section on YAML tags and Python types.
* Add a force_replace_host flag to win_domain_membership
Satisfies https://github.com/ansible/ansible/issues/53539
* Rework backticks
* Bump version_added
* Check for existence of current hostname as well; use LDAPFilter during search
* Rename $force_replace_host to $allow_existing_computer_account
* Added docs, porting guide and minor nit in code
<!--- Your description here -->
`192.168.128.0/20` does not contain `192.168.144.5`, the correct subnet is `192.168.144.0/20` (which is what is rendered on my test template).
+label: docsite_pr
* Allows the use of Private_Keys to be entered as a string instead of just a file. Making it possible to use VAULT to encrypt the key
* Fixed Issues auto check found
* Provide helpful information while avoiding credential exposure
* Restore original variable name :-)
* Fix a few other things
* Influence the default certificate_name in both cases
* Update documentation
* Add contributed docs
* Fix CI issue
* Modify EXOS module utils to utilize 'httpapi' or 'network-cli' connection
* Changes to cliconf plugin to support 'json' or 'text' output for compatibility between network-cli and httpapi
* Add HTTPAPI plugin supportng JSONRPC and RESTCONF for EXOS
* exos_facts modify commands with run script cli2json.py to command dictionary specifying 'json' output
Load appropriate fixtures
* Update exos_config module to utilize the get_diff and get_default_flag functionality.
JSONRPC doesn't work well with pipes, regex MULTILINE
* Support for NOS agnostic 'cli_config' module by implementing 'get_default_flag' and 'get_diff' functionality
* Update Ansible Documentation regarding the connections available for EXOS
When using before and after in combination, the opposite behavior was induced. This PR makes the the replacement happen between the specified patterns as intended.
* Added integration tests
* Add changelog, porting guide entry, and minor doc fixes
* update _facts and _info in checklist in docs/docsite/rst/dev_guide/developing_modules_checklist.rst
Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
* Remove nose from unittests
This PR migrates the last of our unittests from using nose to using
pytest. We don't need to install nose in our testing environments
anymore
* Add a warning about vault leaving secrets in the shell history.
* Add a warning about accidental newlines in vault encrypted strings.
+label: docsite_pr
* modify regex to use implicit charsets this should solve issues in py3 and unicode names
* fix issue with subgroups in yaml inventory
* clarify deprecation message
* separated per name warning from deprecation
* move noise to verbosity, simplify warnings
* fix docs to reflect actual 'good' practice
* change toggle to choice list to give users more options
* docs: refresh testing_integration.rst
Ensures the examples can be run:
- fedora25 is not available anymore, use fedora29 instead
- the posix/ci alias does not exist anymore, use shippable/posix/ instead
- explain how to list the target without argcomplete
* ansible-test should be in $PATH
* call ansible-runner from bin/, not test/runner
* we don't use credentials.template anymore, we use a collection of .template files.
* low-case bash bc we refresh to name of the binary
* refresh the command of Windows-CI example
* Update docs/docsite/rst/dev_guide/testing_integration.rst
Co-Authored-By: goneri <goneri@lebouder.net>
* Add support for Windows hosts in the SSH connection plugin
* fix Python 2.6 unit test and sanity issues
* fix up connection tests in CI, disable SCP for now
* ensure we don't pollute the existing environment during the test
* Add connection_windows_ssh to classifier
* use test dir for inventory file
* Required powershell as default shell and fix tests
* Remove exlicit become_methods on connection
* clarify console encoding comment
* ignore recent SCP errors in integration tests
* Add cmd shell type and added more tests
* Fix some doc issues
* revises windows faq
* add anchors for windows links
* revises windows setup page
* Update changelogs/fragments/windows-ssh.yaml
Co-Authored-By: jborean93 <jborean93@gmail.com>
* Replace InventoryFileCacheModule with a better developer-interface
Use new interface for inventory plugins with backwards compatibility
Auto-update the backing cache-plugin if the cache has changed after parsing the inventory plugin
* Update CacheModules to use the config system and add a deprecation warning if they are being imported directly rather than using cache_loader
* Fix foreman inventory caching
* Add tests
* Add integration test to check that fact caching works normally with cache plugins using ansible.constants and inventory caching provides a helpful error for non-compatible cache plugins
* Add some developer documentation for inventory and cache plugins
* Add user documentation for inventory caching
* Add deprecation docs
* Apply suggestions from docs review
* Add changelog
* Add a new check to ensure that module arguments are valid python identifiers
* Move the check up higher, out of the if docs block
* Skip validate-modules on py2
* Remove errant alias
* Change the retry_files_enabled to False and modify the comments to reflect that
this has been disabled.
* Change the default action of retry_files_enabled to False
* Update porting guide to reflect change in default state of retry_files_enabled variable
* Change log documenting a change in default behaviour of retry_files_enabled
* Revert config change to comment out the retry_files_enabled line to let the user decided what is best.
Comment above still states how to change.
* Python interpreter discovery
* No longer blindly default to only `/usr/bin/python`
* `ansible_python_interpreter` defaults to `auto_legacy`, which will discover the platform Python interpreter on some platforms (but still favor `/usr/bin/python` if present for backward compatibility). Use `auto` to always use the discovered interpreter, append `_silent` to either value to suppress warnings.
* includes new doc utility method `get_versioned_doclink` to generate a major.minor versioned doclink against docs.ansible.com (or some other config-overridden URL)
* docs revisions for python interpreter discovery
(cherry picked from commit 5b53c0012ab7212304c28fdd24cb33fd8ff755c2)
* verify output on some distros, cleanup
Based on https://docs.ansible.com/ansible/latest/reference_appendices/config.html
the default callback paths do not contain `_plugin`. Thus `~/.ansible/plugins/callback_plugins` and `/usr/share/ansible/plugins/plugin_type/action_plugins` are incorrect. Verified on 2.7.5 that by default `plugins/action` works and `plugins/action_plugins` does not.
* Add new module property to Windows modules
* Add brief pause to file tests to ensure the stat times are not equal, which was happening sometimes.
* Raise TypeError on error rather than fail_json()
* Rework error message to be less verbose
* Add porting guide entry
* update the developing_inventory docs to show ungrouped as a dict with a "children" key; avoid
[WARNING]: Found both group and host with same name: ungrouped
* Fix and update vault docs, add and clarify examples and options, introduce the concept of labeling a vault for clarity even if only a single password is in use for a given run, rework multi-password section to align to these concepts.
* Document -client scripts for ansible vault.
Co-Authored-By: orthanc <orthanc@users.noreply.github.com>