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
  • Loading branch information
Gevorg-Khachatryaan authored and Gevorg-Khachatryaan committed Sep 11, 2023
1 parent 923e9c7 commit 548b000
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 548b000

Please sign in to comment.