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

Web UI extra_vars fields default to JSON instead of YAML #823

Open
kbreit-insight opened this issue May 3, 2024 · 2 comments
Open

Web UI extra_vars fields default to JSON instead of YAML #823

kbreit-insight opened this issue May 3, 2024 · 2 comments
Labels

Comments

@kbreit-insight
Copy link

Summary

After I apply automation to configure extra_vars for job templates and workflow templates (and similar things for inventory sources) I see the web UI defaults to JSON view whereas before the automation it defaulted to the preferred YAML view.

Issue Type

  • Bug Report

Ansible, Collection, Controller details

ansible [core 2.15.5]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.16 (main, Sep 22 2023, 17:57:55) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True

Collection                     Version
------------------------------ -----------
ansible.controller             4.5.0
ansible.posix                  1.5.2
carnival.ccl_integration       0.1.6
community.general              5.2.0

Controller version: 4.5.0
  • OS package

Desired Behavior

It should update the extra_vars defaults but not change the web UI's default view of YAML.

Actual Behavior

Web UI shows JSON when the web pages load.

@kbreit-insight kbreit-insight added bug Something isn't working new New issue, this should be removed once reviewed labels May 3, 2024
@sean-m-sullivan
Copy link
Collaborator

sean-m-sullivan commented May 8, 2024

I looked this up,
https://controller.vaultcrest.com/api/v2/job_templates/
options on that page, the default.

        "extra_vars": {
            "type": "json",
            "required": false,
            "label": "Extra vars",
            "filterable": true,
            "default": ""
        },

In addition the module takes any yaml or text sent to it, and does a json dumps, and this is what is sent to the API

unfortunately this is not the result of what this collection does, but the behavior of the API expecting json.

now if you were to Open an RFE ticket and request that you can have a preference in the settings to default the GUI to yaml display for extra vars. I would be for that.

@kbreit-insight
Copy link
Author

I'll open an RFE. In the meantime is there any way for me to override either the default or the displayed type?

@djdanielsson djdanielsson added blocked - upstream module-issue and removed new New issue, this should be removed once reviewed labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants