Hi Rob,

I don't think there's anything overly verbose about that. You could use the
defaults/main.yml file to put defaults in, rather than using the default()
method you're using, but that depends on what you're trying to do to a
degree and might not work since you're using with_subelements.

Hope that helps some.

On Mon, Feb 9, 2015 at 12:23 PM, Rob Young <
[email protected]> wrote:

> Hi,
>
> I'm trying to design a relatively generic role for managing AWS Elastic
> Beanstalk applications. Because some of the configuration options need to
> be the same across a few environments I'd like to have a place towards the
> top level of the vars file that contains these. I have something working
> [1] but the tasks file is very verbose. Specifically, the following seems
> very verbose.
>
> instance_type: "{{
> item.1.rds_instance_type|default(eb.defaults[item.1.defaults].rds_instance_type)|default(omit)
> }}"
>
> Is this a common pattern when writing reusable Ansible roles?
> If not, how is this kind of problem usually addressed?
> Also, are there any other problems you can see with either file?
>
> Thanks,
> Rob
>
> [1] https://gist.github.com/anonymous/bf4fdd7172b6f6588af2
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f5a372dd-ea79-4727-806b-4fa6eae14012%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f5a372dd-ea79-4727-806b-4fa6eae14012%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAMFyvFjseYSQAxZRMNjVULjdr3-nCZ-BtgoyWu-we17Zrhr_jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to