Commit Graph

1793 Commits (cef536fd5133205ea16353846ce42ba85acae6a9)

Author SHA1 Message Date
Caio Ramos 3bbc083818 Updating working groups links to community wiki (#54482)
Updating working groups links to community wiki and adding Working Groups wiki link (https://github.com/ansible/community/wiki#working-groups)
+label: docsite_pr
5 years ago
Slava Maslennikov 85d836171b Add a force_replace_host flag to win_domain_membership (#53542)
* 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
5 years ago
Kenyon Ralph d3f2f600c7 common_return_values.rst: add missing closing parenthesis (#54487) 5 years ago
b-abadie 9e6b6385e8 Fix example on address | ipsubnet(20) usage (#54388)
<!--- 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
5 years ago
Derrick Johnson 62d3ed0e2f ACI Private_Key String to Allow for Vaulting (#54251)
* 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
5 years ago
Ujwal Komarla 9384773e1e Exos httpapi (#54405)
* 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
5 years ago
Ilya Reshetnikov 5ccad0a3c5 Update playbooks_conditionals.rst (#54438)
added missed verb for better readability
5 years ago
James Cassell 9040fa0235 openstack: add os module_defaults group (#54319) 5 years ago
Matt Martz 6996926d89
Expose loop_control.loop_var as ansible_loop_var (#54240)
* Expose the loop_var as ansible_loop_var

* Add docs

* fix assert test

* Indicate version added
5 years ago
Evan Kaufman cf69ec5db0 replace - fixed combined before and after usage (#31452)
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
5 years ago
Jordan Borean b98e94df8f
porting guide - move win_dsc changes to proper section (#54372) 5 years ago
Jordan Borean 3044326b4d
win basic - do not warn on case insensitive matches (#54371) 5 years ago
Sandra McCann 942b2646c2 added attribution to author (#54356) 5 years ago
Sandra McCann f06ae6c57a Add example of network agnostic modules in use (#53755)
* add network agnostic example
* added link to multiple prompts example
* verified network agnostic playbook
* improve use of when
5 years ago
Felix Fontein 752db43b2d Rename return of docker_compose. (#54171) 5 years ago
Toshio Kuratomi 28b2eba605 Update the release schedule (#54207)
We've slipped an additional week.
5 years ago
Brian Coca 6f77dbf66f update _facts and _info in checklist (#54182)
* 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>
5 years ago
Sebastian Gumprich 7239218773 Update inventory.rst (#53656) 5 years ago
Jordan Borean 6bd32b748f Windows - add docs around TLS protocols (#54016)
* Windows - add docs around TLS protocols
5 years ago
Felix Fontein 8d62794f91 docker: rename docker_*_facts -> docker_*_info (#54124)
* Rename docker_*_facts -> docker_*_info.

* Add changelog.

* Update scenario guide.
5 years ago
Matt Clay 39bbadb2fd
Replace no-underscore-variable test with pylint. (#54140)
* Replace no-underscore-variable test with pylint.
* Update orphan handling for sanity test docs.
* Update command for listing tests.
5 years ago
Mike Wiebe ed9c7c9fb8 Add platform support matrix (#54032)
* Add platform support matrix

* Update docs/docsite/rst/network/user_guide/platform_nxos.rst

Co-Authored-By: mikewiebe <mwiebe@cisco.com>

* Update docs/docsite/rst/network/user_guide/platform_nxos.rst

Co-Authored-By: mikewiebe <mwiebe@cisco.com>

* Update docs/docsite/rst/network/user_guide/platform_nxos.rst

Co-Authored-By: mikewiebe <mwiebe@cisco.com>
5 years ago
Jill R 3e670373e0 Add returned keys to example module (#53884) 5 years ago
rajaspachipulusu17 6719e0abb6 Doc PR for the netvisor platform (#53947)
* Doc PR for the netvisor platform

* Sanity issue fixes

* Changes requested by doc team

* Added netvisor in toctree
5 years ago
Abhijeet Kasurde 943946ec9c
plugin_formatter: Check if docs are present for given plugin (#53743)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Toshio Kuratomi f5f4948480
Remove nose from unittests (#54055)
* 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
5 years ago
Toshio Kuratomi 4594aee25a Update roadmap with the slipped dates for 2.8.x (#53832) 5 years ago
Abhijeet Kasurde 9018819023
Update Testing page for OS version (#53800)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
David Passante 40af4a144d Update an example in documentation fields (#53760)
According to the `Linking within module documentation` section, the right syntax should be `I(state=present)`.
5 years ago
Josh df04f732f9 Include Windows as a platform in playbooks_conditionals (#52155)
Update the playbooks_conditionals page to include Windows as a valid platform for os_family

Co-Authored-By: jokajak <jokajak@gmail.com>
5 years ago
Jordan Borean 4f2d055e2c
win_psexec - deprecate the extra_opts module options (#53666) 5 years ago
Takashi Sugimura c56a344255 added `pmrun` and `enable` to `become-method` (#51009)
* added `pmrun` and `enable` to `become-method`

* references become plugin list for 'become_method' options
5 years ago
Richlv 4c1476932e add warnings for the stding usage examples (#51859)
* Add a warning about vault leaving secrets in the shell history.
* Add a warning about accidental newlines in vault encrypted strings.

+label: docsite_pr
5 years ago
Brian Coca 9b67219096
Fine tune sanity (#53544)
* 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
5 years ago
Sebastian Meyer 86ba4f3e46 remove some instances of `state: installed` (#53537)
This fixes the examples in multiple modules so they use `state: present`
instead of `state: installed`.
5 years ago
Matthew Butch cd5c64c818 FreeIPA: Fix ipa_user password option (#48453)
Maintain idempotency in ipa_user while user update.
5 years ago
Sebastian Meyer 3f97abc6e2 Add PyYAML to docs requirements.txt (#53521)
When building the docs in a virtualenv we need to install PyYAML in
addition to sphinx, otherwise the `import yaml` will fail.
5 years ago
Sebastian Meyer 7a91c8e6ae Fix undefined label playbooks_reuse_includes warn (#53522)
e1687e05a6 introduced additional
seealsos to playbooks_reuse_includes, but the label has to be _above_
the section heading for them to work.
5 years ago
Gonéri Le Bouder 6421e89e23 docs: refresh testing_integration.rst (#53338)
* 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>
5 years ago
Jordan Borean 8ef2e6da05 Add support for Windows hosts in the SSH connection plugin (#47732)
* 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>
5 years ago
James Cassell e55e8fe2c4 regex_escape: support POSIX basic regex (#50327) 5 years ago
Dag Wieers f47191674e
utilities: Clean up parameter types and add seealso (#53063)
* utilities: Clean up parameter types and add seealso

* Add inventory modules

* Add more references, clarify with-loops
5 years ago
Brian Coca c0a4cf297d add '_facts' rule to module checklist (#53359)
* add '_facts' rule to module checklist

* Update docs/docsite/rst/dev_guide/developing_modules_checklist.rst

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
5 years ago
Abhijeet Kasurde be2a349970 become: Add missing documentation for pfexec, dzdo and machinectl (#53314)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Gonéri Le Bouder 0b579a0837 doc: preseve block-quote structure (#53293)
Without the `::`, the indentation of the example block is lost.
5 years ago
Sloane Hertel 9687879840
Fix inventory cache interface (#50446)
* 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
5 years ago
Jordan Borean 6b294eab4d
win_dsc - Add argument validation and other fixes (#53093)
* win_dsc - Add argument validation and other fixes

* Fix doc issues
5 years ago
Xaroth 646a8586a5 Remove old 'srtd' theme and references. (#49289) 5 years ago
Matt Martz a639dc6d88
Add a new check to ensure that module arguments are valid python identifiers (#53278)
* 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
5 years ago
Felix Fontein 8c628c9b2c Simplify docker_*_facts return names (#51939)
* Simplify docker_*_facts return names.

* Adjust regular return values of modules to match style of docker_*_facts modules.
5 years ago
Sandra McCann d12e3580ea replaced outdate release info with checkmarks (#53016) 5 years ago
Abhijeet Kasurde c948849d4d VMware: vmware_vm_inventory using vaulted config (#53048)
* VMware: vmware_vm_inventory using vaulted config

Adds documentation about using vaulted inventory cofiguration file
for vmware_vm_inventory plugin.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Chris Gavin 43042682e8 Fix an incorrect function call in a documentation example. (#53233) 5 years ago
Sebastian Wojciechowski 5cc6a70398 Remove redundant article in testing integration note (#53209) 5 years ago
Maxim Zaitsev a015953316 Fixed a typo in playbooks_async.rst (#53200) 5 years ago
Yanis Guenane fcec3d0600 Become plugin: Update documentation to match other plugin doc (#53266) 5 years ago
Chuck Douglas 0e9a79a589 Change the retry_files_enabled to False and modify the comments to reflect that this has been disabled (#52581)
* 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.
5 years ago
Matt Davis 4d3a6123d5
Python interpreter discovery (#50163)
* 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
5 years ago
Kevin Breit 4af5842409 Developer documentation - Change path to connection_plugins (#52577)
* Change path to connection_plugins

* Update docs/docsite/rst/dev_guide/developing_plugins.rst

Co-Authored-By: kbreit <kevin.breit@kevinbreit.net>
5 years ago
Jordan Borean 7360db5956 doc - skip/windows for integration tests (#53010) 5 years ago
Felix Fontein c6ae23062b Deprecate returned facts. (#52518) 5 years ago
John R Barker 80cc6417fa Docs: List of Sanity Tests (#52986)
* Improve sanity test docs, how to run sanity tests section
5 years ago
Pilou d8a2d64ec1 osx_say callback plugin: add espeak support, rename to say (#33740)
* rename into say

* add support for espeak command

* adds symlink from osx_say to say

* Update version number
5 years ago
Alicia Cozine a361140680 Update the Loop docs (#47895)
* first review of loops page

* round two

* round three

* puts 'not deprecating' message in a note

* fixes note syntax

* clarifies loop_control sections

* loops require list input

* incorporates bcoca and sivel feedback

* fixes links

* more bcoca feedback

* adds examples to loop update guidelines

* adds explicit code-blocks

* remove stray copypasta
5 years ago
Esa Varemo 5bdc6636bc Fix the example plugin paths (#52881)
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.
5 years ago
Brian Coca 40a053ce78
better error for bad module options (#52726)
also document clearly inline vaults don't work on 'options'
  fixes #52707
5 years ago
Sam Doran f52a088862
Add option to ignore, warn, or error when a module parameter is converted to a string (#51404)
* 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
5 years ago
Divided by Zer0 1f06b3ca7d ungrouped as a list (#50593)
* 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
5 years ago
Ed Costello 0e467be0f1 Update vault docs for client scripts, multiple keys and misc (#43993)
* 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>
5 years ago
Garfield Lee Freeman fb97204291 Deprecating panos modules; pointing to Galaxy role (#52355)
* Deprecating panos modules; pointing to Galaxy role

* Updating porting guide; deprecating panos_set

* Changing 2.11 to 2.12
5 years ago
Brian Coca 2c63f453be add info about relative paths to config page (#51351)
* add info about relative paths to config page

* Update docs/templates/config.rst.j2

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>

* escape the macro to show the macro

* break up long line, revise
5 years ago
Martin Krizek be9f07279e Add stats on rescued/ignored tasks (#48418)
* Adding rescued/ignored tasks to stats gathering

Fixes #31245

* Amend integration tests to pass

* callback/dense.py: fix too-many-format-args

* Add changelog

* Amend counter_enabled and unixy callbacks

* Fix syntax error

* Fix typo in the changelog

* Remove not needed comment

* Re-add skipped

* Add test for rescued

* Fix colors...

* Fix unstable tests?

* Add a note to the porting guide

* Re-word the note in the porting guide

Fixes #20346
Fixes #24525
Fixes #14393

Co-authored-by: James Cammarata <jimi@sngx.net>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
5 years ago
Mukhammad Karimov da77057566 Update filter documentation (#52575)
Added documentation for ip4_hexr filter
5 years ago
Sandra McCann d7f5262dad remove version detail from platform guides (#52512) 5 years ago
Abhijeet Kasurde 57d85031d7
Parse multiple values for single key in cmdline facts (#49591)
* Facts parsing for cmdline can now handle multiple values for a single key.
* Unit tests for cmdline fact parsing
* Review comments

Fixes: #22766

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Tobias Vollmer c5a1ec4692 ansible-galaxy init does create a sub directory (#52390)
`ansible-galaxy init` creates a directory named `role_name` (in the given example) instead of adding the structure in the current working directory.

Additionally adding a clarification for repository creation as the proper repository root is not described yet.

+label: docsite_pr
5 years ago
Luke D Russell 6e739b12a6 Update network_debug_troubleshooting.rst (#52446)
<!--- Your description here -->

+label: docsite_pr
5 years ago
Hannes Ljungberg 0bf9052e06 docker_swarm_service: Remove defaults (#52420)
* Remove update_parallelism default

* Remove update_delay default

* Add documentation about removing defaults

* Present porting guide changes as a list
5 years ago
Alex Stephen 6ae04017d8 GCE deprecation warning (#52116)
* GCE deprecation warning

* porting guide typo

* fixing ignores

* moving error code back

* underscore marking on gce

* forgot to change status
5 years ago
Nicolas Quiniou-Briand 2b9341f139 fix typo in example (#52475)
Add extra space

+label: docsite_pr
5 years ago
Abhijeet Kasurde e0d8d9c2bf validate-modules: Documentation bool (#50085)
* validate-modules: Documentation bool

This check allows to catch cases where type of argument is different than documentation does.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Wrong comparison for 'str'

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Add ignore.txt

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Fix logic and clean up ignore.txt
5 years ago
David f697e264cc doc: remove grammatical glitch (#52336) 5 years ago
Jordan Borean de118734e9
Ansible.Basic - add required_by to module spec (#51407)
* Ansible.Basic - add required_by to module spec

* fix typo in docs
5 years ago
Jordan Borean 7b8e814a10 Ansible.Basic: make module options case insensitive with dep warning (#51583)
* Ansible.Basic: make module options case insensitive with dep warning

* Add porting guide info
5 years ago
Gavin Kyte a722021207 Change un-ordered list to ordered (#52033)
Makes sense to make implied order explicit with an ordered list
5 years ago
Sayed Anisul Hoque bf20c4126c Updated the ansible-galaxy docs (#52070)
* Updated the ansible-galaxy docs

<!--- Your description here -->

Updated the documentation that reflects the default branch that will be used for the `version` option in ansible-galaxy.

+label: docsite_pr

* Updated the documentation

As per the code (6d4307377f/lib/ansible/galaxy/role.py (L237))[ansible/galaxy/role.py] Defaults to the branch set as a default in the repository otherwise defaults to the master.

* Update docs/docsite/rst/reference_appendices/galaxy.rst

Co-Authored-By: anis016 <anis016@users.noreply.github.com>
5 years ago
Andrew Gaffney 9c35f18dd6 Custom jinja Undefined class for handling nested undefined attributes (#51768)
This commit creates a custom Jinja2 Undefined class that returns
Undefined for any further accesses, rather than raising an exception
5 years ago
Keith Maxwell 7fbacf920d Remove misleading statement passwords must be same (#49798)
* Remove misleading statement passwords must be same

Since 2.4 Ansible has supported multiple vault passwords:
<https://docs.ansible.com/ansible/latest/user_guide/vault.html#multiple-vault-passwords>

Meaning lines like the following are misleading:

> The password used with vault currently must be the same for all files you wish
> to use together at the same time.

-- `docs/docsite/rst/user_guide/vault.rst`

To demonstrate this with Ansible 2.7, save the following as `example.yaml`:

```
- name: Display output from two vaults with different passwords
  hosts: localhost
  connection: local
  vars_files: [one.yaml, two.yaml]
  tasks:
    - name: View secret from one.yaml vault
      debug: { var: one }
    - name: View secret from two.yaml vault
      debug: { var: two }
```

Then run the three following commands choosing two different passwords:

```
$ echo 'one: 1' | ansible-vault encrypt --vault-id id1@prompt --output=one.yaml
$ echo 'two: 2' | ansible-vault encrypt --vault-id id2@prompt --output=two.yaml
$ ansible-playbook --vault-id id1@prompt --vault-id id2@prompt example.yaml
```

`ansible-vault` stores an ID in plain text in the vault file.

* Remove note about default in Ansible 2.1

As requested by gundalow in https://github.com/ansible/ansible/pull/49798
5 years ago
Abhijeet Kasurde a6ecbe7a4b
Check metadata.status presence (#50416)
Generate error if metadata.status is empty or missing.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde fab815fc3b
VMware: Handle duplicate VM names in vmware_vm_facts (#45412)
This fix changes facts returned from vmware_vm_facts to list of dict from
dict of dict.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Evgeni Golov ace38a2646 two indentation fixes in playbooks_reuse_roles.rst (#51934)
+label: docsite_pr
5 years ago
Matt Martz 445ff39f94
Become plugins (#50991)
* [WIP] become plugins

Move from hardcoded method to plugins for ease of use, expansion and overrides
  - load into connection as it is going to be the main consumer
  - play_context will also use to keep backwards compat API
  - ensure shell is used to construct commands when needed
  - migrate settings remove from base config in favor of plugin specific configs
  - cleanup ansible-doc
  - add become plugin docs
  - remove deprecated sudo/su code and keywords
  - adjust become options for cli
  - set plugin options from context
  - ensure config defs are avaialbe before instance
  - refactored getting the shell plugin, fixed tests
     - changed into regex as they were string matching, which does not work with random string generation
     - explicitly set flags for play context tests
 - moved plugin loading up front
 - now loads for basedir also
 - allow pyc/o for non m modules
 - fixes to tests and some plugins
 - migrate to play objects fro play_context
 - simiplify gathering
 -  added utf8 headers
 - moved option setting
 - add fail msg to dzdo
 - use tuple for multiple options on fail/missing
 - fix relative plugin paths
 - shift from play context to play
 - all tasks already inherit this from play directly
 - remove obsolete 'set play'
 - correct environment handling
 - add wrap_exe option to pfexec
 - fix runas to noop
 - fixed setting play context
 - added password configs
 - removed required false
 - remove from doc building till they are ready

future development:
  - deal with 'enable' and 'runas' which are not 'command wrappers' but 'state flags' and currently hardcoded in diff subsystems

* cleanup

  remove callers to removed func
  removed --sudo cli doc refs
  remove runas become_exe
  ensure keyerorr on plugin
  also fix backwards compat, missing method is attributeerror, not ansible error
  get remote_user consistently
  ignore missing system_tmpdirs on plugin load
  correct config precedence
  add deprecation
  fix networking imports
  backwards compat for plugins using BECOME_METHODS

* Port become_plugins to context.CLIARGS

This is a work in progress:
* Stop passing options around everywhere as we can use context.CLIARGS
  instead

* Refactor make_become_commands as asked for by alikins

* Typo in comment fix

* Stop loading values from the cli in more than one place

Both play and play_context were saving default values from the cli
arguments directly.  This changes things so that the default values are
loaded into the play and then play_context takes them from there.

* Rename BECOME_PLUGIN_PATH to DEFAULT_BECOME_PLUGIN_PATH

As alikins said, all other plugin paths are named
DEFAULT_plugintype_PLUGIN_PATH.  If we're going to rename these, that
should be done all at one time rather than piecemeal.

* One to throw away

This is a set of hacks to get setting FieldAttribute defaults to command
line args to work.  It's not fully done yet.

After talking it over with sivel and jimi-c this should be done by
fixing FieldAttributeBase and _get_parent_attribute() calls to do the
right thing when there is a non-None default.

What we want to be able to do ideally is something like this:

class Base(FieldAttributeBase):
    _check_mode = FieldAttribute([..] default=lambda: context.CLIARGS['check'])

class Play(Base):
    # lambda so that we have a chance to parse the command line args
    # before we get here.  In the future we might be able to restructure
    # this so that the cli parsing code runs before these classes are
    # defined.

class Task(Base):
    pass

And still have a playbook like this function:

---
- hosts:
  tasks:
  - command: whoami
    check_mode: True

(The check_mode test that is added as a separate commit in this PR will
let you test variations on this case).

There's a few separate reasons that the code doesn't let us do this or
a non-ugly workaround for this as written right now.  The fix that
jimi-c, sivel, and I talked about may let us do this or it may still
require a workaround (but less ugly) (having one class that has the
FieldAttributes with default values and one class that inherits from
that but just overrides the FieldAttributes which now have defaults)

* Revert "One to throw away"

This reverts commit 23aa883cbed11429ef1be2a2d0ed18f83a3b8064.

* Set FieldAttr defaults directly from CLIARGS

* Remove dead code

* Move timeout directly to PlayContext, it's never needed on Play

* just for backwards compat, add a static version of BECOME_METHODS to constants

* Make the become attr on the connection public, since it's used outside of the connection

* Logic fix

* Nuke connection testing if it supports specific become methods

* Remove unused vars

* Address rebase issues

* Fix path encoding issue

* Remove unused import

* Various cleanups

* Restore network_cli check in _low_level_execute_command

* type improvements for cliargs_deferred_get and swap shallowcopy to default to False

* minor cleanups

* Allow the su plugin to work, since it doesn't define a prompt the same way

* Fix up ksu become plugin

* Only set prompt if build_become_command was called

* Add helper to assist connection plugins in knowing they need to wait for a prompt

* Fix tests and code expectations

* Doc updates

* Various additional minor cleanups

* Make doas functional

* Don't change connection signature, load become plugin from TaskExecutor

* Remove unused imports

* Add comment about setting the become plugin on the playcontext

* Fix up tests for recent changes

* Support 'Password:' natively for the doas plugin

* Make default prompts raw

* wording cleanups. ci_complete

* Remove unrelated changes

* Address spelling mistake

* Restore removed test, and udpate to use new functionality

* Add changelog fragment

* Don't hard fail in set_attributes_from_cli on missing CLI keys

* Remove unrelated change to loader

* Remove internal deprecated FieldAttributes now

* Emit deprecation warnings now
5 years ago
James Cassell 953058d025 standardize connection variable names (#51776)
* standardize user/password connection vars

* docs: use ansible_user and ansible_password

* docs: var precedence for connection vars

* docs: ansible_become_pass -> ansible_become_password etc
5 years ago
Andrii Radyk 07cff73719 Fix yaml indentation for from_yaml_all filter example (#51998) 5 years ago
Richard Diphoorn ad549e375a Changed 'Control Machine' to 'Control Node' (#51696)
* Changed 'Control Machine' to 'Control Node' in the documentation. Changing the term 'Control Machine' to 'Control Node', to be in line with the basic concepts here: https://docs.ansible.com/ansible/latest/network/getting_started/basic_concepts.html

Also for both entities; Control/Managed using the same common denominator 'Node' brings consistency.

* Updated reference links to new term.
5 years ago
RMuskovets eb54dab362 Update developing_rebasing.rst (#51650) 5 years ago
Nathaniel Case 7ad238b358
Document httpapi and cliconf plugins (#49503)
* Create new documentation pages for httpapi and cliconf

* Add new documentation to plugins toctree and Makefile

* Add DOCUMENTATION to cliconf

* Apply suggestions from code review
5 years ago
Ingo Meldau 1fdceac37e Update playbooks_delegation.rst (#51949)
Changed from 'comand' to 'command'
5 years ago
Toshio Kuratomi dfd8b659c0 Have update-bundled check for updates to all bundled code
Add a test for whether we have bundled code inside of ansible that needs to be updated
5 years ago
Sandra McCann 2c0897caf2 mention ansible-lint and editor tools that help with playbook development (#51769)
* introduce ansible-lint in playbook docs, mention editors help playbook syntax

Co-Authored-By: samccann <samccann@redhat.com>
5 years ago