Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend win_psmodule #46516

Closed
wants to merge 130 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
ebe553d
The code reformated
it-praktyk Jul 17, 2018
d3e14b8
Extend win_psmodule
it-praktyk Oct 4, 2018
d795c63
Correction of documentation
it-praktyk Oct 5, 2018
38e5305
Correction of tests
it-praktyk Oct 9, 2018
f4a2db3
Post-review updates and improvements
it-praktyk Nov 18, 2018
3d4a67d
Update NuGet provider at the begining of tests
it-praktyk Nov 18, 2018
ee70f07
Correct how/when prerequisites modules are installed
it-praktyk Nov 18, 2018
3b381ed
Correct tests to be compatible with CI
it-praktyk Nov 18, 2018
cbf5a43
Correct uninstalling many version, update tests
it-praktyk Nov 18, 2018
99082d2
Remove output, extend and correct tests
it-praktyk Nov 22, 2018
f1cb668
Correct check_mode
it-praktyk Nov 25, 2018
f49f11b
Add integration tests for the check_mode
it-praktyk Nov 25, 2018
c73a0cf
Correct installing/updating NuGet
it-praktyk Nov 25, 2018
0b2b72a
Use a hash table instead of a psobject
it-praktyk Dec 7, 2018
f5f3305
Reproduces changes from 26474c690263eb7ecda454aec07129e3303b637f
it-praktyk Dec 30, 2018
78d7629
Change tests due to that Pester is digitally signed now.
it-praktyk Dec 30, 2018
4a95818
Revert changes to the output and the add/remove repository
it-praktyk Dec 30, 2018
01c03e7
Reintroduce the older version of integration tests
it-praktyk Dec 30, 2018
414861f
Change initial requirements
it-praktyk Dec 30, 2018
eac35c6
Temporarily disable mysql_variables (#50403)
Akasurde Dec 31, 2018
507f89e
Pure Storage facts fix (#50349)
sdodsley Dec 31, 2018
2988c9b
Change structure of the integration tests
it-praktyk Dec 31, 2018
d4a2a19
Uncomment tests
it-praktyk Dec 31, 2018
e761ea3
vultr_server: fix multiple ssh keys not handled (#50337)
resmo Jan 1, 2019
26e3240
docker_secret, docker_config: allow to base64-decode data (#49688)
felixfontein Jan 1, 2019
338dfae
Disable zabbix_host 50386 (#50427)
gundalow Jan 1, 2019
14129b0
rename force to force_delete_nonempty (#50290)
yuwzho Jan 2, 2019
d556d27
Added Ansible UTM Module for managing reverse proxy location entries
MatrixCrawler Dec 13, 2018
e52b6c8
- Fix sanity checks
Dec 13, 2018
617e20e
Added Ansible UTM Module for managing reverse proxy frontend entries
MatrixCrawler Dec 13, 2018
d3865a0
- Fix sanity checks
Dec 13, 2018
deba5f0
Added Ansible UTM Module for managing reverse proxy auth profile entr…
stearz Dec 13, 2018
e2f6598
- Fix sanity checks
Dec 13, 2018
23706db
Add support for NRDP notifications (#39297)
rverchere Jan 2, 2019
69deb73
Fix firewalld module failing on missing protocol. (#50242)
ericzolf Jan 2, 2019
4d6807a
uses correct highlighting (#50457)
acozine Jan 2, 2019
78e81b2
fixed a bug in transform_name (#50213)
wojtek0806 Jan 2, 2019
3ef71e5
added new module to manipulate signatre sets on ASM policy (#50209)
wojtek0806 Jan 2, 2019
4c473ec
Sort suboptions and subresults in docs. (#50315)
felixfontein Jan 2, 2019
ca08488
fix order of dnf api operations so transactions don't fail (#50038)
maxamillion Jan 2, 2019
b81a74f
add changelog for #50242 (#50480)
maxamillion Jan 2, 2019
d810acf
Add support for Kali Linux detection. (#50331)
jbenden Jan 3, 2019
4dd2b8e
disable docker_network ipam tests (#50477)
smueller18 Jan 3, 2019
6b33c58
docker_swarm_service: Fix typo for option type (#50483)
felixfontein Jan 3, 2019
a5bf71a
openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
felixfontein Jan 3, 2019
5c5cd2d
openssl_*: prevent error when path includes no path (#50322)
felixfontein Jan 3, 2019
e295315
add openssh_cert module (#49605)
lolcube Jan 3, 2019
df93e08
Add choices of the state parameter documentation (#50481)
it-praktyk Jan 3, 2019
362e603
ovirt_host: Improve failed upgrade check (#50489)
machacekondra Jan 3, 2019
0a56a22
Update playbooks_loops.rst (#50437)
fretis Jan 3, 2019
a45063d
Update changed_when and failed_when examples (#50411)
Akasurde Jan 3, 2019
ae404d1
gcp: documentation update (#50183)
Akasurde Jan 3, 2019
ff4af61
Update zabbix_action.py (#50490)
richlv Jan 3, 2019
5a8aa7c
Fixes #37209 - Added complex return value, instance (#49989)
Jan 3, 2019
9657a21
Docs: add Pygments lexer for Ansible output (#50318)
felixfontein Jan 3, 2019
f80ce60
Make WinRM security warning more explicit (#50263)
Jan 3, 2019
d863027
Windows: Add missing parameter types and doc fixes (#50232)
dagwieers Jan 3, 2019
04a9a88
allow for vault enterprise namespaces (#50462)
drewmullen Jan 3, 2019
d9ae906
Add galaxy.html#dependencies link (#49984)
jdorel Jan 3, 2019
d21ed42
Add unstable alias to s3_bucket integration tests (#50508)
s-hertel Jan 3, 2019
63e454a
dnf - fix conf_file loading (#50515)
jborean93 Jan 3, 2019
6620fac
ansible test: re-enable mysql tests with fix (#50430)
jborean93 Jan 3, 2019
3b49bbc
Give IncludedFile more context via ansible_search_path (#50045)
sivel Jan 3, 2019
f45c41e
urldecode filter for Jinja2 (#28503)
dagwieers Jan 3, 2019
f90ec17
ACI: Implement encoded query_string (#50358)
dagwieers Jan 3, 2019
79dc9a7
ansible-test: docker_network set as untable (#50526)
jborean93 Jan 4, 2019
5844c8c
Cleanups to the common.sys_info API
abadger Dec 31, 2018
c18da65
Add a CLIArgs Singleton class that will hold the parse cli arguments
abadger Dec 18, 2018
afdbb0d
Save the command line arguments into a global context
abadger Dec 18, 2018
7e92ff8
Split up the base_parser function
abadger Dec 19, 2018
ed8e60d
Cleanups and fixes to cli
abadger Dec 20, 2018
27c7d5b
Move the arguments module into cli/ and context_objects into utils
abadger Dec 20, 2018
73ffe68
Update documentation for mysql_db notes (#50444)
richlv Jan 4, 2019
bc6cd13
Handle exception raised in recursive_finder API (#49590)
Akasurde Jan 4, 2019
189fcb3
Added new module to support NIOS Fixedaddress DHCP property (#49119)
justjais Jan 4, 2019
15fb9d3
Fix lastpass lookup error
arnested Dec 19, 2018
06f0cde
remove forced lowercase on group_name (#50445)
Jan 4, 2019
83da2de
azure_rm_webapp: fix updating app settings (#49181)
yungezz Jan 4, 2019
8f55e81
Correct Errors in Documentation (#50507)
unrinfosec Jan 4, 2019
71113ee
Fix backup issue in network config modules and network action plugins…
ganeshrn Jan 4, 2019
9762185
add privileged role validation for nxos become (#50312)
trishnaguha Jan 4, 2019
555732f
Fix junos terminal error regex (#50538)
ganeshrn Jan 4, 2019
b967f4d
dnf/yum - added install_weak_deps option (#50525)
jborean93 Jan 4, 2019
40e7c7a
Add a porting guide entry for ansible_distribution facts (#50251)
abadger Jan 4, 2019
8b12145
adds apm policy fetch module (#50534)
wojtek0806 Jan 4, 2019
7362c1d
Changes exists() method logic in asm policy fetch, corrects documenta…
wojtek0806 Jan 4, 2019
4648a44
adds bigip apm policy import (#50559)
wojtek0806 Jan 4, 2019
96f7cf3
Corrects doc strings in bigip_asm_policy_* modules (#50561)
wojtek0806 Jan 4, 2019
9abeecb
Add new AnsibleTemplateError to more easily catch templating issues (…
sivel Jan 4, 2019
bb77bc5
module_utils/urls.py is core (#50567)
sivel Jan 4, 2019
fc6d85e
new module: Configure LVM and NFS file systems for AIX (#30810)
kairoaraujo Jan 5, 2019
9093ca1
Improve style and fix typos in the Zabbix module titles and descripti…
richlv Jan 6, 2019
9693a55
(action/script) Fix windows absolute path detection when executing po…
spoyd Jan 6, 2019
a1e1a42
Pluribus Networks module for connection stat settings with UT's (#50186)
rajaspachipulusu17 Jan 7, 2019
98b0ef3
adding module azure_rm_virtualmachinescalesetinstance_facts (#50440)
Jan 7, 2019
82c95e0
Fix searchpath in the template lookup (#50488)
mkrizek Jan 7, 2019
f907927
Checkpoint httpapi plugin (#49929)
rcarrillocruz Jan 7, 2019
6d604f9
Allow for vaulted templates in template lookup (#49819)
mkrizek Jan 7, 2019
2d89010
raw is transport-agnostic
dagwieers Jan 7, 2019
eb4249c
Fix for the new 2.8 feature to have modprobe check for builtins.
abadger Jan 2, 2019
1d3d6a3
archive: Fix check if archive is created in path to be removed (#29420)
Dec 3, 2018
27f9c3f
Clarify the change made to reverse_inventory
abadger Jan 7, 2019
19d7197
Copy detailed logging to persistent.py so local can benefit, too. (#5…
Qalthos Jan 7, 2019
1009888
xml: Improve documentation and examples (#50602)
dagwieers Jan 7, 2019
618caf2
add env variable VAULT_AUTH_METHOD (#50572)
devjatkin Jan 7, 2019
287cac9
Make the module and integration tests compatible with PowerShell >= 3.x
it-praktyk Jan 7, 2019
feddab0
The code reformated
it-praktyk Jul 17, 2018
23ae082
Extend win_psmodule
it-praktyk Oct 4, 2018
51d0a1d
Correction of documentation
it-praktyk Oct 5, 2018
b9ee858
Correction of tests
it-praktyk Oct 9, 2018
dbc6e9c
Post-review updates and improvements
it-praktyk Nov 18, 2018
36c4a63
Update NuGet provider at the begining of tests
it-praktyk Nov 18, 2018
32e32c4
Correct how/when prerequisites modules are installed
it-praktyk Nov 18, 2018
f13f179
Correct tests to be compatible with CI
it-praktyk Nov 18, 2018
2b6b3ea
Correct uninstalling many version, update tests
it-praktyk Nov 18, 2018
7af5621
Remove output, extend and correct tests
it-praktyk Nov 22, 2018
92f117c
Correct check_mode
it-praktyk Nov 25, 2018
6dd13af
Add integration tests for the check_mode
it-praktyk Nov 25, 2018
9d2faa6
Correct installing/updating NuGet
it-praktyk Nov 25, 2018
9f5f5d0
Use a hash table instead of a psobject
it-praktyk Dec 7, 2018
6983c4d
Reproduces changes from 26474c690263eb7ecda454aec07129e3303b637f
it-praktyk Dec 30, 2018
882497a
Change tests due to that Pester is digitally signed now.
it-praktyk Dec 30, 2018
e1a16ee
Revert changes to the output and the add/remove repository
it-praktyk Dec 30, 2018
a59aa91
Reintroduce the older version of integration tests
it-praktyk Dec 30, 2018
28aac7b
Change initial requirements
it-praktyk Dec 30, 2018
b15f038
Change structure of the integration tests
it-praktyk Dec 31, 2018
026f386
Uncomment tests
it-praktyk Dec 31, 2018
0f6da4e
Make the module and integration tests compatible with PowerShell >= 3.x
it-praktyk Jan 7, 2019
de02585
Reproduces changes from d8630271598c4014e224348416cf229f2f31fdf7
it-praktyk Jan 7, 2019
748cfa0
Resolve post-rebasing conflicts
it-praktyk Jan 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions .github/BOTMETA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,34 @@ files:
maintainers: resmo felixfontein
$module_utils/basic.py:
support: core
$module_utils/urls.py:
support: core
$module_utils/six:
support: core
$module_utils/common:
support: core
$module_utils/compat:
support: core
$module_utils/_text.py:
support: core
$module_utils/parsing:
support: core
$module_utils/splitter.py:
support: core
$module_utils/yumdnf.py:
support: core
$module_utils/ansible_release.py:
support: core
$module_utils/distro:
support: core
$module_utils/ismount.py:
support: core
$module_utils/json_utils.py:
support: core
$module_utils/pycompat24.py:
support: core
$module_utils/service.py:
support: core
$module_utils/cloudstack.py:
maintainers: $team_cloudstack
labels: cloudstack
Expand Down
6 changes: 3 additions & 3 deletions bin/ansible
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import shutil
import sys
import traceback

from ansible import context
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
from ansible.module_utils._text import to_text

Expand Down Expand Up @@ -106,7 +107,6 @@ if __name__ == '__main__':
exit_code = 6
else:
cli = mycli(args)
cli.parse()
exit_code = cli.run()

except AnsibleOptionsError as e:
Expand Down Expand Up @@ -134,9 +134,9 @@ if __name__ == '__main__':
# Show raw stacktraces in debug mode, It also allow pdb to
# enter post mortem mode.
raise
have_cli_options = cli is not None and cli.options is not None
have_cli_options = bool(context.CLIARGS)
display.error("Unexpected Exception, this is probably a bug: %s" % to_text(e), wrap_text=False)
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
if not have_cli_options or have_cli_options and context.CLIARGS['verbosity'] > 2:
log_only = False
if hasattr(e, 'orig_exc'):
display.vvv('\nexception type: %s' % to_text(type(e.orig_exc)))
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/34209-template-lookup-vault-support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Allow for vaulted templates in template lookup (https://github.com/ansible/ansible/issues/34209)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- "docker_secret - ``data`` can now accept Base64-encoded data via the new ``data_is_b64`` option.
This allows to pass binary data or JSON data in unmodified form. (https://github.com/ansible/ansible/issues/35119)"
2 changes: 2 additions & 0 deletions changelogs/fragments/50322-openssl-path-error.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "openssl_* - fix error when ``path`` contains a file name without path."
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vultr_server - fixed multiple ssh keys were not handled.
2 changes: 2 additions & 0 deletions changelogs/fragments/50361-openssl_csr-idempotency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "openssl_csr - fix problem with idempotency of keyUsage option."
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "docker_swarm_service - fixing wrong option type for ``update_order`` which prevented using that option."
3 changes: 3 additions & 0 deletions changelogs/fragments/ansible-template-error.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- Add new ``AnsibleTemplateError`` that various templating related exceptions inherit from,
making it easier to catch them without enumerating. (https://github.com/ansible/ansible/issues/50154)
2 changes: 2 additions & 0 deletions changelogs/fragments/change_failed_when_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Add examples in documentation to explain how to handle multiple conditions in changed_when and failed_when.
6 changes: 6 additions & 0 deletions changelogs/fragments/cli-refactor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
minor_changes:
- Refactored the CLI code to parse the CLI arguments and then save them into
a non-mutatable global singleton. This should make it easier to modify.
- Removed the private ``_options`` attribute of ``CallbackBase``. See the porting
guide if you need access to the command line arguments in a callback plugin.
2 changes: 2 additions & 0 deletions changelogs/fragments/dnf-conf-file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- dnf - fix issue where ``conf_file`` was not being loaded properly
2 changes: 2 additions & 0 deletions changelogs/fragments/dnf-ignore-weak-deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- dnf - added the module option ``install_weak_deps`` to control whether DNF will install weak dependencies
3 changes: 3 additions & 0 deletions changelogs/fragments/dnf-update-cache-broken-transaction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- "dnf - fix update_cache combined with install operation to not cause dnf transaction failure"
2 changes: 2 additions & 0 deletions changelogs/fragments/firewalld-missing-port-protocol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- fix handling of firewalld port if protocol is missing
3 changes: 3 additions & 0 deletions changelogs/fragments/include_tasks_parent_templating.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- include_tasks - Ensure we give IncludedFile the same context as TaskExecutor when templating the parent include path
allowing for lookups in the included file path (https://github.com/ansible/ansible/issues/49969)
6 changes: 4 additions & 2 deletions changelogs/fragments/platform-dist-to-nir0s-distro.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
minor_changes:
- Python-3.8 removes platform.dist() from the standard library. To maintain
compatibility we've switched to an alternative library, nir0s/distro to
detect the distribution for fact gathering.
compatibility we've switched to an alternative library, nir0s/distro, to
detect the distribution for fact gathering. Distributions facts may change
slightly as nir0s/distro has bugfixes which the standard library's
platform.dist() has lacked.
2 changes: 0 additions & 2 deletions changelogs/fragments/playbook-order-py3.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions changelogs/fragments/playbook-order-reverse_inventory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- host execution order - Fix ``reverse_inventory`` not to change the order of
the items before reversing on python2 and to not backtrace on python3
3 changes: 3 additions & 0 deletions changelogs/fragments/pure_facts_fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- purefa_facts and purefb_facts now correctly adds facts into main ansible_fact dictionary (https://github.com/ansible/ansible/pull/50349)
2 changes: 2 additions & 0 deletions changelogs/fragments/template-lookup-searchpath-fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Fix searchpath in the template lookup to work the same way as in the template module.
125 changes: 122 additions & 3 deletions docs/docsite/_extensions/pygments_lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Copyright 2006-2017 by the Pygments team, see AUTHORS at
# https://bitbucket.org/birkenfeld/pygments-main/raw/7941677dc77d4f2bf0bbd6140ade85a9454b8b80/AUTHORS
# Copyright by Kirill Simonov (original author of YAML lexer).
# Copyright by Norman Richards (original author of JSON lexer).
#
# Licensed under BSD license:
#
Expand Down Expand Up @@ -35,8 +36,8 @@

from __future__ import absolute_import, print_function

from pygments.lexer import LexerContext, ExtendedRegexLexer, DelegatingLexer, bygroups, include
from pygments.lexers import DjangoLexer
from pygments.lexer import LexerContext, ExtendedRegexLexer, DelegatingLexer, RegexLexer, bygroups, include
from pygments.lexers import DjangoLexer, DiffLexer
from pygments import token


Expand Down Expand Up @@ -476,6 +477,124 @@ def __init__(self, **options):
super(AnsibleYamlJinjaLexer, self).__init__(AnsibleYamlLexer, DjangoLexer, **options)


class AnsibleOutputPrimaryLexer(RegexLexer):
name = 'Ansible-output-primary'

# The following definitions are borrowed from Pygment's JSON lexer.
# It has been originally authored by Norman Richards.

# integer part of a number
int_part = r'-?(0|[1-9]\d*)'

# fractional part of a number
frac_part = r'\.\d+'

# exponential part of a number
exp_part = r'[eE](\+|-)?\d+'

tokens = {
# #########################################
# # BEGIN: states from JSON lexer #########
# #########################################
'whitespace': [
(r'\s+', token.Text),
],

# represents a simple terminal value
'simplevalue': [
(r'(true|false|null)\b', token.Keyword.Constant),
(('%(int_part)s(%(frac_part)s%(exp_part)s|'
'%(exp_part)s|%(frac_part)s)') % vars(),
token.Number.Float),
(int_part, token.Number.Integer),
(r'"(\\\\|\\"|[^"])*"', token.String),
],


# the right hand side of an object, after the attribute name
'objectattribute': [
include('value'),
(r':', token.Punctuation),
# comma terminates the attribute but expects more
(r',', token.Punctuation, '#pop'),
# a closing bracket terminates the entire object, so pop twice
(r'\}', token.Punctuation, '#pop:2'),
],

# a json object - { attr, attr, ... }
'objectvalue': [
include('whitespace'),
(r'"(\\\\|\\"|[^"])*"', token.Name.Tag, 'objectattribute'),
(r'\}', token.Punctuation, '#pop'),
],

# json array - [ value, value, ... }
'arrayvalue': [
include('whitespace'),
include('value'),
(r',', token.Punctuation),
(r'\]', token.Punctuation, '#pop'),
],

# a json value - either a simple value or a complex value (object or array)
'value': [
include('whitespace'),
include('simplevalue'),
(r'\{', token.Punctuation, 'objectvalue'),
(r'\[', token.Punctuation, 'arrayvalue'),
],
# #########################################
# # END: states from JSON lexer ###########
# #########################################

'host-postfix': [
(r'\n', token.Text, '#pop:3'),
(r'( )(=>)( )(\{)',
bygroups(token.Text, token.Punctuation, token.Text, token.Punctuation),
'objectvalue'),
],

'host-error': [
(r'(?:( )(UNREACHABLE|FAILED)(!))?',
bygroups(token.Text, token.Keyword, token.Punctuation),
'host-postfix'),
(r'', token.Text, 'host-postfix'),
],

'host-name': [
(r'(\[)([^ \]]+)(?:( )(=>)( )([^\]]+))?(\])',
bygroups(token.Punctuation, token.Name.Variable, token.Text, token.Punctuation, token.Text, token.Name.Variable, token.Punctuation),
'host-error')
],

'host-result': [
(r'\n', token.Text, '#pop'),
(r'( +)(ok|changed|failed|skipped|unreachable)(=)([0-9]+)',
bygroups(token.Text, token.Keyword, token.Punctuation, token.Number.Integer)),
],

'root': [
(r'(PLAY|TASK|PLAY RECAP)(?:( )(\[)([^\]]+)(\]))?( )(\*+)(\n)',
bygroups(token.Keyword, token.Text, token.Punctuation, token.Literal, token.Punctuation, token.Text, token.Name.Variable, token.Text)),
(r'(fatal|ok|changed|skipping)(:)( )',
bygroups(token.Keyword, token.Punctuation, token.Text),
'host-name'),
(r'([^ ]+)( +)(:)',
bygroups(token.Name, token.Text, token.Punctuation),
'host-result'),
(r'.*\n', token.Other),
],
}


class AnsibleOutputLexer(DelegatingLexer):
name = 'Ansible-output'
aliases = ['ansible-output']

def __init__(self, **options):
super(AnsibleOutputLexer, self).__init__(DiffLexer, AnsibleOutputPrimaryLexer, **options)


# ####################################################################################################
# # Sphinx plugin ####################################################################################
# ####################################################################################################
Expand All @@ -490,7 +609,7 @@ def setup(app):
""" Initializer for Sphinx extension API.
See http://www.sphinx-doc.org/en/stable/extdev/index.html#dev-extensions.
"""
for lexer in [AnsibleYamlLexer(startinline=True), AnsibleYamlJinjaLexer(startinline=True)]:
for lexer in [AnsibleYamlLexer(startinline=True), AnsibleYamlJinjaLexer(startinline=True), AnsibleOutputLexer(startinline=True)]:
app.add_lexer(lexer.name, lexer)
for alias in lexer.aliases:
app.add_lexer(alias, lexer)
Expand Down
4 changes: 2 additions & 2 deletions docs/docsite/rst/installation_guide/intro_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Paths where configuration file is searched are listed in :ref:`reference documen
Getting the latest configuration
--------------------------------

If installing Ansible from a package manager, the latest ansible.cfg file should be present in /etc/ansible, possibly
as a ".rpmnew" file (or other) as appropriate in the case of updates.
If installing Ansible from a package manager, the latest ``ansible.cfg`` file should be present in ``/etc/ansible``, possibly
as a ``.rpmnew`` file (or other) as appropriate in the case of updates.

If you installed Ansible from pip or from source, you may want to create this file in order to override
default settings in Ansible.
Expand Down
25 changes: 24 additions & 1 deletion docs/docsite/rst/porting_guides/porting_guide_2.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ This document is part of a collection on porting. The complete list of porting g
Playbook
========

No notable changes.
Distribution Facts
------------------

The information returned for the ``ansible_distribution_*`` group of facts may have changed
slightly. Ansible 2.8 uses a new backend library for information about distributions: `nir0s/distro <https://github.com/nir0s/distro>`_. This library runs on Python-3.8 and fixes many bugs, including correcting release and version names.

The two facts used in playbooks most often, ``ansible_distribution`` and ``ansible_distribution_major_version``, should not change. If you discover a change in these facts, please file a bug so we can address the
difference. However, other facts like ``ansible_distribution_release`` and
``ansible_distribution_version`` may change as erroneous information gets corrected.


Command Line
Expand Down Expand Up @@ -148,6 +156,21 @@ Plugins

* Order of enabled inventory plugins (:ref:`INVENTORY_ENABLED`) has been updated, :ref:`auto <auto_inventory>` is now before :ref:`yaml <yaml_inventory>` and :ref:`ini <ini_inventory>`.

* The private ``_options`` attribute has been removed from the ``CallbackBase`` class of callback
plugins. If you have a third-party callback plugin which needs to access the command line arguments,
use code like the following instead of trying to use ``self._options``:

.. code-block:: python

from ansible import context
[...]
tags = context.CLIARGS['tags']

``context.CLIARGS`` is a read-only dictionary so normal dictionary retrieval methods like
``CLIARGS.get('tags')`` and ``CLIARGS['tags']`` work as expected but you won't be able to modify
the cli arguments at all.


Porting custom scripts
======================

Expand Down
2 changes: 2 additions & 0 deletions docs/docsite/rst/reference_appendices/galaxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ Content of the *webserver.yml* file:
- src: git+https://bitbucket.org/willthames/git-ansible-galaxy
version: v1.4

.. _galaxy_dependencies:

Dependencies
============

Expand Down
14 changes: 11 additions & 3 deletions docs/docsite/rst/scenario_guides/guide_gce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,24 @@ GCE Dynamic Inventory

The best way to interact with your hosts is to use the gcp_compute inventory plugin, which dynamically queries GCE and tells Ansible what nodes can be managed.

To use the gcp_compute inventory plugin, create a file that ends in .gcp.yml file in your root directory. The gcp_compute inventory script takes in the same authentication
information as any module.
To be able to use this GCE dynamic inventory plugin, you need to enable it first by specifying the following in the ``ansible.cfg`` file:

.. code-block:: ini

[inventory]
enable_plugins = gcp_compute

Then, create a file that ends in ``.gcp.yml`` in your root directory.

The gcp_compute inventory script takes in the same authentication information as any module.

Here's an example of a valid inventory file:

.. code-block:: yaml

plugin: gcp_compute
projects:
- google.com:graphite-playground
- graphite-playground
filters:
auth_kind: serviceaccount
service_account_file: /home/alexstephen/my_account.json
Expand Down
4 changes: 3 additions & 1 deletion docs/docsite/rst/user_guide/become.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ task::
- win_whoami:
become: yes

The output will look something similar to the below::
The output will look something similar to the below:

.. code-block:: ansible-output

ok: [windows] => {
"account": {
Expand Down