foreman_ansible icon indicating copy to clipboard operation
foreman_ansible copied to clipboard

Fixes #37327 - GUI/API to allow importing/overriding of Ansible variables directly from YAML/JSON

Open Thorben-D opened this issue 10 months ago • 0 comments

This PR adds a new wizard to Configure > Ansible > Variables to allow users to import/override Ansible variables from YAML-files.

Key features:

  • This wizard may also be opened from Configure > Ansible > Roles to directly select a role
  • Variable name, type and default value may be changed in the UI
  • Users may select specific variables to import from a file
  • Should a variable duplicate an already created variable, the user will be warned and if he chooses to proceed, the variable is correctly marked as overridden
  • Methods to import variables from base64-encoded YAML files or JSON are exposed as API endpoints

Note: Currently, from_yaml and from_json are not properly documented. They require a dictionary as a parameter and I am unsure how to handle this with apipie (if it is even supported).

Documentation Pull request: theforeman/foreman-documentation#2941 Depends on: #696

wizard_0 wizard_1 wizard_2

Thorben-D avatar Apr 05 '24 15:04 Thorben-D