Skip to content

Commit 16305cf

Browse files
committed
Merge branch 'release-v1.3.1'
2 parents 7d5f71e + 0a8b578 commit 16305cf

File tree

18 files changed

+1441
-72
lines changed

18 files changed

+1441
-72
lines changed

docs/Makefile

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ SPHINXBUILD ?= sphinx-build
99
SOURCEDIR = source
1010
BUILDDIR = build
1111
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
12+
OS_DISTRO := $(shell uname)
13+
INDEX_HTML = build/html/index.html
1214
line_header="===================================================================="
1315

14-
15-
view-html:
16-
@echo "Display generated HTML in default browser."
17-
@open build/html/index.html
16+
.PHONY: help Makefile
1817

1918
# Put it first so that "make" without argument is like "make help".
2019
help:
@@ -48,7 +47,19 @@ help:
4847
@echo $(line_header)
4948
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
5049

51-
.PHONY: help Makefile
50+
view-html:
51+
ifeq ($(shell test -e $(INDEX_HTML) && echo true),true)
52+
@echo "Display generated HTML '$(INDEX_HTML)' in default browser."
53+
ifeq ($(OS_DISTRO), Darwin)
54+
@open build/html/index.html
55+
else ifeq ($(OS_DISTRO), Linux)
56+
@xdg-open build/html/index.html &> /dev/null &
57+
else
58+
@echo "Unable to launch browser for $(INDEX_HTML), open file with your browser."
59+
endif
60+
else
61+
@echo "Unable to find generated HTML '$(INDEX_HTML)'."
62+
endif
5263

5364
clean:
5465
@echo $(line_header)
@@ -98,16 +109,16 @@ role-doc:
98109
fi
99110

100111
@for role_name in `ls ../roles/`; do \
101-
echo "Detected role name $$role_name"; \
102-
if test -e ../roles/$$role_name/docs/doc_$$role_name; then \
103-
echo "Copying metadata ../roles/$$role_name/docs/doc_$$role_name to ../roles/$$role_name/docs/doc_$$role_name.py"; \
104-
cp ../roles/$$role_name/docs/doc_$$role_name ../roles/$$role_name/docs/doc_$$role_name.py; \
105-
echo "Sanitizing metadata ../roles/$$role_name/docs/doc_$$role_name.py"; \
106-
sed -i "" "s/role:/module:/g" ../roles/$$role_name/docs/doc_$$role_name.py; \
107-
echo "Generating RST doc for role ../roles/$$role_name"; \
108-
ansible-doc-extractor --template templates/role.rst.j2 source/roles ../roles/$$role_name/docs/doc_$$role_name.py; \
109-
echo "Deleting generated metadata ../roles/$$role_name/docs/doc_$$role_name.py"; \
110-
rm -rf ../roles/$$role_name/docs/doc_$$role_name.py; \
112+
echo "Detected role name $$role_name"; \
113+
if test -e ../roles/$$role_name/docs/doc_$$role_name; then \
114+
echo "Copying metadata ../roles/$$role_name/docs/doc_$$role_name to ../roles/$$role_name/docs/doc_$$role_name.py"; \
115+
cp ../roles/$$role_name/docs/doc_$$role_name ../roles/$$role_name/docs/doc_$$role_name.py; \
116+
echo "Sanitizing metadata ../roles/$$role_name/docs/doc_$$role_name.py"; \
117+
sed -i -e "s/^role:/module:/" ../roles/$$role_name/docs/doc_$$role_name.py; \
118+
echo "Generating RST doc for role ../roles/$$role_name"; \
119+
ansible-doc-extractor --template templates/role.rst.j2 source/roles ../roles/$$role_name/docs/doc_$$role_name.py; \
120+
echo "Deleting generated metadata ../roles/$$role_name/docs/doc_$$role_name.py"; \
121+
rm -rf ../roles/$$role_name/docs/doc_$$role_name.py; \
111122
fi; \
112123
done
113124

@@ -130,31 +141,31 @@ module-doc:
130141
mkdir -p source/modules; \
131142
fi
132143

133-
@if ! test -d ../plugins/modules/rexx_module_doc; then \
134-
echo "Make ../plugins/modules/rexx_module_doc directory to extract REXX doc into temporary file."; \
135-
mkdir -p ../plugins/modules/rexx_module_doc; \
136-
else \
137-
echo "Delete ../plugins/modules/rexx_module_doc directory used to extract REXX doc into temporary file."; \
138-
rm -rf ../plugins/modules/rexx_module_doc; \
139-
echo "Make ../plugins/modules/rexx_module_doc directory to extract REXX doc into temporary file."; \
140-
mkdir -p ../plugins/modules/rexx_module_doc; \
141-
fi
142-
143-
@for rexx_module in `ls ../plugins/modules/*rexx`; do\
144-
REXX_FILE=`basename $$rexx_module .rexx`; \
145-
echo "Extracting documentation for module $$REXX_FILE into ../plugins/modules/rexx_module_doc/$$REXX_FILE.py"; \
146-
touch ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
147-
sed -n "/DOCUMENTATION = '''/,/'''/p" ../plugins/modules/$$REXX_FILE.rexx >> ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
148-
sed -n "/EXAMPLES = '''/,/'''/p" ../plugins/modules/$$REXX_FILE.rexx >> ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
149-
sed -n "/RETURN = '''/,/'''/p" ../plugins/modules/$$REXX_FILE.rexx >> ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
150-
echo "Generating ReStructuredText for module $$REXX_FILE inot source/modules/$$REXX_FILE.rst"; \
151-
ansible-doc-extractor --template templates/module.rst.j2 source/modules ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
152-
done
153-
154-
@if test -d ../plugins/modules/rexx_module_doc; then \
155-
echo "Delete ../plugins/modules/rexx_module_doc directory used to extract REXX doc into temporary file."; \
156-
rm -rf ../plugins/modules/rexx_module_doc; \
157-
fi
144+
# @if ! test -d ../plugins/modules/rexx_module_doc; then \
145+
# echo "Make ../plugins/modules/rexx_module_doc directory to extract REXX doc into temporary file."; \
146+
# mkdir -p ../plugins/modules/rexx_module_doc; \
147+
# else \
148+
# echo "Delete ../plugins/modules/rexx_module_doc directory used to extract REXX doc into temporary file."; \
149+
# rm -rf ../plugins/modules/rexx_module_doc; \
150+
# echo "Make ../plugins/modules/rexx_module_doc directory to extract REXX doc into temporary file."; \
151+
# mkdir -p ../plugins/modules/rexx_module_doc; \
152+
# fi
153+
154+
# @for rexx_module in `ls ../plugins/modules/*rexx`; do\
155+
# REXX_FILE=`basename $$rexx_module .rexx`; \
156+
# echo "Extracting documentation for module $$REXX_FILE into ../plugins/modules/rexx_module_doc/$$REXX_FILE.py"; \
157+
# touch ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
158+
# sed -n "/DOCUMENTATION = '''/,/'''/p" ../plugins/modules/$$REXX_FILE.rexx >> ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
159+
# sed -n "/EXAMPLES = '''/,/'''/p" ../plugins/modules/$$REXX_FILE.rexx >> ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
160+
# sed -n "/RETURN = '''/,/'''/p" ../plugins/modules/$$REXX_FILE.rexx >> ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
161+
# echo "Generating ReStructuredText for module $$REXX_FILE inot source/modules/$$REXX_FILE.rst"; \
162+
# ansible-doc-extractor --template templates/module.rst.j2 source/modules ../plugins/modules/rexx_module_doc/$$REXX_FILE.py; \
163+
# done
164+
165+
# @if test -d ../plugins/modules/rexx_module_doc; then \
166+
# echo "Delete ../plugins/modules/rexx_module_doc directory used to extract REXX doc into temporary file."; \
167+
# rm -rf ../plugins/modules/rexx_module_doc; \
168+
# fi
158169

159170
@if test -e ../plugins/modules/__init__.py; then \
160171
echo "Rename file '../plugins/modules/__init__.py' to ../plugins/modules/__init__.py.skip to avoid reading empty python file.'"; \

docs/files/role_sample/defaults-main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ action:
55
language_1: Python
66
language_2: REXX
77
language_3: and many more languages
8+
ansible_user: John Doe

docs/files/role_sample/doc_role_sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) IBM Corporation 2020
22

33
DOCUMENTATION = r"""
4-
role: doc_role_sample
4+
role: role_sample
55
short_description: Role will assemble a sentence
66
description:
77
- This is a fun sentence builder, where the sentence is derived on
@@ -12,7 +12,7 @@ description:
1212
{{ comment }}, {{ action }} modules can be written in {{ language_1 }},
1313
{{ language_2 }} and {{ language_3 }}."
1414
author: "Demetrios Dimatos (@ddimatos)"
15-
variables:
15+
options:
1616
comment:
1717
description:
1818
- The second position in the sentence. I(comment) is inserted

docs/scripts/role-sample-gen.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ then
7575
cd $ROLE_ROOT
7676
ansible-galaxy init $_ROLE_NAME
7777
mkdir -p $ROLE_PATH/docs
78+
chmod 777 $ROLE_PATH/docs
7879

7980
# Copy role artifacts to generated role sample
8081
echo "Populating $_ROLE_NAME with sample artifacts"
@@ -142,10 +143,11 @@ then
142143
echo "Found $PROJECT_DOC_SOURCE_PATH/index.rst, checking if it has a role entry.";
143144

144145
ROLES_TOC=`cat $PROJECT_DOC_SOURCE_PATH/index.rst |grep -w "roles"`
146+
# ROLES_TOC=`grep -oPz '(?s):caption:\s+Ansible Content.*?\sroles\s' $PROJECT_DOC_SOURCE_PATH/index.rst`
145147
# echo ROLES_TOC $ROLES_TOC
146148

147149
if [ "$ROLES_TOC" == "" ]; then
148-
echo "Was unable to find roles defined in a toctree in $PROJECT_DOC_SOURCE_PATH/index.rst";
150+
echo "Was unable to find roles defined in a toctree in $PROJECT_DOC_SOURCE_PATH/index.rst";
149151
echo "Edit $PROJECT_DOC_SOURCE_PATH/index.rst and add roles to a toctree for example:";
150152
echo ".. toctree::";
151153
echo " :maxdepth: 1";
@@ -157,7 +159,7 @@ then
157159
echo " roles";
158160
echo "When roles has been added to $PROJECT_DOC_SOURCE_PATH/index.rst press [Enter]";
159161
read -p "Press [Enter] key to continue...";
160-
fi
162+
fi
161163
else
162164
echo "Was unable to find $PROJECT_DOC_SOURCE_PATH/index.rst, unable to continue to documentation generation.";
163165
echo "Please create the $PROJECT_DOC_SOURCE_PATH/index.rst and run commands:";

docs/source/modules/zos_mvs_raw.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,6 @@ See Also
17871787

17881788

17891789

1790-
17911790
Return Values
17921791
-------------
17931792

docs/source/release_notes.rst

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,54 @@
66
Releases
77
========
88

9+
Version 1.3.1
10+
=============
11+
12+
What's New
13+
----------
14+
15+
* Bug Fixes
16+
17+
* Modules
18+
19+
* Connection plugin ``zos_ssh`` was updated to prioritize the execution of
20+
modules written in REXX over other implementations such is the case for
21+
``zos_ping``.
22+
* ``zos_ping`` was updated to support Automation Hub documentation
23+
generation.
24+
25+
Availability
26+
------------
27+
28+
* `Automation Hub`_
29+
* `Galaxy`_
30+
* `GitHub`_
31+
32+
Reference
33+
---------
34+
35+
* Supported by `z/OS V2R3`_ or later
36+
* Supported by the `z/OS® shell`_
37+
* Supported by `IBM Open Enterprise SDK for Python`_ 3.8.2 or later
38+
* Supported by IBM `Z Open Automation Utilities 1.1.0`_ and
39+
`Z Open Automation Utilities 1.1.1`_
40+
41+
Known issues
42+
------------
43+
44+
* Modules
45+
46+
* When executing programs using ``zos_mvs_raw``, you may encounter errors
47+
that originate in the implementation of the programs. Two such known issues
48+
are noted below of which one has been addressed with an APAR.
49+
50+
#. ``zos_mvs_raw`` module execution fails when invoking
51+
Database Image Copy 2 Utility or Database Recovery Utility in conjunction
52+
with FlashCopy or Fast Replication.
53+
#. ``zos_mvs_raw`` module execution fails when invoking DFSRRC00 with parm
54+
"UPB,PRECOMP", "UPB, POSTCOMP" or "UPB,PRECOMP,POSTCOMP". This issue is
55+
addressed by APAR PH28089.
56+
957
Version 1.3.0
1058
=============
1159

@@ -101,7 +149,6 @@ What's New
101149
Availability
102150
------------
103151

104-
* `Automation Hub`_
105152
* `Galaxy`_
106153
* `GitHub`_
107154

0 commit comments

Comments
 (0)