简体   繁体   中英

Openstack Heat Template get_file reference to multiple files

Hi I am currently trying to get the Heat Template to reference to multiple files containing a configuration to be entered during the stack creation. The requirement came about as the main file was too huge for the system to process thus it was necessary to break down the file into 3 smaller files.

The Original Code was:

user_data_format: RAW
  user_data:
    str_replace:
      template: { get_file: Resources/UserConfigurationFiles/config.cfg  }
      params:
        <ETC>
  personality: { <ETC> }

However the due to new requirement:

user_data_format: RAW
  user_data:
    str_replace:
      template: { get_file: Resources/UserConfigurationFiles/config_01.cfg 
      get_file: Resources/UserConfigurationFiles/config_02.cfg 
      get_file: Resources/UserConfigurationFiles/config_03.cfg }
      params: <ETC>
  personality: { <ETC> }

Thus the files are broken down into 3 smaller config files however when I ran code only "config_01.cfg" file was being executed. Can someone please kindly guide me to allow the get_file reference to recorgnise the 3 files? Please do forgive the crude codes as I have just started learning Heat templates. Thank you!

`template: [{ get_file: Resources/UserConfigurationFiles/config_01.cfg}, { get_file: Resources/UserConfigurationFiles/config_02.cfg},{ get_file: Resources/UserConfigurationFiles/config_01.cfg}]

or
template:
- { get_file: Resources/UserConfigurationFiles/config_01.cfg}
- { get_file: Resources/UserConfigurationFiles/config_02.cfg} - { get_file: Resources/UserConfigurationFiles/config_03.cfg}`

It is about yaml format, similar to what you are doing with ansible yaml files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM