Commit Graph

1313 Commits (ea0f722d7437afd43a87a87a928b5f7011dd31ce)

Author SHA1 Message Date
Felix Fontein e7e63ec1e8 Improving syntax highlighting in HTML docs (#42472)
* Adding improved YAML lexer for HTML docs.

* Fixing (some of) the warnings.

* Fixing more warnings.

* Removing ansible- prefix from lexer names.

* Rename extensions -> _extensions.

* Removing superfluous module search path extension.
6 years ago
Matt Martz 01c0446cb5
Add AnsibleModule signature schema, and fix associated issues (#43512) 6 years ago
John R Barker 321081c3b4 atom & yamllint (#43498)
* atom & yamllint
6 years ago
Lindsay Hill 2e873be9b5 Networking Docs - Added platform guides for EXOS and SLX-OS (#43116)
* Added platform guides for EXOS and SLX-OS

* Fixed RST formatting
6 years ago
Jordan Borean ccb2e9d32f Updated release and maintenance page (#42613) 6 years ago
Ajay Chenampara d79027b77f Update with Emacs info (#43450)
* Update other_tools_and_programs with Emacs info
6 years ago
Alicia Cozine 5fa8747af3 fixes broken link (#43458) 6 years ago
Abhijeet Kasurde e2e3bf4073 VMware: documentation update (#42451)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Brian Coca c809500c79 document rescue vars (#43101) 6 years ago
Abhijeet Kasurde 9e221da44a VMware: vmware_guest_find scenario guide (#42450)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ganesh Nalawade 89676c801f Update troubleshooting doc for command timeout (#43292)
* Update troubleshooting doc for command timeout

* Update timeout document to reflect the new way to set
  command timeout per task basis for network_cli and netconf
  connection type as per PR #42847

* Fix CI failure

* Fix review comment

* Fix typo in doc
6 years ago
Abhijeet Kasurde d1c0b7a597 VMware: restructure docs (#43065)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Egor Zaitsev 249a6aae22 New module: routeros — manage MikroTik RouterOS (#41155)
* Implement initial RouterOS support

* Correct matchers for license prompts

* Documentation updates & mild refactor

* Remove one last Cisco function

* Sanity test fixes

* Move imports to the beginning

* Remove authorize property

* Handle ANSI codes

* Revert to_lines function

* CR fixes

* test(routeros): add unit tests

* Added another test (with ANSI colors and banner in fixture).

* Ignore CRLF line endings in system_package_print file

* fix: review by ganeshrn
6 years ago
Lindsay Hill 4a98802b52 Ironware: Deprecate provider, support network_cli (#43285) 6 years ago
Toshio Kuratomi 52449cc01a AnsiballZ improvements
Now that we don't need to worry about python-2.4 and 2.5, we can make
some improvements to the way AnsiballZ handles modules.

* Change AnsiballZ wrapper to use import to invoke the module
  We need the module to think of itself as a script because it could be
  coded as:

      main()

  or as:

      if __name__ == '__main__':
          main()

  Or even as:

      if __name__ == '__main__':
          random_function_name()

  A script will invoke all of those.  Prior to this change, we invoked
  a second Python interpreter on the module so that it really was
  a script.  However, this means that we have to run python twice (once
  for the AnsiballZ wrapper and once for the module).  This change makes
  the module think that it is a script (because __name__ in the module ==
  '__main__') but it's actually being invoked by us importing the module
  code.

  There's three ways we've come up to do this.
  * The most elegant is to use zipimporter and tell the import mechanism
    that the module being loaded is __main__:
    * 5959f11c9d/lib/ansible/executor/module_common.py (L175)
    * zipimporter is nice because we do not have to extract the module from
      the zip file and save it to the disk when we do that.  The import
      machinery does it all for us.
    * The drawback is that modules do not have a __file__ which points
      to a real file when they do this.  Modules could be using __file__
      to for a variety of reasons, most of those probably have
      replacements (the most common one is to find a writable directory
      for temporary files.  AnsibleModule.tmpdir should be used instead)
      We can monkeypatch __file__ in fom AnsibleModule initialization
      but that's kind of gross.  There's no way I can see to do this
      from the wrapper.

  * Next, there's imp.load_module():
    * https://github.com/abadger/ansible/blob/340edf7489/lib/ansible/executor/module_common.py#L151
    * imp has the nice property of allowing us to set __name__ to
      __main__ without changing the name of the file itself
    * We also don't have to do anything special to set __file__ for
      backwards compatibility (although the reason for that is the
      drawback):
    * Its drawback is that it requires the file to exist on disk so we
      have to explicitly extract it from the zipfile and save it to
      a temporary file

  * The last choice is to use exec to execute the module:
    * https://github.com/abadger/ansible/blob/f47a4ccc76/lib/ansible/executor/module_common.py#L175
    * The code we would have to maintain for this looks pretty clean.
      In the wrapper we create a ModuleType, set __file__ on it, read
      the module's contents in from the zip file and then exec it.
    * Drawbacks: We still have to explicitly extract the file's contents
      from the zip archive instead of letting python's import mechanism
      handle it.
    * Exec also has hidden performance issues and breaks certain
      assumptions that modules could be making about their own code:
      http://lucumr.pocoo.org/2011/2/1/exec-in-python/

  Our plan is to use imp.load_module() for now, deprecate the use of
  __file__ in modules, and switch to zipimport once the deprecation
  period for __file__ is over (without monkeypatching a fake __file__ in
  via AnsibleModule).

* Rename the name of the AnsiBallZ wrapped module
  This makes it obvious that the wrapped module isn't the module file that
  we distribute.  It's part of trying to mitigate the fact that the module
  is now named __main)).py in tracebacks.

* Shield all wrapper symbols inside of a function
  With the new import code, all symbols in the wrapper become visible in
  the module.  To mitigate the chance of collisions, move most symbols
  into a toplevel function.  The only symbols left in the global namespace
  are now _ANSIBALLZ_WRAPPER and _ansiballz_main.

revised porting guide entry

Integrate code coverage collection into AnsiballZ.

ci_coverage
ci_complete
6 years ago
John R Barker 3ab9030f05 Document more tools (#43053)
* Document more tools
6 years ago
Yanis Guenane d94cc3568a CloudStack: Fix typos in the Guide (#43303) 6 years ago
Yuma Inaura (稲浦悠馬) 1199dff246 Update porting_guide_2.0.rst
Fix indent

+label: docsite_pr
6 years ago
Dag Wieers 1ab411229a Get rid of duplicate status statement (#42885)
If a module was in status "preview", but it was not "supported"
(core/network) the message about the module being "preview" would be
repeated.
6 years ago
Sam Doran 2a1a8585f3
Add reboot module stuff to 2.7 roadmap (#43232) 6 years ago
Fabian von Feilitzsch d27de6acd9 Add from_yaml_all to support multi document yaml strings (#43037)
* Support multi-doc yaml in the from_yaml filter

* Most automatic method of handling multidoc

* Only use safe_load_all

* Implement separate filter

* Update plugin docs and changelog
6 years ago
Andrew Gaffney dbff49dee0
Remove dead 'vault_password' play attribute (#41847) 6 years ago
Jordan Borean 2c9cbae3f9
Removed deprecated Windows items slated for removed in 2.7 (#43231) 6 years ago
Toshio Kuratomi 09142f791c Change the schedule to allow slip time.
We have to have time to slip release in case of major bugs.
6 years ago
Toshio Kuratomi fb94857a83 Update roadmap with links to PRs 6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Donghyun Kang 1b86d598fc fixed typo(removed duplicated 'you') (#43158) 6 years ago
Jordan Borean 93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
6 years ago
Jarryd Tilbrook 460f858640 Enable check_mode in command module (#40428)
* Enable check_mode in command module

This only works if supplying creates or removes since it needs
something to base the heuristic off. If none are supplied it will just
skip as usual.
Fixes #15828

* Add documentation for new check_mode behavior
6 years ago
AJ Acevedo e423436ed7 Minor grammatical update
Minor grammatical update.
6 years ago
augustkang 6db074e7af ansible/docs/docsite/rst/inventory/implicit_localhost.rst typo 6 years ago
Nathaniel Case f6160c675d Add links to network roadmap items 6 years ago
Sandra McCann 2e93eab920 pr 42271 - fixed merge conflicts 6 years ago
Sloane Hertel fdf51f2a43
Add AWS links for 2.7 roadmap (#43093) 6 years ago
Ryan S. Brown 859ef3d134 Add CFN Stackset roadmap link 6 years ago
Jordan Borean 5e20ef1d89
Add missing links for Windows items on the roadmap (#43061) 6 years ago
Chris Smolen 1e2b332001 Update the regex_findall example (#43052)
<!--- Your description here -->
The example has:
`{{ 'Some DNS servers are 8.8.8.8 and 8.8.4.4' | regex_findall('\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b') }}`

It needs be double backslashes to escape the backslashes:
`{{ 'Some DNS servers are 8.8.8.8 and 8.8.4.4' | regex_findall('\\b(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\b') }}`
+label: docsite_pr
6 years ago
Brian Coca 18aa87803f remove dupe entries 6 years ago
Sergiu Marsavela 8d194fa5f7 Update Openstack dynamic inventory reference (#41459)
* Update Openstack dynamic inventory link

* Add note for change of script name

* Change name of script to prevent Python module import errors.

Fixes #41562
6 years ago
John R Barker 5bcdf4f204
cli_config, not net_config (#42903) 6 years ago
Sandra McCann 1900635409 fixed typo (#42900) 6 years ago
Matt Davis 1c420f160a add links to roadmap projects/issues/PRs (#42771)
* add links to roadmap projects/issues/PRs
6 years ago
Taranjeet Singh 58d6044251 Docs: Update sentence structure in user guide (#42884)
This commit fixes the information about become keyword in
Introduction to Playbook part under User Guide.
6 years ago
Matt Martz 27b4d7ed31
Add feature to expose vars/defaults with include/import_role (#41330)
* First pass at making 'private' work on include_role, imports are always public

* Prevent dupe task execution and overwriting handlers

* New functionality will use public instead of deprecated private

* Add tests for public exposure

* Validate vars before import/include to ensure they don't expose too early

* Add porting guide docs about public argument and change to import_role

* Add additional docs about public and vars exposure to module docs

* Insert role handlers at parse time, exposing them globally
6 years ago
Dylan Silva 65643dfc8c Updated winrm details for more clarity (#42574) 6 years ago
Sviatoslav Sydorenko 97cc0cce7f
🚸 🐍 🍒 ⛏ Integrate cherry picker (#41403)
This enables developers to use cherry-picker for backporting purposes.
This tool originally comes from Core Python Development Workflow.

Ref: https://pypi.org/p/cherry-picker
Ref: https://github.com/python/core-workflow/tree/master/cherry_picker

Also:
* 📝 Add docs about supporting cherry-picker
6 years ago
Jiri Tyr 028f79a86b Adding the Ansible way how to create a password hash 6 years ago
Fran Fitzpatrick 5928ec04ca Adds an ipmath filter (#41985) 6 years ago
Brian Coca a37f27a243 removed note from already removed 1.x api comment
fixes #39888
6 years ago
saidmu 52fe9aaf04 Update intro_inventory.rst
<!--- I think a colon is missing-->

+label: docsite_pr
6 years ago
Abhijeet Kasurde ef67f580cc VMware: Add scenario guide for renaming VM (#42094)
This adds new sceario guide for renaming an existing virtual machine
to new name.

Fixes: #42084

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dylan Silva c227a0c8bb
Initial upload of roadmap for 2.7 (#41845)
* Initial upload of roadmap for 2.7

* Update ROADMAP_2_7.rst

* Uses regular quotes, rather than smart quotes

* Fix broken link
6 years ago
Sam Doran 7b0dea45e9 Update JSON Query filter examples (#42432)
* Update JSON Query filter examples

Correct syntax on one example
Add more examples of escaping
Change example to show joining list to string
6 years ago
Brian Coca b21c7c0232 create default status for when not provided
* also updated text to be 'plugin friendly' vs hardcoding modules

(cherry picked from commit 341a0f7b035588557d35fc12164a0f4031c786fe)
6 years ago
Eugene Korekin 07adeff665 Fix typo (#42433)
+label: docsite_pr
6 years ago
Abhijeet Kasurde 6339e37abd VMware: Remove VM using vmware_guest (#42100)
* VMware: Remove VM using vmware_guest

This adds scenario guide for removing VM using vmware_guest module.

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

* code review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Alex Stephen 2916adc88a New doc guide for GCP (#41753)
* New doc guide for GCP

* Changes per PR

* Addressing PR comments on GCE scenario guide
6 years ago
Sachidananda Urs fecda03066 Fix typos in documentation (#42406)
Fix typos in unit test documentation

Fixes:  #42405
6 years ago
Brian Coca 475abc0af7
inventory plugin docs (#42022)
* inventory plugin docs
* added set options
* minor wording and formatting fixes
* changed headers to std as per #35520, also added to main readme
* unified inventory plugin devel, referenced from generic plugin dev
* fixed typos and update as per feedback
6 years ago
Sam Doran 3e2a4f67cf
Update link to GitHub admin process (#42364) 6 years ago
John R Barker 6366df700d Document module links (#42308) 6 years ago
John R Barker d962611528 Allow documentation of module options type (#42285)
* Allow documentation of module options

Pass through the `type` of a modules option so it's displayed on the
html module docs

* docs
6 years ago
Alexandre Vicenzi df2e0c7c00 Fix broken links. (#42323) 6 years ago
Alexandre Vicenzi 1dafd92c8e Fix Ansible Galaxy documentation link. (#42316)
More info: https://github.com/ansible/galaxy/issues/830
6 years ago
Ganesh B. Nalawade 78b1980474 More CI failure fixes 6 years ago
Ganesh B. Nalawade c43beef258 Minor changes 6 years ago
Ganesh B. Nalawade d1ff8e2dca Update ssh_config to accept file path 6 years ago
Ganesh B. Nalawade fa8b07e452 Fix doc indentation 6 years ago
Ganesh B. Nalawade 74a23f50e4 Fix CI failure 6 years ago
Ganesh B. Nalawade 8d8d4b3d86 Add options for jumphost in netconf connetion
Fixes #37262
Fixes #36284

*  Updates options in netconf connection to enable
   bastion/jump host setting using configuration/enviornment
   varaibles.
*  Update troubleshooting docs from using bastion host with netconf
   connection
6 years ago
Dag Wieers 75c8d8bfc2
Fix aci_tenant module references
<!--- Your description here -->

+label: docsite_pr
6 years ago
Andrew Gaffney 21b99bff94
Fix 'ansible-doc' command in action plugin docs (#42206) 6 years ago
Brian Coca d497eba196 several FAQ updates and clarifications 6 years ago
Sam Doran fb55038d75 Add warning when using an empty regexp in lineinfile (#42013)
* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change
6 years ago
Brian Coca b6f2aad600 ignore ansible.cfg in world writable cwd (#42070)
* ignore ansible.cfg in world writable cwd
 * also added 'warnings' to config
 * updated man page template
6 years ago
John R Barker e9dbebfa57
Fix some broken links (#42079)
* Fix some broken links

* We now only serve via https
* redirects don't work with anchors, so update those links (devel/dev_guide)
6 years ago
Matt Martz aea396f04b
Add items2dict filter that is the reverse of dict2items (#42071)
* Add items2dict filter that is the reverse of dict2items

* Address feedback about type checking, and add docs for zip/zip_longest
6 years ago
Alicia Cozine e0a9a71b04 updates docs links to changelogs for all versions (#41289)
* updates docs links to changelogs for all versions

* updates latest 2.5 release
6 years ago
Felix Fontein fb0b804988 Documentation: add parameter types, and version_added for return values and facts (#41999)
* Add types for parameters.

* Add version_added for return facts and return values.
6 years ago
Abhijeet Kasurde 19ece7b740
VMware: Add scenario guide (#40075)
This adds a scenario guide for vmware

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 0752dc12b7 Documentation: show non-string non-iterable defaults for choices (#40212)
* Also marking non-string defaults.

* Adding list filter from #37517 to plugin_formatter.

* Simplifying list test.

* Redistribute imports
6 years ago
Matt Clay d4ed572e91 Update roadmap schedule for 2.6. 6 years ago
Matt Martz 11ce954226
Fix docs for all test. Fixes #41956 (#41965) 6 years ago
Troy Murray 15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
6 years ago
Matt Clay e60da3feaf Update 2.6 roadmap release schedule. 6 years ago
Jordan Borean 2af36412f9
runas + async - get working on older hosts (#41772)
* runas + async - get working on older hosts

* fixed up sanity issues

* Moved first task to end of test for CI race issues

* Minor change to async test to be more stable, change to runas become to not touch the disk

* moved async test back to normal spot
6 years ago
Toshio Kuratomi ad2e8dd6d8 Changes to support building docs with old jinja2
This commit: fa5c0282a4 relied upon
features present in Jinja-2.10 and above.  The changes here allow us to
build the *rst* with older versions of jinja2.
6 years ago
Ted Timmons 3d78dd6677 add a third way to disable cows (#41866)
* add a third way to disable cows

Cows are great, but there's a third way to disable. I'm sure my RST markup can be improved.

* oops, actually in ansible.cfg
6 years ago
Jordan Borean 0b2ec9b11c
windows dsc docs: fix missing colon in example (#41886) 6 years ago
Toshio Kuratomi 8841fdd481 Bump versions on release_and_maintenance doc
(cherry picked from commit c8b1b271c6)
6 years ago
Olivier Bourdon 06b73ff8f1 Add random_mac string filter (#39775)
Add new filter to generate random MAC addresses from
string prefix. See docs/docsite/rst/user_guide/playbooks_filters.rst
for more detailed infos.
6 years ago
Andrea Tartaglia a342538aba Add shell out checks (#41545)
* Added error codes for shell_out checks

* Added ignore lines for allowed Modules

* Added shell out checks

* Fixed pep8

* Updated regex to only match subprocess.Popen

* Added failing modules to ignore.txt

* Wrong postgresql module in ignore.txt

* Removed bigip from ignore.txt
6 years ago
Will Thames 50fe5dc090 Trim parameter documentation when generating docs (#38470)
While the HTML produced is perfectly valid, without the `trim` filter,
a lot of warnings are emitted (700 lines of warnings out of 2812 are
eliminated by this change)
6 years ago
Abhijeet Kasurde 27b85e732d Argument spec must be dict/hash (#40858)
validate-modules should fail when argument is not dict/hash.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Martz ee221859cd
Load role vars and defaults before parsing tasks (#40982)
* Load role vars and defaults before parsing tasks. Fixes #40163

* Add porting guide note

* Wording clarifications

* typo

* grammar fixes
6 years ago
zharalim d52ea9518d Update playbooks_filters.rst (#41628)
Add an example on how to use regexp_replace to modify list items.

+label: docsite_pr

Fix typo
6 years ago
Jon Dufresne bf304832ff Prefer readthedocs.io instead of readthedocs.org for doc links (#41537)
Read the Docs moved hosting to readthedocs.io instead of
readthedocs.org. Fix all links in the project.

For additional details, see:

https://blog.readthedocs.com/securing-subdomains/

> Starting today, Read the Docs will start hosting projects from
> subdomains on the domain readthedocs.io, instead of on
> readthedocs.org. This change addresses some security concerns around
> site cookies while hosting user generated data on the same domain as
> our dashboard.
6 years ago
Jon Dufresne dc7e50fa90 Update additional pypi.python.org URLs to pypi.org (#41373)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
6 years ago
Abhijeet Kasurde 01cdc22ac6
Add documentation around package dependencies (#41437)
Documented procedure to handle package dependencies required by
packages which are Ansible dependencies.

Fixes: #30732
Fixes: #16571

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jeff Geerling a4f49ed648 Fix typos in blocks documentation examples. (#41508) 6 years ago