Closed jma1975 closed 2 years ago
Hi, thank you for reporting this.
Can you please try installing requirements with:
ansible-galaxy collection install -r requirements.yml
I updated the README, I forgot to push it on last edit!
Hello, I followed the new directions, this is the result:
[root@localhost libvirt-ocp4-provisioner]# ansible-playbook main.yml ERROR! couldn't resolve module/action 'ansible.posix.firewalld'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/root/libvirt-ocp4-provisioner/15_bastion_networking.yml': line 21, column 7, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Adding Bastion interface {{ host_interface }} to firewall internal zone
^ here
We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
[root@localhost libvirt-ocp4-provisioner]#
Great, can you please re run the installation of requirements and try again? Thank you!
[root@localhost libvirt-ocp4-provisioner]# ansible-playbook main.yml ERROR! couldn't resolve module/action 'ansible.posix.firewalld'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/root/libvirt-ocp4-provisioner/15_bastion_networking.yml': line 21, column 7, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Adding Bastion interface {{ host_interface }} to firewall internal zone
^ here
We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Yes, I have followed the README guide. Could you indicate the steps in case I did not understand any. Thanks
Ansible version
[root@localhost libvirt-ocp4-provisioner]# ansible --version ansible 2.9.25 config file = /root/libvirt-ocp4-provisioner/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible python version = 3.6.8 (default, Aug 12 2021, 07:06:15) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
Thank you! Last one, can you please send me the output of:
ansible-galaxy collection list
output:
[root@localhost ~]# ansible-galaxy collection list usage: ansible-galaxy collection [-h] COLLECTION_ACTION ... ansible-galaxy collection: error: argument COLLECTION_ACTION: invalid choice: 'list' (choose from 'init', 'build', 'publish', 'install') [root@localhost ~]#
Well could you please run again and give me the output of:
ansible-galaxy collection install -r requirements.yml
after you ran a git pull on the master branch? Thank you!
[root@localhost libvirt-ocp4-provisioner]# ansible-galaxy collection install -r requirements.yml Process install dependency map Starting collection install process Skipping 'community.general' as it is already installed [root@localhost libvirt-ocp4-provisioner]#
I updated the requirements.yml file, can you please do the following steps:
git pull
ansible-galaxy collection install -r requirements.yml
And take a look at the output if it installs the ansible.posix
collection?
[root@localhost libvirt-ocp4-provisioner]# git pull warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one of the following commands sometime before your next pull:
git config pull.rebase false # merge (the default strategy) git config pull.rebase true # rebase git config pull.ff only # fast-forward only
You can replace "git config" with "git config --global" to set a default preference for all repositories. You can also pass --rebase, --no-rebase, or --ff-only on the command line to override the configured default per invocation.
remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), 707 bytes | 707.00 KiB/s, done. From https://github.com/kubealex/libvirt-ocp4-provisioner 9b42f0a..7270305 master -> origin/master Updating 9b42f0a..7270305 Fast-forward requirements.yml | 1 + 1 file changed, 1 insertion(+) [root@localhost libvirt-ocp4-provisioner]# ansible-galaxy collection install -r requirements.yml Process install dependency map Starting collection install process Skipping 'community.general' as it is already installed Installing 'ansible.posix:1.3.0' to '/root/.ansible/collections/ansible_collections/ansible/posix' [root@localhost libvirt-ocp4-provisioner]#
[root@localhost libvirt-ocp4-provisioner]# ansible-playbook main.yml
PLAY [This play ensures prerequisites are satisfied before installing] *****
TASK [Gathering Facts] ***** ok: [localhost]
TASK [Check if distribution is supported] ** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Your distribution is actually unsupported"}
PLAY RECAP ***** localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
[root@localhost libvirt-ocp4-provisioner]#
What is the distribution you are using?
Hi, Rhel 8.4 in physical machine
I didn't yet have the chance to do a full round of setup on Rhel, but you can easily skip that check by adding after line 13 in file 00_pre_flight_checks.yaml:
- ansible_distribution != 'RedHat'
It was fixed, but now I have another error:
TASK [Downloading Openshift installer and CLI] ***** skipping: [bastion] => (item=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux-stable.tar.gz) skipping: [bastion] => (item=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-install-linux-stable.tar.gz)
TASK [Downloading Openshift installer and CLI] ***** changed: [bastion] => (item=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz) changed: [bastion] => (item=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-install-linux.tar.gz)
TASK [Checking for openshift-install tool] ***** changed: [bastion]
TASK [Checking for OCP cli tool] *** changed: [bastion]
TASK [Retrieve the minor version] ** skipping: [bastion]
TASK [Download initramfs and kernel] *** fatal: [bastion]: FAILED! => {"msg": "template error while templating string: expected token 'end of print statement', got '_1'. String: {{ downloads.rhcos.4_1.initramfs }}"}
PLAY RECAP *****
bastion : ok=20 changed=13 unreachable=0 failed=1 skipped=5 rescued=0 ignored=0
loadbalancer : ok=7 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
localhost : ok=19 changed=9 unreachable=0 failed=0 skipped=14 rescued=0 ignored=0
[root@localhost libvirt-ocp4-provisioner]#
I didn't yet have the chance to do a full round of setup on Rhel, but you can easily skip that check by adding after line 13 in file 00_pre_flight_checks.yaml:
- ansible_distribution != 'RedHat'
I've run into this as well, also running RHEL8.4 on bare metal. I attempted this fix, though I couldn't find the file mentioned, but found similar code in 00_prerequisites.yml and 00_sno_prerequisites.yml so applied the fix there. For anyone else finding this thread, if you are using "main.yml" I think you need to fix the first file, if you are using "main-sno.yml" I think you need to fix the second one.
Sounds like there are some issues with _N used in variables happening here and there in rhel versions, I am working towards trying it on a rhel workstation, but I am not managing to have enough free time to do it in these days. Thanks for raising this up!
Please retry pulling new modifications on master!
[root@localhost libvirt-ocp4-provisioner]# ansible-playbook main.yml ERROR! couldn't resolve module/action 'community.general.terraform'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/root/libvirt-ocp4-provisioner/01_install_virtualization_tools.yml': line 46, column 7, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be: