1 | initial version |
So I did a bit more experimentation and found that if I could get the script into the LocalScripts location they would get them run if I stored them in RAW format.
Here is a brief example:
parameters:
file_content:
type: string
description: testing userdata content
default: |
#ps1
Set-Content -Path "C:\test_3.txt" -Value "This is test_3's output!"
resources:
boot_config:
type: OS::Heat::CloudConfig
properties:
cloud_config:
write_files:
- path: C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\test_3.ps1
content: { get_param: file_content }
server:
type: OS::Nova::Server
properties:
name: testbox
flavor: { get_param: flavour }
key_name: { get_param: key }
networks:
- port: { get_resource: port }
user_data_format: RAW
user_data: {get_resource: boot_config}
block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : volume }, delete_on_termination : "true" }]
I would like to know if there is a better way to do this?
In case it helps Cloudbase-Init version: 0.9.11
Cheers, Glyn