diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55b4379a..14959ae7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -257,6 +257,12 @@ jobs: RUN_TYPE: ${{ steps.set-run-type.outputs.result }} run: | make bandit + - name: Run linkcheck + env: + PACKAGE_LEVEL: ${{ matrix.package_level }} + RUN_TYPE: ${{ steps.set-run-type.outputs.result }} + run: | + make linkcheck test_finish: needs: test diff --git a/Makefile b/Makefile index 9c728ea9..796390c5 100644 --- a/Makefile +++ b/Makefile @@ -272,7 +272,7 @@ docs: _check_version $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(doc_bui .PHONY: linkcheck linkcheck: _check_version $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(doc_rst_files) - -sphinx-build -b linkcheck $(sphinx_opts) $(doc_source_dir) $(doc_linkcheck_dir) + sphinx-build -b linkcheck $(sphinx_opts) $(doc_source_dir) $(doc_linkcheck_dir) @echo '$@ done.' .PHONY: test diff --git a/docs/source/bibliography.rst b/docs/source/bibliography.rst index cf5f06cf..a6e5baa0 100644 --- a/docs/source/bibliography.rst +++ b/docs/source/bibliography.rst @@ -27,30 +27,37 @@ Resources The Web Services API of the z Systems Hardware Management Console, described in the following books: HMC API 2.11.1 - `IBM SC27-2616, System z Hardware Management Console Web Services API (Version 2.11.1) `_ + IBM SC27-2616, System z Hardware Management Console Web Services API (Version 2.11.1) (no longer available for download) HMC API 2.12.0 - `IBM SC27-2617, System z Hardware Management Console Web Services API (Version 2.12.0) `_ + IBM SC27-2617, System z Hardware Management Console Web Services API (Version 2.12.0) (no longer available for download) HMC API 2.12.1 - `IBM SC27-2626, System z Hardware Management Console Web Services API (Version 2.12.1) `_ + IBM SC27-2626, System z Hardware Management Console Web Services API (Version 2.12.1) (no longer available for download) HMC API 2.13.0 - `IBM SC27-2627, z Systems Hardware Management Console Web Services API (Version 2.13.0) `_ + `IBM SC27-2627-00a, z Systems Hardware Management Console Web Services API (Version 2.13.0) `_ HMC API 2.13.1 - `IBM SC27-2634, z Systems Hardware Management Console Web Services API (Version 2.13.1) `_ + `IBM SC27-2634-03a, z Systems Hardware Management Console Web Services API (Version 2.13.1) `_ HMC API 2.14.0 - `IBM SC27-2636, IBM Z Hardware Management Console Web Services API (Version 2.14.0) `_ + `IBM SC27-2636-04a, IBM Z Hardware Management Console Web Services API (Version 2.14.0) `_ HMC API 2.14.1 - `IBM SC27-2637, IBM Z Hardware Management Console Web Services API (Version 2.14.1) `_ + `IBM SC27-2637-01a, IBM Z Hardware Management Console Web Services API (Version 2.14.1) `_ HMC API 2.15.0 - `IBM SC27-2638, IBM Z Hardware Management Console Web Services API (Version 2.15.0) `_ + `IBM SC27-2638-04c, IBM Z Hardware Management Console Web Services API (Version 2.15.0) `_ (covers both GA1 and GA2) + HMC API 2.16.0 + `IBM SC27-2642-02, IBM Z Hardware Management Console Web Services API (Version 2.16.0) `_ + (covers both GA1 and GA2) + + HMC Security + `IBM SC28-6987-01, Hardware Management Console Security `_ + .. _`Java regular expressions`: Java regular expressions @@ -59,4 +66,4 @@ Resources .. _`CoD Users Guide`: Capacity on Demand User's Guide - `IBM SC28-6985, IBM Z Capacity on Demand User's Guide `_ + `IBM SC28-6985, IBM Z Capacity on Demand User's Guide `_ diff --git a/docs/source/conf.py b/docs/source/conf.py index 0efc4def..bb88435a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -246,3 +246,32 @@ def get_docs_branches(): # documents. The default order is whatever git prints when # running "git ls-remote --tags ./." scv_invert = True + + +############################################################################## +# linkcheck # +############################################################################## + +linkcheck_request_headers = { + r'https://.*/': { + 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) ' + 'Gecko/20100101 Firefox/24.0', + }, +} + +# All HTTP redirections from a matching source URI to the matching target URI +# will be treated as "working". +linkcheck_allowed_redirects = { + r'https://virtualenv.pypa.io/': r'https://virtualenv.pypa.io/en/latest/', + r'https://ibm-systems-z.slack.com/archives/.*': r'https://ibm.enterprise.slack.com/.*', + r'https://ibm.ent.box.com/folder/.*': r'https://ibm.account.box.com/login.*', +} + +linkcheck_ignore = [ + + # Page exists, but linkchedck gets HTTP 404 "Not Found" + r'https://github.com/zhmcclient/zhmc-ansible-modules/security/dependabot', + + # Page exists, but linkchedck gets HTTP 403 "Forbidden" + r'https://opensource.org/license/apache-2-0', +] diff --git a/docs/source/index.rst b/docs/source/index.rst index 8ed886dc..1a52a168 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -124,7 +124,7 @@ please open an issue in the `issue tracker`_. .. _`issue tracker`: https://github.com/zhmcclient/zhmc-ansible-modules/issues .. _Apache 2.0 License: - https://opensource.org/licenses/Apache-2.0 + https://opensource.org/license/apache-2-0 .. _ibm.ibm_zhmc collection on Ansible Galaxy: https://galaxy.ansible.com/ibm/ibm_zhmc/ .. _ibm.ibm_zhmc collection on Ansible AutomationHub: @@ -134,6 +134,6 @@ please open an issue in the `issue tracker`_. .. _Ansible: https://www.ansible.com/ .. _IBM Z: - https://www.ibm.com/it-infrastructure/z + https://www.ibm.com/z .. _LinuxONE: - https://www.ibm.com/it-infrastructure/linuxone/ + https://www.ibm.com/linuxone diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 961d41dd..5bd148e5 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -51,7 +51,7 @@ Standard installation with system Python All commands shown are to be executed in a terminal or command prompt on the control system. The instructions are written for a bash shell. -.. _`Installing Ansible on specific operating systems`: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-specific-operating-systems +.. _`Installing Ansible on specific operating systems`: https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html 1. Install Ansible as an operating system package on the control system. diff --git a/docs/source/playbooks.rst b/docs/source/playbooks.rst index 8b5ece5e..04d30467 100644 --- a/docs/source/playbooks.rst +++ b/docs/source/playbooks.rst @@ -35,8 +35,8 @@ The **IBM Z HMC collection** provides sample playbooks in the The starting point for reading about them is `IBM Z HMC Sample Playbooks`_. .. _Ansible playbook: - https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#playbooks-intro + https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html .. _IBM Z Ansible Collection Samples: https://github.com/IBM/z_ansible_collections_samples/ .. _IBM Z HMC Sample Playbooks: - https://github.com/IBM/z_ansible_collections_samples/tree/master/z_systems_administration/zhmc + https://github.com/IBM/z_ansible_collections_samples/tree/main/z_systems_administration/zhmc diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 4e74bf1e..9390bdb9 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -58,6 +58,9 @@ Availability: `AutomationHub`_, `Galaxy`_, `GitHub`_ the input params before passing them on to the zhmcclient 'User.update_properties()' method. (issue #1081) +* Docs: Fixed broken links to IBM documentation and updated permanently + redirected links. + **Enhancements:** * Support for ansible-core 2.18, by adding an ignore file for the sanity tests. diff --git a/docs/source/requirements.rst b/docs/source/requirements.rst index ce7d09b7..90f5396b 100644 --- a/docs/source/requirements.rst +++ b/docs/source/requirements.rst @@ -38,7 +38,7 @@ For more details on these approaches, see the description and sample playbooks in `IBM Z HMC Sample Playbooks`_. .. _IBM Z HMC Sample Playbooks: - https://github.com/IBM/z_ansible_collections_samples/tree/master/z_systems_administration/zhmc + https://github.com/IBM/z_ansible_collections_samples/tree/main/z_systems_administration/zhmc Control node ============