In a play it looks like you can just add `gather_timeout: 60` still so that
is less to add but your findings are spot on otherwise.
- name: 'A playbook'
hosts: printservers
gather_timeout: 60
tasks:
- name: 'Do something'
ansible.builtin.debug:
var: ansible_play_hosts_all
On Mon, Apr 24, 2023 at 7:30 AM Dick Visser <[email protected]> wrote:
> Hi,
>
> I have this in our ansible.cfg:
>
> [defaults]
> gather_timeout = 60
>
> With ansible 7, I get:
>
> [DEPRECATION WARNING]: DEFAULT_GATHER_TIMEOUT option, the module_defaults
> keyword is a more generic version and can apply to all calls to the
> M(ansible.builtin.gather_facts)
> or M(ansible.builtin.setup) actions, use module_defaults instead. This
> feature will be removed from ansible-core in version 2.18. Deprecation
> warnings can be disabled by
> setting deprecation_warnings=False in ansible.cfg.
>
> It seems that the equivalent of that single line in ansble.cfg, is that
> add this to every play in our playbook:
>
> module_defaults:
> ansible.builtin.setup:
> gather_timeout: 60
> ansible.builtin.gather_facts:
> gather_timeout: 60
>
> We have many plays, which means a lot of extra (duplicated) code.
> Is there a way to set this more centrally?
> Or am I missing something entirely :)
>
> thx!
>
>
> Dick
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAF8BbLZcuYeZFBC04eWqM0ECnbsAey6_yviT3jHxERkVd0SB9Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAF8BbLZcuYeZFBC04eWqM0ECnbsAey6_yviT3jHxERkVd0SB9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
- Andrew "lathama" Latham -
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CA%2Bqj4S8FmboK5tk3YokttaUzH8oa1_YAx9NN816Pg62t2STtpw%40mail.gmail.com.