Hello all, I tried to create basic playbook to collect all windows facts. I could ping the server well but "ansible_facts" is not giving me any info. I end up with error.
Whereas when I run ad hoc command using setup module I could see beautiful windows facts in Jason format. What is the issue when the same kind of output is expected from playbook. Can anyone help please? Regards, Anitha On Wed, 11 Nov 2020, 22:10 Chris Ruscio, <[email protected]> wrote: > I have a playbook with a couple dozen tasks. It runs against 3000 Windows > Server targets with 1000 forks and `strategy: host_pinned`. It takes about > two hours to run to completion when 90% of servers have no changes to be > made. > > Had an idea to speed it up: Write a pre_task that runs a powershell script > to collect some basic info. All other tasks are in blocks with `when:` > parameters that skip the block if the output of the pre_task was correct. > This took the runtime against one node from multiple minutes down to just a > few seconds. > > But a run against all 3000 servers still ran for just under two hours. > Looking at the individual logs for each host, there's tens of seconds to > multiple minutes between each skipped step - When there should be > milliseconds, or a couple seconds at worst. > > Almost like it's waiting for other hosts to complete the step before it > moves on... that's the behavior I'd expect if I had set a `serial` value > ... not the behavior when using a large fork count and host_pinned strategy > > *Am I doing something wrong here? How can I speed up execution against > individual hosts?* > > > ----------------------------- > > - Running Ansible in a Podman container on a server with 12 CPU cores and > 32 GB RAM. > - Podman Stats show an initial spike of 500 PIDs for the container for > 10-20 seconds, then for the rest of the play, it averages 10ish pids, > sometimes spiking up to 50 ... nowhere near 1000 > - I'm not seeing CPU or RAM or Disk IO pressure. > > my_playbook.yml > ``` > --- > - name: MyPlaybook > hosts: all > gather_facts: false > strategy: host_pinned > tasks: > [...] > ``` > > > ansible.cfg > ``` > [defaults] > forks=1000 > log_path=/var/log/ansible.log > callback_whitelist=log_plays > #display_args_to_stdout=True > > [callback_log_plays] > log_folder = /var/log/ansible/hosts > ``` > > -- > 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/7063a51b-8aa8-42e6-82d5-2b3f17d1530dn%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/7063a51b-8aa8-42e6-82d5-2b3f17d1530dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CADU-23sCSE0bR-4fdM0oTByA-DZbbV%2Bgm-Jvw3k-mkYQVouf2A%40mail.gmail.com.
