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

[Imprv] add functionality to provide sysprep or cloud-init to module ntnx_vms via a variable instead of a file #389

Open
grdavies opened this issue Aug 24, 2023 · 2 comments · May be fixed by #413
Assignees
Labels
1.9.3_triage Bug fixes & Improvements enhancement New feature or request

Comments

@grdavies
Copy link

grdavies commented Aug 24, 2023

Describe the request
Currently the only way to provide customization scripts is via a parameter that takes the file path of the customization script that is to be applied. This approach requires the script to either pre-exist or be generated (via a jinja template for example) and stored as a file before being used by the script. This can cause potentially a buildup of unnecessary scripts on the system that the playbook is being run from. As these scripts ofter contain sensitive information like local administrative passwords etc. this can also pose a security risk.

I would like to provide the customization script to the ntnx_vms module parameter directly from the template instead of first having to save the template as a file.

Current behaviour
ntnx_vms:
state: present
...
guest_customization:
type: "cloud_init"
script_path: "./cloud_init.yml"
is_overridable: True

Expected behaviour
ntnx_vms:
state: present
...
guest_customization:
type: "cloud_init"
script: "{{ lookup('template', 'sysprep.j2') }}"
is_overridable: True

@elwood218
Copy link

+1 That would be awesome! Instead of giving a path to a file it would be better to read userdata from a Ansible template.

@bhati-pradeep bhati-pradeep added the 1.9.1 Bug fixes & Improvements label Sep 25, 2023
@bhati-pradeep bhati-pradeep linked a pull request Oct 30, 2023 that will close this issue
@bhati-pradeep bhati-pradeep added 1.9.3_triage Bug fixes & Improvements and removed 1.9.1 Bug fixes & Improvements labels Oct 30, 2023
@bhati-pradeep
Copy link
Collaborator

Review in progress. Moved to 1.9.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.9.3_triage Bug fixes & Improvements enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

7 participants