Quantcast
Channel: Ask OpenStack: Q&A Site for OpenStack Users and Developers - Individual question feed
Viewing all articles
Browse latest Browse all 5

Answer by joon for I'd like to pass string type value read from environment file as an argument to runcmd in OS::Heat::CloudConfig. Below is parameter definition. oam_stat_routes: type: string label: oam_stat_routes description: List of static route destination on OAM side in CIDR notation. Below is the CloudConfig definition with runcmd. What I want to do is to pass the value of oam_stat_routes to shell script command /usr/local/bin/set_route as an argument. Wonder if this is possible. dns_network: type: OS::Heat::CloudConfig properties: cloud_config: runcmd: - /usr/local/bin/set_route oam_stat_routes

$
0
0
With below Heat statements under runcmd: - str_replace: template: dns-statroute-eth0.sh %eth0_gateway% %oam_stat_routes% parameters: "%eth0_gateway%": { get_param: dns_oam_gateway } "%oam_stat_routes%": { get_param: oam_stat_routes } The VM was launched but the intended command failed to be executed. Here is the related content in /var/lib/cloud/instances/58acd270-3622-48cf-96ef-9ff73d579693/user-data.txt file. Seems the parameter replacement didn't happen. #cloud-config runcmd: - parameters: {'%eth0_gateway%': 192.168.183.97, '%oam_stat_routes%': 192.168.0.0/16 192.168.127.0/24 } str_replace: null template: dns-statroute-eth0.sh %eth0_gateway% %oam_stat_routes%

Viewing all articles
Browse latest Browse all 5

Trending Articles