You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Alex Hirschfeld <al...@d-qoi.com> on 2016/06/28 02:47:07 UTC
Evaluating bash in blueprint parameters
In the MongoDB blueprint that I am writing, I have the following parameter:
- name: mongodb.ubunturepo
type: string
label: Ubuntu Repo URL
description: The MongoDB repo for apt-get
default: http://repo.mongodb.org/apt/ubuntu $(lsb_release
-sc)/mongodb-org/stable multiverse
The default URL has $(lsb_release -sc) in it, and it makes the
installation code much smaller if that's evaluated before it is added to
the environment.
`lsb_release -sc` returns the code name of the system, so for Ubuntu
14.04 is returns trusty and for 12.04 is returns precise.
Thanks!
Alexander Hirschfeld
Re: Evaluating bash in blueprint parameters
Posted by Mike Zaccardo <mi...@cloudsoftcorp.com>.
To clarify, later in this blueprint the value of `mongodb.ubunturepo` is
being fed to `UBUNTUREPO` which is a `shell.env` variable. When `UBUNTUREPO`
is used in `install.command` the `$(lsb_release -sc)` is not being
evaluated, but remains literally in the string which breaks the install
phase.
Is there a way to get `$(lsb_release -sc)` to evaluate properly? Perhaps
an escape is missing or something trivial like that?
Thanks,
Mike and Alex
On Tue, Jun 28, 2016 at 12:31 AM Alex Hirschfeld <al...@d-qoi.com> wrote:
> In the MongoDB blueprint that I am writing, I have the following parameter:
>
> - name: mongodb.ubunturepo
> type: string
> label: Ubuntu Repo URL
> description: The MongoDB repo for apt-get
> default: http://repo.mongodb.org/apt/ubuntu $(lsb_release
> -sc)/mongodb-org/stable multiverse
>
> The default URL has $(lsb_release -sc) in it, and it makes the
> installation code much smaller if that's evaluated before it is added to
> the environment.
>
> `lsb_release -sc` returns the code name of the system, so for Ubuntu
> 14.04 is returns trusty and for 12.04 is returns precise.
>
> Thanks!
> Alexander Hirschfeld
>