Skip to content

Commit

Permalink
example for VMs with guest customization file which injects variables…
Browse files Browse the repository at this point in the history
… from the playbook (#396)

Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1>
  • Loading branch information
Gevorg-Khachatryan-97 authored Oct 30, 2023
1 parent 8d01d81 commit 97c2d8b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion examples/vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
script_path: ""
subnet_name: ""
image_name: ""
password: ""
fqdn: ""

- name: Create Cloud-init Script file
copy:
dest: "cloud_init.yml"
content: |
#cloud-config
chpasswd:
list: |
root: "{{ password }}"
expire: False
fqdn: "{{ fqdn }}"
- name: create Vm
ntnx_vms:
Expand Down Expand Up @@ -47,7 +60,7 @@
memory_gb: 1
guest_customization:
type: "cloud_init"
script_path: "{{ script_path }}"
script_path: "./cloud_init.yml"
is_overridable: True
register: output

Expand Down

0 comments on commit 97c2d8b

Please sign in to comment.