Commit graph

254 commits

Author SHA1 Message Date
Matt Clay
9178e176b5 Limit sphinx version on python 2.6. (#24678)
* Limit sphinx version on python 2.6.
* Fix issues identified by rstcheck.
2017-05-17 01:00:15 +08:00
Abhijeet Kasurde
9f3a405706 Fix URLs in dev_guide documentation (#24533)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-15 13:23:46 +01:00
Matt Davis
0f4026d626 add Windows docs for winrm automatic kerb ticket mgmt (#24456) 2017-05-10 16:22:54 -07:00
Brian Coca
91449ea231 removed autogenerated file and added to ignore 2017-05-09 11:08:01 -04:00
James Cammarata
ed56f51f18 Fixing security issue with lookup returns not tainting the jinja2 environment
CVE-2017-7481

Lookup returns wrap the result in unsafe, however when used through the
standard templar engine, this does not result in the jinja2 environment being
marked as unsafe as a whole. This means the lookup result looses the unsafe
protection and may become simple unicode strings, which can result in bad
things being re-templated.

This also adds a global lookup param and cfg options for lookups to allow
unsafe returns, so users can force the previous (insecure) behavior.
2017-05-08 12:43:46 -05:00
Dylan Silva
6f4f7011f1 Updates to docs for developers (#24034)
- Added items to index for TOC
- Changed some formatting on overview_architecture
- removed some out of date items from developing_modules_general
2017-05-08 09:08:55 -07:00
Matt Clay
cec2b960f8 Fixes for pep8 and rstcheck issues. 2017-05-05 10:47:05 +08:00
scottb
02057f481b Added style guide (#24310)
* Added style guide

* Fixed index
2017-05-04 13:25:13 -07:00
Andrea Tartaglia
4e4fc9cb4c Added test for 'RETURN' field in validate-modules (#23322)
* Added test for 'RETURN' field in validate-modules

* print the field being tested.

Useful when the RETURN structure is complex.

* Fixed schema after CI traceback fail

* Fixed list_string_types

* Fixed line in 319 code for RETURN
2017-05-02 09:01:53 +01:00
Brian Coca
033fe5548b added epub entry for makefile 2017-05-01 13:41:04 -04:00
Dan Kolb
914f8e4596 Fixes minor type in docs (#24117)
Removes an extra `e` from the word `batch` in the the
`playbooks_delegation` documentation seen at:
http://docs.ansible.com/ansible/playbooks_delegation.html
2017-04-28 16:47:35 -04:00
John R Barker
8733253a76 Minor testing docs improvements (#24103)
Fix a few formatting issues spotted post review.
Also reapply missing commit
2017-04-28 11:58:38 +01:00
John R Barker
ecbf8e933a Docs how to test (2nd) (#24094)
* Big testing doc refactor
* Combine all the testing documentation in to one place to make it easier to find
* Convert everything to RST
* Create testing_network guide
* Create testing landing page
* For each section detail "how to run" and "how to extend testing"
* More examples
* Lots more detail
2017-04-28 09:08:26 +01:00
Strahinja Kustudic
66a41f59fd Add a missing leading zero in a mode parameter
600 is an incorrect mode, because mode needs to be octal.
2017-04-27 09:35:27 -07:00
Strahinja Kustudic
6dddd5b167 Remove action keyword from do-until example
`action:` is old and not needed any more.
2017-04-27 09:34:46 -07:00
Toshio Kuratomi
51e3390333 Document deprecation of fetch module validate_md5 and update --tags merging deprecation (#24022)
* Document deprecation of fetch module validate_md5 and update --tags merging deprecation

Update the default of --tags merging config option to merge by default

* Update CHANGELOG.md

Minor edit
2017-04-26 19:57:21 -07:00
scottb
946658cd24 Update playbooks_python_version.rst
Minor edits
2017-04-25 12:26:40 -07:00
Toshio Kuratomi
78dd3496e2 Update version and change remove files from pep8 blacklist 2017-04-25 12:26:40 -07:00
Toshio Kuratomi
82ad8ff081 Add documentation of Jinja2 templating idioms that differ when run under Python3
Fixes #19514
2017-04-25 12:26:40 -07:00
Toshio Kuratomi
4c7a2e2622 Enable intersphinx for python stdlib and jinja2
This setting allows us to reference jinja2 and python stdlib docs
via docutils refs instead of hardcoding urls.

Fixes #18039

Remove extraneous sphinx config
2017-04-25 12:26:40 -07:00
Strahinja Kustudic
74e385e43a Move include_vars to host scope (#23868)
* Move include_vars to host scope

Module include_vars actually sets variables on a host level, and not the play level.

* Expand vars entires
2017-04-24 09:14:47 -07:00
David Mahler
09b247dd34 Minor grammatical corrections and improvements (#23886) 2017-04-23 00:47:03 -07:00
Brian Coca
3358abcf49 Add a new filter: strftime. Use the well known function to format a date output. (#23832)
(cherry picked from commit 3f5b304fc2)
rebased for @yannig
2017-04-21 11:48:45 -07:00
Eric Anderson
6aab341248 changed code block formatting to match format (#23615) 2017-04-20 10:12:58 -07:00
Adam Johnson
f1c4b434cd Tidy example inventories in "Developing Dynamic Inventory Sources" (#18758)
Thanks @adamchainz!
2017-04-20 09:36:16 -07:00
Tomáš Karásek
0b585ec4fd Add guide for Packet host (#21346)
* Add guide for Packet host

* incorporate feedback from Packet

* Format headings according to Python doc guide

* fixed rstcheck issues in packet guide
2017-04-20 14:57:34 +01:00
Alexander Gubin
d04a5246de Fix example fact(ansible_default_ipv4.address) for delegated_facts 2017-04-19 10:59:59 -07:00
John R Barker
33d7c12a97 Improve network debug wording (#23735) 2017-04-19 12:20:07 +01:00
Ian Levesque
acd1dd8df1 Add ssh_connection / retries option documentation (#23463)
No docs were included when https://github.com/ansible/ansible/pull/9927 was merged.
2017-04-18 17:06:51 -07:00
Dag Wieers
d188f56535 Add example task succeeding when RC is non-zero (#23698)
* Add example task succeeding when RC is non-zero

I added an example on how to use the return code to decide yourself
what is considered a failure.

This might have helped for #23679.

* Use diff as example command, instead of robocopy
2017-04-18 14:17:52 +00:00
Scott Butler
087159c4cd Switch Adobe tracking off staging. 2017-04-17 13:36:31 -07:00
Dag Wieers
b6c00f722b Windows: Add Windows Subsystem for Linux documentation (#23515)
* Windows: Add Windows Subsystem for Linux documentation

As discussed during the Windows Working Group meeting we do want
documentation on running Ansible on Windows as it may help grow
the Windows/Ansible community and does work out-of-the-box.

However we do take care to emphasize that WSL is not fit for
production use.

* Update intro_windows.rst

Edits for mechanics and clarity.
2017-04-13 11:22:40 -07:00
Matt Clay
cb1f57d4e5 Add rstcheck to ansible-test and correct issues. (#23550)
* Add rstcheck to ansible-test.
* Fix rst code-block languages and syntax errors.
* Fix rst inline literals.
* Update python 2 code block to pass tests on py 3.
2017-04-13 10:28:52 -07:00
John R Barker
729b0e3bee Use exports (#23542) 2017-04-12 16:03:31 -04:00
Brett Cannon
ece2aa2d5f Fix reST markup (#23536) 2017-04-12 13:49:26 -04:00
John R Barker
e575eae2ec Document how to debug network issues (#23503) 2017-04-11 20:35:21 +01:00
Brian Coca
eaaf46a50d Revert "made example not fail"
This reverts commit 2c9543e0b7.

example won't fail but will prevent correct PATH from being set
using actual fix to deal with this corner case
2017-04-10 12:17:19 -04:00
cclauss
6314169afd Update the comments around Python 3
[Enterprise Linux 5 is at the end of "End of Production 3 phase"](https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Product_life_cycle) so that is no longer a reasonable reason to wait.  Also removed the comments about [Python 3 not being mainstream](http://python3wos.mybluemix.net/201).  Perhaps a link to https://docs.ansible.com/ansible/python_3_support.html would also be a useful addition to this question.
2017-04-07 15:20:04 -07:00
John R Barker
01e27b1083 Typo 2017-04-04 19:40:41 +01:00
Toshio Kuratomi
3180b4757e The Python3 dev doc is more general than just modules (#22950)
The Python3 dev doc is more general than just modules

* Rename it to make that obvious.
* Move generally applicable Python3 information to the Controller section
* Add a Py3/Py2 section on formatting strings
* Fix code-blocks to highlight as python
* Enhance python3 support page
* Add Python3/Python2 compat note
2017-04-04 11:18:19 -07:00
Matt Davis
d85f4a443f mark runas become method experimental (#23235)
Due to the number of "real world" caveats in the current runas become method, it was agreed that we'd warn that it's experimental on use. A potential future version based on LogonUser/CreateProcessAsUser will have very different requirements and limitations.
2017-04-03 13:46:51 -07:00
Brian Coca
2c9543e0b7 made example not fail
fixes #23180
2017-03-31 15:44:15 -04:00
Scott Butler
5591d639f5 Fixed broken link. 2017-03-31 11:17:53 -07:00
Brian Coca
06e0b00035 fixed notation on entries, meant literal not italic 2017-03-31 13:23:30 -04:00
Brian Coca
42383656e7 using prefered format
(cherry picked from commit a78a0caf10e08200ef3dc82c4b78feeecef0d063)
2017-03-31 00:53:53 -04:00
John R Barker
22fe148ca5 Formatting of bullet points 2017-03-30 18:50:29 +01:00
Jerry Wardlow
8f4652ab2f Corrects typo in inventory_ignore_extensions (#23099)
Corrects a typo from 'Coma-separated' to 'Comma-separated'
2017-03-29 20:16:14 -07:00
John Nelson
99a160f9c7 Update playbooks_prompts.rst (#22910)
* Update playbooks_prompts.rst

Clarify prompting only occurs when not in extra_vars

* Update playbooks_prompts.rst

* Update playbooks_prompts.rst

Added non-interactive session clarification.

* Update playbooks_prompts.rst
2017-03-29 20:14:43 -07:00
Konstantin Suvorov
c1b3d6a51f Fix 'sequence' lookup shortcut syntax and documentation (#22989)
* fix 'sequence' lookup shortcut syntax and documentation

* Update playbooks_loops.rst

Minor edits for grammar and clarity.

* Update playbooks_loops.rst

Another tweak for clarity.
2017-03-29 19:11:19 -04:00
John R Barker
6c101087ac RST Code should be `--tags` fixes 22717 (#23074) 2017-03-29 14:21:15 +01:00
Dylan Silva
24e7a77a32 Updated 2.4 roadmap for final publish (#23049)
* Updated 2.4 roadmap for final publish

* Update ROADMAP_2_4.rst

* Remove "code refactor and unit tests"

This is just technical debt work, and not note-worthy for the roadmap

* Update ROADMAP_2_4.rst

* Update ROADMAP_2_4.rst
2017-03-28 15:53:43 -07:00
Chris Houseknecht
d2ea851d09 Adds k8s_common.py (#22899) 2017-03-28 02:27:28 +02:00
Brian Coca
424e1946f4 moved docs generation and templates to docs/ 2017-03-24 15:52:36 -04:00
Toshio Kuratomi
2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
2017-03-23 13:35:05 -07:00
scottb
fb48c45adf Added Adobe DTM tracking. (#22889) 2017-03-22 19:37:01 -07:00
Brian Coca
a04dd375eb adjusted home examples to actual value 2017-03-22 15:33:12 -04:00
Brian Coca
a36c66023f updated remote_tmp example 2017-03-22 15:33:12 -04:00
Brian Coca
a1a5a2b1de fixed passwordstore lookup examples
plugin was renamed before acceptance, but examples kept original name
fixes #22735
2017-03-21 15:26:55 -04:00
Dag Wieers
c254618d4f Improve test docs a bit more 2017-03-20 16:54:34 -07:00
Brian Coca
94b269b2ec documented some more keywords 2017-03-20 16:07:27 -04:00
Benjamin
dc68503ef2 Update link URL to OpenStack documentation (#22776) 2017-03-19 19:38:27 -07:00
Bradford Dabbs
2472a4587e Flip setenforce boolean (#22752)
* Flip setenforce boolean

* Update example task name
2017-03-17 22:18:48 -07:00
René Moser
b90517caf9 cloudstack: implement config overloading and ENV vars for API auth (#22724)
* cloudstack: fix connection by ENV vars and configs overloading

* cloudstack: pep8 cloudstack module_utils

* cloudstack: allow api_url to be set in ini config

* docsite: explain ENV vars support as written in python-cs for ansible
2017-03-17 11:01:43 +01:00
Toshio Kuratomi
8de05d3752 [WIP] Documentation: Ansible-2.4 no longer supports Python-2.4 and Python-2.5 (#22721)
* Documentation: Ansible-2.4 no longer supports Python-2.4 and Python-2.5
* Switched to bullet points to enhance readability.
2017-03-16 18:49:29 -07:00
jwg4
17b8bfc7a2 Change the example of playbook include. (#22697)
This (taken from https://github.com/ansible/ansible-examples/blob/master/language_features/nested_playbooks.yml) is a better example. It makes it clear that the full file name is used, and a single filename, as opposed to a YAML list. The old version, it was not clear if 'list_of_plays' was an *example* or a *variable*.
2017-03-16 11:54:27 -07:00
Brian Coca
001be55ef0 corrected with_dict example
fixes #17636
2017-03-16 10:13:51 -04:00
Brian Coca
dd8d699981 namespace facts (#18445)
* namespace facts

always namespace facts, make the polluting of 'main' conditional on config

* updated to 2.4

* Update intro_configuration.rst
2017-03-15 17:12:16 -07:00
Dylan Silva
9dae697997 Updates to docs for metadata. (#22667)
* Updates to docs for metadata.

* Update developing_modules_documenting.rst
2017-03-15 15:34:00 -07:00
Brian Coca
0c44959800 added new tests any and all (#22665)
* added new tests any and all

* updated code names
2017-03-15 18:09:25 -04:00
Brian Coca
b059a95714 2nd draft 2017-03-15 15:32:30 -04:00
Brian Coca
7cf16588e8 draft playbook path docs 2017-03-15 15:32:30 -04:00
Brian Coca
b606bcec04 Doc directives (#22524)
* draft docs for directives

* updated to document directives
2017-03-15 11:29:58 -04:00
Toshio Kuratomi
eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
John R Barker
04e816e13b Stricter module documentation validation (#22353)
Raise the bar for module `DOCUMENTAION`
This validator update was used to find the issues in https://github.com/ansible/ansible/pull/22297/files

**Validation**
* Updated Validation and docs to enforce more (items fixed in https://github.com/ansible/ansible/pull/22297/files)
* Use `suboptions` to document complex options 
* Validate module name
* Validate deprecated modules have correct ANSIBLE_METADATA

**Module Documentation Generation**
* Document `suboptions:` Example https://gist.github.com/gundalow/4bdc3669d696268328ccc18528cc6718
* Tidy up HTML generation (valid HTML, no empty lists, etc)
 
**Documentation**
* Clarify the steps for deprecating a module
* Use correct RST headings
* Document `suboptions:` (options)
* Document `contains:` (returns)


**Details**
The aim is to get this (and corresponding module updates) complete by the time `devel` becomes `2.4`, as this allows us to raise the bar for new modules

Example `suboptions` https://gist.github.com/gundalow/4bdc3669d696268328ccc18528cc6718

The aim is to get this PR integrated into `devel` *before* we branch `stable-2.3`, this will allows us to:
* Raise the bar for new modules in 2.4
* Ensure the generated module documentation for 2.3 and higher is improved, important as we will be doing versioned docs moving forward.
2017-03-13 19:49:27 +00:00
Jason McKerr
1132f17d2c Update ROADMAP_2_3.rst 2017-03-13 14:01:14 -04:00
Artem Zinenko
990aa73ed8 Fix bug in 'Building A Simple Module' doc (#22447) 2017-03-10 08:43:45 -05:00
Ryan Brown
000ca2a2bc Update roadmap for Amazon Modules 2017-03-09 10:37:55 -05:00
fhiyo
0f82674c0e Add document about connecting to localhost (#20534)
* Add document about connecting to localhost

* Update intro_getting_started.rst

* Update intro_getting_started.rst

Edited.

* Added description about ansible_python_interpreter
2017-03-08 19:45:23 -08:00
John R Barker
3fa5c55182 Fix docs type (#22405)
Fix docs typo
2017-03-08 13:42:42 +00:00
Brian Coca
71c7220e45 fixed ungrouped definition 2017-03-07 12:50:35 -05:00
Aric Renzo
96538ec158 Standardizing syntax for 'Playbook Loops' documentation (#20863) 2017-03-06 14:39:07 -08:00
John R Barker
3afb67e9b2 Fix Docs build issues (#22295)
* restore network docs fragments

* Fix RST errors

* code-block formatting
2017-03-05 11:41:29 +00:00
Chris Tooley
6c2585f0c8 Add some additional value quoting examples (#20464)
The existing examples in the "Gotchas" section were rather simple. Expanded upon those to add some additional clarity around how the quoting in YAML works.
2017-03-05 01:27:54 -08:00
Joona Somerkivi
df07866e8f Added example of referring to AWS-credentials (#21560)
* Added example of referring to AWS-credentials

.. when they're stored in variables. Spent few hours trying to figure out why credentials from vault/variables were not used.

* Update guide_aws.rst

Edited for grammar.
2017-03-05 01:25:39 -08:00
Pilou
addedb12cf Inventory default groups 'all' and 'ungrouped': add tests and documentation (#21728)
* inventory: test 'all' & 'ungrouped' groups created by default

* Mention default groups 'all' & 'ungrouped'

* Update intro_inventory.rst

Minor grammatical edit.
2017-03-05 01:24:41 -08:00
Adam Johnson
d01ac3a019 doc: Document --syntax-check flag for ansible-playbook (#22256)
It wasn't previously documented outside of the help / manpage, which made it less discoverable.
2017-03-04 11:11:41 -08:00
Marko Stanković
10125d520d Improve YAMLSyntax/Gotchas (#21575)
* Improve YAMLSyntax/Gotchas

Colons don't need to be quoted unless when followed by a space or the end of the line

* Update YAMLSyntax.rst

Minor edit.
2017-03-03 12:49:03 -08:00
Jeff Gibson
5cccb7a5d7 ansible_winrm_kerberos_delegation (#22113)
Add a note of how to turn on delegation when using kerberos.
2017-03-03 09:51:40 +00:00
Alan Rominger
d542f069ef Update dead support link (#22212)
* Update dead support link

Visit https://www.ansible.com/, and you'll find the support link points to this URL, https://access.redhat.com/products/ansible-tower-red-hat/.

The current link is a dead link.

* update github code blocks link
2017-03-02 23:29:19 -08:00
Mark Janssen
73a7483803 Update documentation for passwordstore lookup (#21448)
* Update documentation for passwordstore lookup

* Style fixes

* Style fixes

* Reword introduction text

* Update playbooks_lookups.rst

Minor tweaks.
2017-03-02 22:23:49 -08:00
Andrea Tartaglia
10a260c622 Clarified when control_path is ignored (#20968) 2017-03-02 22:22:33 -08:00
Chris Alfonso
b2a10e6e4b Bumping docs footer copyright year (#22210) 2017-03-02 22:15:19 -08:00
James Cammarata
a2599cab79 Fix variable precedence of INI/script vars to be in-line with docs.
This commit also adds a new test script (ansible-var-precedence-check.py in code-smell/)
to provide us with another line of defense against precedence bugs going forward.

The precedence docs state that the INI vars have a lower precedence than group/host
vars files for inventory and playbooks, however that has not been the case since 2.0
was released. This change fixes that in one way, though not exactly as the docs say.
The rules are:

1) INI/script < inventory dir < playbook dir
2) "all" group vars < other group_vars < host_vars

So the new order will be (from the test script mentioned above):

8. pb_host_vars_file - var in playbook/host_vars/host
9. ini_host_vars_file - var in inventory/host_vars/host
10. ini_host - host var inside the ini
11. pb_group_vars_file_child - var in playbook/group_vars/child
12. ini_group_vars_file_child - var in inventory/group_vars/child
13. pb_group_vars_file_parent - var in playbook/group_vars/parent
14. ini_group_vars_file_parent - var in inventory/group_vars/parent
15. pb_group_vars_file_all - var in playbook/group_vars/all
16. ini_group_vars_file_all - var in inventory/group_vars/all
17. ini_child - child group var inside the ini
18. ini_parent - parent group var inside the ini
19. ini_all - all group var inside the ini

Fixes #21845
2017-03-02 17:07:00 -06:00
Dag Wieers
98b978d1d1 Clarify what modules are available for Windows (#21888)
Remove repeated mentions of an incorrect list.

This fixes #20696
2017-03-01 22:09:10 -08:00
Matt Davis
c98647ccf8 initial commit of win_domain module (#22179) 2017-03-01 17:49:15 -08:00
azenk
bdf0ab451e Add role skeleton support (#17079)
* Add role skeleton support

The default role skeleton used by ansible-galaxy is good, but it doesn't
allow organizations to customize it to suit their needs.  This patch
addresses that by adding the option to point ansible-galaxy at a
role skeleton directory.  The contents of this directory are then
copied (or rendered) into the output role directory.  Appropriate
command line options and configuration entries are added to allow for
further customization from the role skeleton.

* Remove dependency on platforms list from test

Platforms are no longer provided to the template by galaxy init.
Removing the code in our test meta/main.yml template that relied on it.

* Fix whitespace issue
2017-03-01 20:23:18 -05:00
scottb
0bd2714122 Update playbooks_variables.rst
Minor edits
2017-03-01 13:18:12 -05:00
Brian Coca
cf3edf0989 more examples and clearer override docs for conn
fixes #21866
2017-03-01 13:18:12 -05:00
Micah Abbott
6ea4e9f17f docks: add missing colon character
Without the missing colon character, the code block that followed
wasn't rendering properly.

Signed-off-by: Micah Abbott <miabbott@redhat.com>
2017-03-01 08:26:30 -08:00
Brian Coca
bfb3467d52 more set/list stuff 2017-02-28 10:44:20 -05:00