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

bug: Custom Manifests doesn't work #285

Closed
maxisam opened this issue Dec 16, 2024 · 1 comment · Fixed by #290
Closed

bug: Custom Manifests doesn't work #285

maxisam opened this issue Dec 16, 2024 · 1 comment · Fixed by #290
Labels
bug Something isn't working

Comments

@maxisam
Copy link
Contributor

maxisam commented Dec 16, 2024

Summary

I believe the issue is here

- name: Copy Custom Manifests
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ rke2_data_path }}/server/manifests/"
owner: root
group: root
mode: 0644
with_items: "{{ rke2_custom_manifests }}"
when: rke2_custom_manifests

This part expects rke2_custom_manifests as a list

but this part expects rke2_custom_manifests as a string value

https://github.com/lablabs/ansible-role-rke2/blob/859a27f112add823280e9609a2c0056c0f30247f/tasks/rke2.yml#L252C1-L262

And I don't think we need both.

This role works fine before 1.38.0, the issue starts from #260

Issue Type

Bug Report

Ansible Version

ansible [core 2.17.7]
  config file = None
  configured module search path = ['/home/saml/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/saml/miniforge3/lib/python3.10/site-packages/ansible
  ansible collection location = /home/saml/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/saml/miniforge3/bin/ansible
  python version = 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0] (/home/saml/miniforge3/bin/python3.10)
  jinja version = 3.1.4
  libyaml = True

Steps to Reproduce

whenever you have rke2_custom_manifests.

Expected Results

it should work

Actual Results

it throws error like it can't find any file when using it like a list.

@MonolithProjects if you think it is ok I can make a PR to remove https://github.com/lablabs/ansible-role-rke2/blob/859a27f112add823280e9609a2c0056c0f30247f/tasks/rke2.yml#L234-L242
@maxisam maxisam added the bug Something isn't working label Dec 16, 2024
@MonolithProjects
Copy link
Collaborator

@maxisam yes that code ended up there by a mistake. My bad. Feel free to propose a fix. Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants