← Back to team overview

cloud-init team mailing list archive

how do I merge local runcmd and cloud-config runcmd?

 

Greetings,

I'm playing with cloud-init 19.3 on AWS EC2, have following:

$ cat /etc/cloud/cloud.cfg.d/15_test.cfg
merge_how:
 - name: list
   settings: [append]
 - name: dict
   settings: [no_replace, recurse_list]
runcmd:
  - touch /thisisjustatest

=======================================================

Using AWS webui I'm also defining userdata:
#cloud-config
merge_how:
 - name: list
   settings: [append]
 - name: dict
   settings: [no_replace, recurse_list]
runcmd:
  - touch /fromuserdata



As a result I'm getting file "/fromuserdata" tho not "/thisisjustatest". When I don't pass userdata from AWS I do get "/thisisjustatest" file created. I'm trying to achieve to create both files.

Will appreciate any help