Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Default value for static #8

Open
ovv opened this issue Aug 3, 2017 · 4 comments
Open

Default value for static #8

ovv opened this issue Aug 3, 2017 · 4 comments
Labels

Comments

@ovv
Copy link
Member

ovv commented Aug 3, 2017

At the moment the role fail if static is not defined. IMO static should not be required and by False by default.

we could add something like this in the template:

{% if static is not defined %}
    {% set static = False %}
{% endif %}
@ovv ovv added the proposal label Aug 3, 2017
@mattrasband
Copy link
Contributor

💯 % agree, though I think we can probably do it more elegantly than defining it if it's not set. We'll have to check the options, but either setting it to empty in the defaults (thereby making it falsy) or something else

@ovv
Copy link
Member Author

ovv commented Aug 3, 2017

it's in a dict structure

sites:
  sirbot:
    domains:
      - sirbot.staging.pyslackers.com
    port: 8080
    ssl: false
    email: "{{ email }}"
    staging: true
    static: ''

so I don't think we can set that as a classic default. We could also do it with a nested if I believe

@mattrasband
Copy link
Contributor

Oh that's right.

I believe we need to refactor that anyway - see #7

But I think we can do {% if ssl | default(False) %} maybe?

@ovv
Copy link
Member Author

ovv commented Aug 3, 2017

Good point. didn't think of that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants