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

Ansible script fails #283

Closed
BrzIGH opened this issue Nov 26, 2024 · 10 comments
Closed

Ansible script fails #283

BrzIGH opened this issue Nov 26, 2024 · 10 comments

Comments

@BrzIGH
Copy link

BrzIGH commented Nov 26, 2024

Hi,
I downaloded the latest playbook. When I target a 22.04 LTS box Iget the error below :

TASK [geerlingguy.java : Include version-specific variables for Ubuntu.] ******************
fatal: [default]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Could not find or access 'Ubuntu-24.yml'\nSearched in:\n\t/home/innopac/islandora-playbook/roles/external/geerlingguy.java/vars/Ubuntu-24.yml\n\t/home/innopac/islandora-playbook/roles/external/geerlingguy.java/Ubuntu-24.yml\n\t/home/innopac/islandora-playbook/roles/external/geerlingguy.java/tasks/vars/Ubuntu-24.yml\n\t/home/innopac/islandora-playbook/roles/external/geerlingguy.java/tasks/Ubuntu-24.yml\n\t/home/innopac/islandora-playbook/vars/Ubuntu-24.yml\n\t/home/innopac/islandora-playbook/Ubuntu-24.yml on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}

PLAY RECAP ********************************************************************************
default : ok=118 changed=30 unreachable=0 failed=1 skipped=173 rescued=0 ignored=0

Theres is no Ubuntu-24.yml file in the specified location.

What options (if any) do I have ?

Thanks

@seth-shaw-asu
Copy link
Contributor

You may want to try targeting a Debian box instead. There are various parts of the scripts where we condition on Debian or Redhat, but don't have a condition for Ubuntu specifically. E.g.

- role: geerlingguy.java
when: "ansible_os_family == 'Debian' and islandora_build_base_box|bool == True"
java_packages:
- openjdk-8-jdk
- role: geerlingguy.java
when: "ansible_os_family == 'RedHat' and islandora_build_base_box|bool == True"

@seth-shaw-asu
Copy link
Contributor

Either that or you may need to Grep for Debian in your copy and make the appropriate edits to make it work with Ubuntu.

@adam-vessey
Copy link
Contributor

Just double-checking: You indicate:

When I target a 22.04 LTS

Are you sure it was 22.04, and not 24.04?

As in, the attempt to access/use Ubuntu-24.yml is from the major version of the upstream role: https://github.com/geerlingguy/ansible-role-java/blob/5c2cf164875aaa205b3af7b915bfd061862f7d36/tasks/main.yml#L22-L24

It may be that the playbook just needs to be updated to point to a newer version of geerlingguy.java? Presently, the playbook points at 2.2.0; however, Ubuntu-24.yml was only introduced with 2.5.0.

@BrzIGH
Copy link
Author

BrzIGH commented Dec 10, 2024

Yes, I am pointing to 22.04.5 LTS. I am presuming that the current script is not 24.04-compatible yet.

@adam-vessey
Copy link
Contributor

Is the host system Ubuntu 24? As in: nothing should be attempting to access Ubuntu-24.yml if there's no 24.* version of Ubuntu in play; the var lookup code using the major version is/was much the same in 2.2.0. If the host system is Ubuntu 24, is there something extra in the inventory that has it gathering the variables for the host machine, instead of/in addition to whatever target Ubuntu 22 machine? Unknown if it would attempt to get the variables for things even that it might not be running against?

... I guess what I'm getting at is: More environmental information could be useful in attempting to figure things out.

@BrzIGH
Copy link
Author

BrzIGH commented Dec 10, 2024

Both source and target are 22.04.

@BrzIGH
Copy link
Author

BrzIGH commented Dec 10, 2024

I simply copied /islandora-playbook/roles/external/geerlingguy.java/vars/Ubuntu-22.yml to /islandora-playbook/roles/external/geerlingguy.java/vars/Ubuntu-24.yml and it seems it worked. Looking at the site now to see if there are any issues.
Built on Ubuntu 22.04.5 LTS

@seth-shaw-asu
Copy link
Contributor

@BrzIGH , if everything is going okay now, can we close the issue?

@BrzIGH
Copy link
Author

BrzIGH commented Dec 12, 2024

I will be testing automatic derivative creation on the new build. Will report back with results.

@BrzIGH
Copy link
Author

BrzIGH commented Dec 12, 2024

Derivatives have been created. Call can be closed. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants