Skip to content

Commit c51654c

Browse files
committed
changed docs to refer to samples repo
Signed-off-by: Andrew Twydell <[email protected]>
1 parent 806c482 commit c51654c

File tree

6 files changed

+70
-61
lines changed

6 files changed

+70
-61
lines changed

docs/source/index.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. ...............................................................................
2-
.. © Copyright IBM Corporation 2020,2021 .
2+
.. © Copyright IBM Corporation 2020,2023 .
33
.. Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) .
44
.. ...............................................................................
55
@@ -32,14 +32,13 @@ The **The IBM z/OS CICS collection** is following the **Red Hat Ansible Certifie
3232
Features
3333
================
3434

35-
The IBM z/OS CICS collection includes `modules`_, `sample playbooks`_, and ansible-doc to automate tasks against CICS resources and definitions.
36-
35+
The IBM z/OS CICS collection includes `modules`_ and ansible-doc to automate tasks against CICS resources and definitions. There are also samples in the `Z Ansible collection samples repository`_ for core z/OS, CICS, and other z/OS subsystems.
3736

3837

3938
.. _modules:
40-
https://github.com/ansible-collections/ibm_zos_cics/tree/master/plugins/modules/
41-
.. _sample playbooks:
42-
https://github.com/ansible-collections/ibm_zos_cics/tree/master/playbooks/
39+
https://github.com/ansible-collections/ibm_zos_cics/tree/main/plugins/modules/
40+
.. _Z Ansible collection samples repository:
41+
https://github.com/IBM/z_ansible_collections_samples
4342

4443

4544
Copyright

docs/source/installation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. ...............................................................................
2-
.. © Copyright IBM Corporation 2020,2021 .
2+
.. © Copyright IBM Corporation 2020,2023 .
33
.. Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) .
44
.. ...............................................................................
55
@@ -31,7 +31,6 @@ By default, collections are installed in ``~/.ansible/collections``. After insta
3131
│ ├── ibm/
3232
│ ├── ibm_zos_cics/
3333
│ ├── docs/
34-
│ ├── playbooks/
3534
│ ├── plugins/
3635
│ ├── action/
3736
│ ├── module_utils/

docs/source/playbooks.rst

Lines changed: 57 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,24 @@
66
Playbooks
77
=========
88

9-
The sample playbooks that are **included** in the **IBM z/OS CICS collection**
10-
demonstrate how to use the collection content.
9+
There are sample playbooks that demonstrate the **IBM z/OS CICS collection**
10+
functionality in the `samples repository`_.
11+
12+
.. _samples repository:
13+
https://github.com/IBM/z_ansible_collections_samples
14+
15+
1116

1217
Playbook Documentation
1318
----------------------
1419

1520
An `Ansible playbook`_ consists of organized instructions that define work for
1621
a managed node (host) to be managed with Ansible.
1722

18-
A `playbooks directory`_ that contains a sample playbook is included in the
19-
**IBM z/OS CICS collection**. The sample playbook is for reference and can be run
20-
with the ``ansible-playbook`` command with some modification to the **inventory**,
21-
**ansible.cfg** and **group_vars** as well as updates to the module parameters
23+
`Samples`_ that contains multiple example playbooks are included in the
24+
`CICS samples repository`_. The sample playbooks are for reference and can be run
25+
with the ``ansible-playbook`` command with some modification to their **inventory**,
26+
**ansible.cfg** and **group_vars** as well as updates to their module parameters
2227
to reference your CICS artifacts and configuration.
2328

2429
You can find the playbook content that is included with the collection in the
@@ -29,12 +34,15 @@ refer to the installation path as ``~/.ansible/collections/ibm/ibm_zos_cics``.
2934

3035
.. _Ansible playbook:
3136
https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#playbooks-intro
32-
.. _playbooks directory:
33-
https://github.com/ansible-collections/ibm_zos_cics/tree/master/playbooks
37+
.. _Samples:
38+
https://github.com/IBM/z_ansible_collections_samples/tree/main/zos_subsystems/cics
39+
.. _CICS samples repository:
40+
https://github.com/IBM/z_ansible_collections_samples
3441
.. _installation documentation:
3542
installation.html
3643

3744

45+
3846
Sample Configuration and Setup
3947
------------------------------
4048
Each release of Ansible provides options in addition to the ones identified in
@@ -43,18 +51,14 @@ allow you to customize how Ansible operates in your environment. Ansible
4351
supports several sources to configure its behavior and all sources follow the
4452
Ansible `precedence rules`_.
4553

46-
The Ansible configuration file `ansible.cfg` can override almost all
47-
``ansible-playbook`` configurations. Included in the `playbooks directory`_ is a
48-
sample `ansible.cfg`_ that can supplement ``ansible-playbook`` with a
49-
little modification. In the sample `ansible.cfg`_, the only required
50-
configuration is ``pipelining = True``.
54+
The Ansible configuration file ``ansible.cfg`` can override almost all
55+
``ansible-playbook`` configurations.
5156

5257
You can specify the SSH port used by Ansible and instruct Ansible where to
5358
write the temporary files on the target. This can be easily done by adding the
54-
options to your inventory or `ansible.cfg`.
59+
options to your inventory or ``ansible.cfg``.
5560

56-
An example of adding these options to `ansible.cfg` is shown below. For more
57-
details, see the sample `ansible.cfg`_ notes.
61+
An example of adding these options to ``ansible.cfg`` is shown below.
5862

5963
.. code-block:: yaml
6064
@@ -66,13 +70,13 @@ details, see the sample `ansible.cfg`_ notes.
6670
For more information about available configurations for ``ansible.cfg``, read
6771
the Ansible documentation on `Ansible configuration settings`_.
6872

69-
.. _ansible.cfg:
70-
https://github.com/ansible-collections/ibm_zos_cics/blob/master/playbooks/ansible.cfg
7173
.. _Ansible configuration settings:
7274
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings-locations
7375
.. _precedence rules:
7476
https://docs.ansible.com/ansible/latest/reference_appendices/general_precedence.html#general-precedence-rules
7577

78+
79+
7680
Inventory
7781
---------
7882

@@ -81,15 +85,15 @@ list or group of lists known as an `inventory`_. Once the inventory is defined,
8185
you can use `patterns`_ to select the hosts or groups that you want Ansible to
8286
run against.
8387

84-
Included in the `playbooks directory`_ is a `sample inventory file`_ that can be
85-
used to manage your nodes with a little modification. This inventory file
86-
should be included when running the sample playbook.
88+
Included in the `CMCI samples repository`_ is a `sample inventory file`_
89+
that can be used to manage your nodes with a little modification. This
90+
inventory file should be included when running the sample playbook.
8791

8892
.. code-block:: yaml
8993
90-
zsystem:
94+
source_system:
9195
hosts:
92-
zvm:
96+
zos_host:
9397
ansible_host: zos_target_address
9498
ansible_user: zos_target_username
9599
ansible_python_interpreter: path_to_python_interpreter_binary_on_zos_target
@@ -115,23 +119,26 @@ to set the port for a host can be reviewed in the
115119

116120
.. _inventory:
117121
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
122+
.. _CMCI samples repository:
123+
https://github.com/IBM/z_ansible_collections_samples/blob/main/zos_subsystems/cics/cmci
118124
.. _patterns:
119125
https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html#intro-patterns
120126
.. _sample inventory file:
121-
https://github.com/ansible-collections/ibm_zos_cics/blob/master/playbooks/inventory
127+
https://github.com/IBM/z_ansible_collections_samples/blob/main/zos_subsystems/cics/cmci/deploy_program/inventory.yml
122128
.. _FAQ:
123129
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#running-on-z-os
124130
.. _behavioral inventory parameters:
125131
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#connecting-to-hosts-behavioral-inventory-parameters
126132

127133

134+
128135
Group_vars
129136
----------
130137

131138
Although you can store variables in the inventory file, storing separate host
132139
and group variables files may help you organize your variable values more
133140
easily. Included with the sample playbook is a sample variables
134-
file `all.yml`_.
141+
file `zos_host.yml`_.
135142

136143
The value for the property **BPXK_AUTOCVT** must be configured to ``ON``.
137144

@@ -150,7 +157,8 @@ The value for the property **PATH** is the ZOA utilities BIN path and the Python
150157
interpreter path; for example,
151158
``/usr/lpp/IBM/zoautil/bin:/usr/lpp/rsusr/python36/bin/python:/bin``.
152159

153-
The included sample variables file (all.yml) looks like this:
160+
The included sample variables file (zos_host.yml) contains variables specific to
161+
the playbook as well as the following:
154162

155163
.. code-block:: yaml
156164
@@ -168,8 +176,8 @@ The included sample variables file (all.yml) looks like this:
168176
**ZOAU_ROOT** which is the ZOA Utilities install root path required for
169177
ZOAU; for example, ``/usr/lpp/IBM/zoautil``.
170178

171-
.. _all.yml:
172-
https://github.com/ansible-collections/ibm_zos_cics/blob/master/playbooks/group_vars/all.yml
179+
.. _zos_host.yml:
180+
https://github.com/IBM/z_ansible_collections_samples/blob/main/zos_subsystems/cics/cmci/deploy_program/host_vars/zos_host.yml
173181

174182

175183

@@ -181,11 +189,12 @@ a module, rather than repeating them everytime. Here we can set the host url and
181189
credentials of the **cmci_get** module to be the same throughout the playbook.
182190

183191
.. code-block:: yaml
192+
184193
module_defaults:
185-
ibm.ibm_zos_cics.cmci_get:
186-
cmci_host: "{{ cmci_host }}"
187-
cmci_user: "{{ cmci_user }}"
188-
cmci_password: "{{ cmci_password }}"
194+
ibm.ibm_zos_cics.cmci_get:
195+
cmci_host: "{{ cmci_host }}"
196+
cmci_user: "{{ cmci_user }}"
197+
cmci_password: "{{ cmci_password }}"
189198
190199
191200
If you wish to use the same values in **all** CMCI modules, you can assign them
@@ -194,11 +203,11 @@ to the group called **cmci_group**.
194203
.. code-block:: yaml
195204
196205
module_defaults:
197-
group/ibm.ibm_zos_cics.cmci_group:
198-
cmci_host: "my.system.host"
199-
cmci_port: "system.port.number"
200-
cmci_user: "my.username"
201-
cmci_password: "my.password"
206+
group/ibm.ibm_zos_cics.cmci_group:
207+
cmci_host: "my.system.host"
208+
cmci_port: "system.port.number"
209+
cmci_user: "my.username"
210+
cmci_password: "my.password"
202211
203212
.. note::
204213
Group module defaults are only available in ``ansible-core`` 2.12 or later. If
@@ -210,13 +219,14 @@ to the group called **cmci_group**.
210219
Run the playbook
211220
----------------
212221

213-
Access the sample Ansible playbook and ensure that you are within the collection
214-
playbooks directory where the sample files are included:
215-
``~/.ansible/collections/ibm/ibm_zos_cics/playbooks/``.
222+
Access the `collection samples repository`_ and ensure you have navigated to
223+
the directory containing the playbook you want to run. For example:
224+
``zos_subsystems/cics/cmci/deploy_program/``.
216225

217226
Use the Ansible command ``ansible-playbook`` to run the sample playbook. The
218-
command syntax is ``ansible-playbook -i <inventory> <playbook>``; for example,
219-
``ansible-playbook -i inventory zos-collection-sample.yaml``.
227+
command syntax is ``ansible-playbook -i <inventory> <playbook>`` which, using
228+
the example above of deploy_program, is
229+
``ansible-playbook -i inventory deploy_program.yaml``.
220230

221231
This command assumes that the controller's public SSH key has been shared with
222232
the managed node. If you want to avoid entering a username and password each
@@ -225,7 +235,7 @@ command; for example, ``ssh-copy-id -i ~/.ssh/mykey.pub user@<hostname>``.
225235

226236
Alternatively, you can use the ``--ask-pass`` option to be prompted for the
227237
user's password each time a playbook is run; for example,
228-
``ansible-playbook -i inventory zos-collection-sample.yaml --ask-pass``.
238+
``ansible-playbook -i inventory deploy_program.yaml --ask-pass``.
229239

230240
.. note::
231241
* Using ``--ask-pass`` is not recommended because it will hinder performance.
@@ -249,14 +259,15 @@ ERROR, DEBUG.
249259
Review the playbook notes sections for additional details and
250260
configuration.
251261

252-
Sample playbooks often submit JCL that is included with this collection
262+
Playbooks often submit JCL that is included in the samples repository
253263
under the `files directory`_. Review the sample JCL for necessary edits to
254264
allow for submission on the target system. The most common changes are to
255265
add a CLASS parameter and change the NOTIFY user parameter. For more details,
256266
see the JCL notes section included in the collection.
257267

258268
.. _ask-pass documentation:
259269
https://linux.die.net/man/1/sshpass
260-
270+
.. _collection samples repository:
271+
https://github.com/IBM/z_ansible_collections_samples
261272
.. _files directory:
262-
https://github.com/ansible-collections/ibm_zos_core/tree/dev/playbooks/files
273+
https://github.com/IBM/z_ansible_collections_samples/tree/main/zos_basics/constructs/files

docs/source/release_notes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. ...............................................................................
2-
.. © Copyright IBM Corporation 2020,2021 .
2+
.. © Copyright IBM Corporation 2020,2023 .
33
.. Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) .
44
.. ...............................................................................
55
@@ -50,7 +50,7 @@ This collection can manage CICS and CICSPlex® SM resources and definitions by c
5050
* Sample playbooks are available at the `samples repository`_. Each playbook contains a README that explains what configurations must be made to run a sample playbook.
5151

5252
.. _samples repository:
53-
https://github.com/IBM/z_ansible_collections_samples/tree/master/zos_subsystems/cics
53+
https://github.com/IBM/z_ansible_collections_samples/tree/main/zos_subsystems/cics
5454

5555
.. _CMCI REST API:
5656
https://www.ibm.com/docs/en/cics-ts/latest?topic=cmci-how-it-works-rest-api

docs/source/requirements.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. ...............................................................................
2-
.. © Copyright IBM Corporation 2020,2021 .
2+
.. © Copyright IBM Corporation 2020,2023 .
33
.. Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) .
44
.. ...............................................................................
55
@@ -15,7 +15,7 @@ A control node is any machine with Ansible® installed. You can run commands and
1515

1616
.. note:: The IBM® z/OS® CICS® collection cannot run on a Windows system.
1717

18-
* `Ansible version`_: 2.9 or later
18+
* `Ansible version`_: 2.11 or later
1919
* `Python`_: 2.7 or later
2020

2121

docs/templates/module.rst.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{# ---------------------------------------------------------------------------- #}
2-
{# © Copyright IBM Corporation 2020 #}
2+
{# © Copyright IBM Corporation 2020,2023 #}
33
{# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) #}
44
{# ---------------------------------------------------------------------------- #}
55
.. ...............................................................................
6-
.. © Copyright IBM Corporation 2020 .
6+
.. © Copyright IBM Corporation 2020,2023 .
77
.. Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) .
88
.. ...............................................................................
99

10-
:github_url: https://github.com/ansible-collections/ibm_zos_cics/blob/dev/plugins/modules/{{ module }}.py
10+
:github_url: https://github.com/ansible-collections/ibm_zos_cics/blob/main/plugins/modules/{{ module }}.py
1111

1212
.. _{{ module }}_module:
1313

0 commit comments

Comments
 (0)