Try something like this:
command: /usr/sbin/setsebool -P httpd_can_network_connect_db 1
when: rc_db_host == "localhost"
You don't need to use templating in the when clauses.
On Mon, Jul 28, 2014 at 6:32 PM, John Oliver <[email protected]> wrote:
> I tried to:
>
> command: /usr/sbin/setsebool -P httpd_can_network_connect_db 1
> when: "{{rc_db_host}}" = "localhost"
>
> Ansible exploded in rage. I've never sent his much red text, even from
> python errors :-) I tried with quotes, without, '=', '=='... It looks
> like there's duplication in the error message, too:
>
> ERROR: Syntax Error while loading YAML script, roundcube.yml
> Note: The error may actually appear before this position: line 129, column
> 28
>
> command: /usr/sbin/setsebool -P httpd_can_network_connect_db 1
> when: "{{rc_db_host}}" == "localhost"
> ^
> We could be wrong, but this one looks like it might be an issue with
> unbalanced quotes. If starting a value with a quote, make sure the
> line ends with the same set of quotes. For instance this arbitrary
> example:
>
> foo: "bad" "wolf"
>
> Could be written as:
>
> foo: '"bad" "wolf"'
>
>
> We could be wrong, but this one looks like it might be an issue with
> missing quotes. Always quote template expression brackets when they
> start a value. For instance:
>
> with_items:
> - {{ foo }}
>
> Should be written as:
>
> with_items:
> - "{{ foo }}"
>
>
> We could be wrong, but this one looks like it might be an issue with
> unbalanced quotes. If starting a value with a quote, make sure the
> line ends with the same set of quotes. For instance this arbitrary
> example:
>
> foo: "bad" "wolf"
>
> Could be written as:
>
> foo: '"bad" "wolf"'
>
>
> --
> 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/20545b8b-b76d-4dec-8fc9-94cb4c9930fa%40googlegroups.com.
> 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/CAJQqANdpAYtPR4DGrFK_QVcFGZd-QfaYQNS0_7pdD28vVCOpsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.