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

#213 Render templated variables within rke2_config prior to updating #214

Conversation

onceinarow
Copy link

What type of PR is this?

(REQUIRED)

  • bug
  • cleanup
  • documentation
  • feature

What this PR does / why we need it:

This PR address #213 - specifically, any templated variables within the rke2_config variable will not be rendered correctly when written to the config.yaml file. Based on the known issue when using update_fact, the best solution is to use set_fact to render all templated variables.

Which issue(s) this PR fixes:

Fixes #213

Testing

I performed two tests, each with the following rke2_config:

selinux: true
rke2_config:
  selinux: "{{ selinux_enabled }}"
  • Test 1: using main branch

    • Result: Failure - the config.yaml contained:
      selinux: \"\{\{ selinux_enabled \}\}\" 
      
      • the rke2-server service failed to start
  • Test 2: using the branch in this PR

    • Result: Success - the config.yaml contained:
      selinux: true
      
      • the rke2-server service started successfully

Release Notes

None

@mddamato mddamato mentioned this pull request Apr 24, 2024
@mddamato
Copy link
Contributor

#215

@aleiner aleiner merged commit 0777e6d into rancherfederal:main Apr 25, 2024
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

Successfully merging this pull request may close these issues.

Templated Variables do not work within rke2_config
3 participants