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

Rename node-prep role to node_prep #987

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible-ipi-install/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: IPI on Baremetal Installation Playbook
hosts: provisioner
roles:
- node-prep
- node_prep
- installer

environment:
Expand Down
1 change: 1 addition & 0 deletions ansible-ipi-install/roles/node-prep
2 changes: 0 additions & 2 deletions ansible-ipi-install/roles/node-prep/handlers/main.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# defaults file for node-prep
# defaults file for node_prep
activation_key: ""
org_id: ""
network_type: "OVNKubernetes"
Expand Down
2 changes: 2 additions & 0 deletions ansible-ipi-install/roles/node_prep/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for node_prep
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
galaxy_info:
author: Roger Lopez
description: The node-prep role assists in setup of the provision host.
description: The node_prep role assists in setup of the provision host.
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 2.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- node-prep
- node_prep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# vars file for node-prep
# vars file for node_prep
# the ternary states if provision host has no online access
# just verify the python3-crypto, python3-pyghmi packages are present
# otherwise attempt to install them from trunk.rdoproject.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When the provision host packages are
not already installed on the system, the following error can be expected

```sh
TASK [node-prep : Install required packages] ************************************************************************************************
TASK [node_prep : Install required packages] ************************************************************************************************
Thursday 07 May 2020 19:11:35 +0000 (0:00:00.161) 0:00:11.940 **********
fatal: [provisioner.example.com]: FAILED! => {"changed": false, "failures": ["No package python3-crypto available.", "No package python3-pyghmi available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

= Dig lookup requires the python '`dnspython`' library and it is not installed

One of the tasks in the `node-prep` role captures your API VIP and the
One of the tasks in the `node_prep` role captures your API VIP and the
Ingress VIP of your environment using a `lookup` via `dig`. It does
this https://docs.ansible.com/ansible/latest/plugins/lookup/dig.html[DNS query using the `dnspython` library].
This error is a little deceiving because the `dnspython` package
Expand All @@ -12,10 +12,10 @@ your local host** that is running the Ansible playbook.

[source,bash]
----
TASK [node-prep : fail] ************************************************************************************************************
TASK [node_prep : fail] ************************************************************************************************************
skipping: [provisioner.example.com]

TASK [node-prep : Verify DNS records for API VIP, Wildcard (Ingress) VIP] **********************************************************
TASK [node_prep : Verify DNS records for API VIP, Wildcard (Ingress) VIP] **********************************************************
fatal: [provisioner.example.com]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'dig'. Error was a <class 'ansible.errors.AnsibleError'>, original message: The dig lookup requires the python 'dnspython' library and it is not installed"}

PLAY RECAP *************************************************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ can be expected

[source,bash]
----
TASK [node-prep : Install required packages] ************************************************************************************************
TASK [node_prep : Install required packages] ************************************************************************************************
Thursday 07 May 2020 19:11:35 +0000 (0:00:00.161) 0:00:11.940 **********
fatal: [provisioner.example.com]: FAILED! => {"changed": false, "failures": ["No package python3-crypto available.", "No package python3-pyghmi available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The error when running the playbook looks like the following:

[source,bash]
----
TASK [node-prep : Fail if Python modules are missing] ******************************************************************************
TASK [node_prep : Fail if Python modules are missing] ******************************************************************************
Tuesday 05 May 2020 19:30:19 +0000 (0:00:00.512) 0:00:13.829 ***********
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Missing python module(s) ['netaddr'] on localhost\n"}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ following error.

[source,bash]
----
TASK [node-prep : Install required packages] ************************************************************************************************
TASK [node_prep : Install required packages] ************************************************************************************************
Thursday 07 May 2020 17:04:21 +0000 (0:00:00.152) 0:00:11.854 **********
fatal: [provisioner.example.com]: FAILED! => {"changed": false, "module_stderr": "Shared connection to provisioner.example.com closed.\r\n", "module_stdout": "[Errno 101] Network is unreachable\r\n\r\n{\"msg\": \"Nothing to do\", \"changed\": false, \"results\": [], \"rc\": 0, \"invocation\": {\"module_args\": {\"name\": [\"firewalld\", \"tar\", \"libvirt\", \"qemu-kvm\", \"python3-devel\", \"jq\", \"ipmitool\", \"python3-libvirt\", \"python3-lxml\", \"python3-yaml\", \"NetworkManager-libnm\", \"nm-connection-editor\", \"libsemanage-python3\", \"policycoreutils-python3\", \"podman\"], \"state\": \"present\", \"update_cache\": true, \"allow_downgrade\": false, \"autoremove\": false, \"bugfix\": false, \"disable_gpg_check\": false, \"disable_plugin\": [], \"disablerepo\": [], \"download_only\": false, \"enable_plugin\": [], \"enablerepo\": [], \"exclude\": [], \"installroot\": \"/\", \"install_repoquery\": true, \"install_weak_deps\": true, \"security\": false, \"skip_broken\": false, \"update_only\": false, \"validate_certs\": true, \"lock_timeout\": 30, \"conf_file\": null, \"disable_excludes\": null, \"download_dir\": null, \"list\": null, \"releasever\": null}}}\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 0}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


The Ansible playbook connects to your provision host and
runs through the `node-prep` role and the `installer` role.
runs through the `node_prep` role and the `installer` role.
No modification is necessary. All modifications of variables
may be done within the `inventory/hosts` file. A sample file
is located in this repository under `inventory/hosts.sample`.
Expand All @@ -17,6 +17,6 @@ From the system that is to run the playbook,
- name: IPI on Baremetal Installation Playbook
hosts: provisioner
roles:
- node-prep
- node_prep
- installer
----
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* `inventory` - contains the file `hosts.sample` that:
** contains all the modifiable variables, their default values, and their definition. Some variables are empty ensuring users give an explicit value.
** the setting up of your provision node, master nodes, and worker nodes. Each section will require additional details (i.e. Management credentials).
* `roles` - contains two roles: `node-prep` and `installer`. `node-prep` handles all the prerequisites that the provisioner node requires prior to running the installer. The `installer` role handles extracting the installer, setting up the manifests, and running the Red Hat OpenShift installation.
* `roles` - contains two roles: `node_prep` and `installer`. `node_prep` handles all the prerequisites that the provisioner node requires prior to running the installer. The `installer` role handles extracting the installer, setting up the manifests, and running the Red Hat OpenShift installation.

The tree structure is shown below:

Expand Down Expand Up @@ -63,7 +63,7 @@ The tree structure is shown below:
│ │ └── test.yml
│ └── vars
│ └── main.yml
└── node-prep
└── node_prep
├── defaults
│ └── main.yml
├── handlers
Expand Down
Loading