Hi Vladamir,

Thanks for all your help. Unfortunately the variables (and how and where
they are being set) just aren't working the way I am expecting. I'll punt
for now and just set the variable in the hosts.yaml file.

Very appreciative of your time and energy.

Cheers,

-m

On Thu, Oct 5, 2023 at 1:11 AM Vladimir Botka <vbo...@gmail.com> wrote:

> On Wed, 4 Oct 2023 20:45:23 -0500
> "'Matt Zagrabelny' via Ansible Project"
> <ansible-project@googlegroups.com> wrote:
>
> > > PLAY [all] *****************************
> > >
> > > TASK [nftables : debug] ****************
> > > ok: [zed] =>
> > >   forward_policy: drop
>
> > I would like forward_policy to be "accept" for the nftables role ...
> > I want the "router" role to affect ... "nftables" role.
>
> Create task that will "instantiate" the variable *forward_policy*
>
> shell> cat roles/router/tasks/instantiate_vars.yml
> - set_fact:
>     forward_policy: "{{ forward_policy }}"
>   when: forward_policy is defined
>
> and run it in the first play *pre_tasks*
>
> shell> cat pb.yml
> - hosts: all
>   pre_tasks:
>     - include_role:
>         name: router
>         tasks_from: instantiate_vars
>       run_once: true
>   roles:
>     - nftables
>
> - hosts: router
>   roles:
>     - router
>
>
> --
> Vladimir Botka
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/20231005081108.4be4f4cc%40gmail.com
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOLfK3XKRsFmU39omXCNbk%2BrTsYTnG%2BNN_-w5n1%3DGmnmJoR1rA%40mail.gmail.com.

Reply via email to