[ansible-project] Re: unzip to unarchive

2020-08-31 Thread 'lpesc...@google.com' via Ansible Project
Bump - anyone?

On Friday, August 28, 2020 at 9:42:13 AM UTC-7 lpesc...@google.com wrote:

> I'm also curious about how the -o and -d switches in the original playbook 
> relate to the new.
>
> On Friday, August 28, 2020 at 9:41:24 AM UTC-7 lpesc...@google.com wrote:
>
>> Hi all, 
>> I want to change this to unarchive:
>>
>> - name: unpack-protos-bin
>>   shell: unzip -o /root/.ansible-management/file.zip -d /usr/local 
>> bin/protoc
>>   args:
>> executable: /bin/bash
>>   notify:
>> - unpack-proto-includes
>>
>> - name: unpack-proto-includes
>>   shell: unzip -o /root/.ansible-management/file.zip -d /usr/local 
>> include/*
>>   args:
>> executable: /bin/bash
>>
>>
>> This is what I have surmounted, but not sure if it's correct:
>>
>> - name: unpack-protos-bin
>>   unarchive:
>> src: file.zip
>> dest: /usr/local/bin/protoc
>>   notify:
>> - unpack-proto-includes
>>
>> - name: unpack-proto-includes
>>   unarchive:
>> src: 
>> https://github.com/google/protobuf/releases/download/v3.4.0/file.zip
>> dest: /usr/local/include/*
>>
>> Can anyone tell me if I am correct, and if not, how to resolve?
>>
>>
>>

-- 
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/ba5a0d3b-fa7f-433b-bbe9-c141b7b4231en%40googlegroups.com.


Re: [ansible-project] Re: How to install Ansible on a windows 2012 R server

2020-08-31 Thread Stephen John Smoogen
On Mon, 31 Aug 2020 at 16:37, jbor...@gmail.com  wrote:

> You cannot really do that. The only option would be to run it in something
> like WSL but even then there are caveats. You should be using a Linux host
> to run the Ansible control node.
>
>
I don't think they can run WSL in Windows 2012. They might be able to
deploy cygwin and then use it and the cygwin ssh as a control master.
Though the power shell and other items in it may also be too old for
ansible's powershell configuration.




> On Thursday, August 27, 2020 at 8:16:04 PM UTC+10 surabhy...@gmail.com
> wrote:
>
>> I want to install ansible inside a windows server.  Which will act as
>> ansible master.
>>
>> On Thu, Aug 27, 2020, 12:06 PM esxi...@gmail.com 
>> wrote:
>>
>>> I would suggest use Linux as your control host. You mean you want
>>> Ansible to manage Windows OS configs ?
>>>
>>> On Sunday, August 23, 2020 at 10:49:28 PM UTC-7 surabhy...@gmail.com
>>> wrote:
>>>
 Hello Team,

 Can any one help me to get steps to install ansible on a windows 2012 R
 server.

 Thanks,
 Surabhy

>>> --
>>>
>> 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-proje...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/b013f704-9b7b-4784-a243-b4a86a38db0an%40googlegroups.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/12740430-4719-4619-a8b7-821735eadaa3n%40googlegroups.com
> 
> .
>


-- 
Stephen J Smoogen.

-- 
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/CANnLRdg0hp%2BeVw-3oLhpBVXGNg6yPHW1r4sQnEMqHOZ4oFZ%2BkQ%40mail.gmail.com.


Re: [ansible-project] Re: How to install Ansible on a windows 2012 R server

2020-08-31 Thread jbor...@gmail.com
You cannot really do that. The only option would be to run it in something 
like WSL but even then there are caveats. You should be using a Linux host 
to run the Ansible control node.

On Thursday, August 27, 2020 at 8:16:04 PM UTC+10 surabhy...@gmail.com 
wrote:

> I want to install ansible inside a windows server.  Which will act as 
> ansible master. 
>
> On Thu, Aug 27, 2020, 12:06 PM esxi...@gmail.com  
> wrote:
>
>> I would suggest use Linux as your control host. You mean you want Ansible 
>> to manage Windows OS configs ?
>>
>> On Sunday, August 23, 2020 at 10:49:28 PM UTC-7 surabhy...@gmail.com 
>> wrote:
>>
>>> Hello Team,
>>>
>>> Can any one help me to get steps to install ansible on a windows 2012 R 
>>> server.
>>>
>>> Thanks,
>>> Surabhy
>>>
>> -- 
>>
> 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-proje...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/b013f704-9b7b-4784-a243-b4a86a38db0an%40googlegroups.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/12740430-4719-4619-a8b7-821735eadaa3n%40googlegroups.com.


[ansible-project] Re: ERROR! A worker was found in a dead state

2020-08-31 Thread jbor...@gmail.com

Looks like you are running on macOS based on the paths in your 
ansible-playbook --version output. There is a known problem with running 
Ansible on macOS [1] where certain system calls on the forked Ansible 
process cause the process to get killed by the kernel. This is a pretty 
fundamental issue in how Ansible creates the forked processes and how macOS 
treats those processes. There's not much we can do right for a fix but 
setting the env var 'OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes' may "fix" the 
problem for now. There are cases where even this env var won't work but 
it's worth a try.

[1] - https://github.com/ansible/ansible/issues/32554
On Tuesday, September 1, 2020 at 3:41:51 AM UTC+10 guy...@gmail.com wrote:

> Hi!  I have a task which ends simply with:
>
> < TASK [pomerium : Put config file in place] >
>  
> \   ^__^
>  \  (oo)\___
> (__)\   )\/\
> ||w |
> || ||
>
> ERROR! A worker was found in a dead state
>
> Running with - has "mux_client_read_packet: read header failed: Broken 
> pipe\r\ndebug2: Received exit status from master 0", but doesn't seem to 
> reveal anything relevant otherwise.
>
> The task definitions is:
>   - name: Put config file in place
> template:
> src: "{{ ec2_tags['Tags']|selectattr('Key', 'equalto', 
> 'Role')|map(attribute='Value')|list|first }}.yaml.j2"
> dest: /opt/pomerium/conf/pomerium.yaml
> owner: root
> group: root
> mode: 0644
> backup: yes
> notify:
> - restart pomerium
>
> I have put a debug in place:
>   - debug: msg="{{ ec2_tags['Tags']|selectattr('Key', 'equalto', 
> 'Role')|map(attribute='Value')|list|first }}.yaml.j2"
>
> Which gives:
> ok: [ec2-52-23-213-95.compute-1.amazonaws.com] => {
> "msg": "pomauthn.yaml.j2"
> }
>
> So, it does not seem to be an issue with the jinja.
>
> Any thoughts on how to debug this would be greatly appreciated!!
>
>
> P.S. - 
> ansible-playbook --version
> ansible-playbook 2.9.12
>   config file = /Users/matz/Code/schransible/ansible.cfg
>   configured module search path = ['/Users/matz/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = 
> /Users/matz/.virtualenvs/schransible/lib/python3.8/site-packages/ansible
>   executable location = 
> /Users/matz/.virtualenvs/schransible/bin/ansible-playbook
>   python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 
> (clang-1103.0.32.62)]
>

-- 
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/50ec043e-a0b7-4f98-ad30-7619a50c8c07n%40googlegroups.com.


Re: [ansible-project] Help with async tasks.

2020-08-31 Thread Martin Etcheverry
Hi ! maybe something like this :
https://medium.com/developer-space/parallel-playbook-execution-in-ansible-30799ccda4e0

El lun., 31 ago. 2020 a las 6:57, Guannan Sun ()
escribió:

> Thank you for your response.
> Well, in my condition, I using 'create_site' role to create a site in a
> netbox. It will create a site with name, region, and some other fields,
> associate some devices and vlans with the site.
> You may just treat 'create_site' as a role execute some tasks in serial.
>
> 在2020年8月31日星期一 UTC+8 下午5:45:56 写道:
>
>> On 8/31/20 11:38 AM, Guannan Sun wrote:
>> > Dear Tech Team,
>> >
>> > I'm Guannan from China. I'm new to Ansible and looking for some
>> technical help.
>> > Actually I'm looking for a method to execute one role in parallel with
>> loops of different configuration files. For
>> > example, I want to create 100 sites using role "create_site" with 100
>> different configuration files. I simply write a
>> > playbook like this:
>> >
>> > - hosts: localhost
>> >   gather_facts: no
>> >   tasks:
>> > - name: register files
>> >   shell: "find /tmp/site_files -name '*.yml' | sort"
>> >   register: file_names
>> >
>> > - include_role:
>> > name: create_site
>> > vars_from: "{{ item }}"
>> >   with_items: "{{ file_names.stdout_lines }}"
>> >
>> > This will create 100 sites in serial. If create one site take 2
>> minutes, then the whole playbook will take over 200
>> > minutes. I found 'async' option when execute tasks, however it seems
>> only used for async jobs on different hosts. Do you
>> > guys have experience or methods on how to execute one role with
>> different configuration files in parallel? Please send
>> > me E-mails.
>> > Much thanks for your help!
>>
>> What is the "create_site" role actually doing?
>>
>> Regards
>> Racke
>>
>> >
>> > --
>> > 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-proje...@googlegroups.com > ansible-proje...@googlegroups.com>.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/ansible-project/7d012eec-95de-48c3-8b8a-d32928170eacn%40googlegroups.com
>> > <
>> https://groups.google.com/d/msgid/ansible-project/7d012eec-95de-48c3-8b8a-d32928170eacn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>>
>>
>> --
>> Ecommerce and Linux consulting + Perl and web application programming.
>> Debian and Sympa administration. Provisioning with Ansible.
>>
>> --
> 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/4a67d662-278a-4070-9091-18778ae53befn%40googlegroups.com
> 
> .
>


-- 

  ::: (\(\
  *: (=' :') :*
  ... (,('')('')
  mar...@etcheverri.com
  Consultoria de sistemas

-- 
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/CAK5Ziry5LXcGwapXWxonQeaYKRWDbrnKhCpjN%2BUv4suZLiS1sg%40mail.gmail.com.


[ansible-project] ERROR! A worker was found in a dead state

2020-08-31 Thread Guy Matz
Hi!  I have a task which ends simply with:

< TASK [pomerium : Put config file in place] >
 
\   ^__^
 \  (oo)\___
(__)\   )\/\
||w |
|| ||

ERROR! A worker was found in a dead state

Running with - has "mux_client_read_packet: read header failed: Broken
pipe\r\ndebug2: Received exit status from master 0", but doesn't seem to
reveal anything relevant otherwise.

The task definitions is:
  - name: Put config file in place
template:
src: "{{ ec2_tags['Tags']|selectattr('Key', 'equalto',
'Role')|map(attribute='Value')|list|first }}.yaml.j2"
dest: /opt/pomerium/conf/pomerium.yaml
owner: root
group: root
mode: 0644
backup: yes
notify:
- restart pomerium

I have put a debug in place:
  - debug: msg="{{ ec2_tags['Tags']|selectattr('Key', 'equalto',
'Role')|map(attribute='Value')|list|first }}.yaml.j2"

Which gives:
ok: [ec2-52-23-213-95.compute-1.amazonaws.com] => {
"msg": "pomauthn.yaml.j2"
}

So, it does not seem to be an issue with the jinja.

Any thoughts on how to debug this would be greatly appreciated!!


P.S. -
ansible-playbook --version
ansible-playbook 2.9.12
  config file = /Users/matz/Code/schransible/ansible.cfg
  configured module search path = ['/Users/matz/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
  ansible python module location =
/Users/matz/.virtualenvs/schransible/lib/python3.8/site-packages/ansible
  executable location =
/Users/matz/.virtualenvs/schransible/bin/ansible-playbook
  python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3
(clang-1103.0.32.62)]

-- 
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/CABnTgtU3BWL_yvfj0j5_rBs99mQXPGswACTwyaGX9N9LNDMKxw%40mail.gmail.com.


Re: [ansible-project] Help with async tasks.

2020-08-31 Thread Guannan Sun
Thank you for your response.
Well, in my condition, I using 'create_site' role to create a site in a 
netbox. It will create a site with name, region, and some other fields, 
associate some devices and vlans with the site.
You may just treat 'create_site' as a role execute some tasks in serial.

在2020年8月31日星期一 UTC+8 下午5:45:56 写道:

> On 8/31/20 11:38 AM, Guannan Sun wrote:
> > Dear Tech Team,
> > 
> > I'm Guannan from China. I'm new to Ansible and looking for some 
> technical help.
> > Actually I'm looking for a method to execute one role in parallel with 
> loops of different configuration files. For
> > example, I want to create 100 sites using role "create_site" with 100 
> different configuration files. I simply write a
> > playbook like this:
> > 
> > - hosts: localhost
> >   gather_facts: no
> >   tasks:
> > - name: register files
> >   shell: "find /tmp/site_files -name '*.yml' | sort"
> >   register: file_names
> > 
> > - include_role:
> > name: create_site
> > vars_from: "{{ item }}"
> >   with_items: "{{ file_names.stdout_lines }}"
> > 
> > This will create 100 sites in serial. If create one site take 2 minutes, 
> then the whole playbook will take over 200
> > minutes. I found 'async' option when execute tasks, however it seems 
> only used for async jobs on different hosts. Do you
> > guys have experience or methods on how to execute one role with 
> different configuration files in parallel? Please send
> > me E-mails.
> > Much thanks for your help!
>
> What is the "create_site" role actually doing?
>
> Regards
> Racke
>
> > 
> > -- 
> > 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-proje...@googlegroups.com  ansible-proje...@googlegroups.com>.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/ansible-project/7d012eec-95de-48c3-8b8a-d32928170eacn%40googlegroups.com
> > <
> https://groups.google.com/d/msgid/ansible-project/7d012eec-95de-48c3-8b8a-d32928170eacn%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
>
> -- 
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration. Provisioning with Ansible.
>
>

-- 
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/4a67d662-278a-4070-9091-18778ae53befn%40googlegroups.com.


Re: [ansible-project] Help with async tasks.

2020-08-31 Thread Stefan Hornburg (Racke)
On 8/31/20 11:38 AM, Guannan Sun wrote:
> Dear Tech Team,
> 
> I'm Guannan from China. I'm new to Ansible and looking for some technical 
> help.
> Actually I'm looking for a method to execute one role in parallel with loops 
> of different configuration files. For
> example, I want to create 100 sites using role "create_site" with 100 
> different configuration files. I simply write a
> playbook like this:
> 
> - hosts: localhost
>   gather_facts: no
>   tasks:
>     - name: register files
>       shell: "find /tmp/site_files -name '*.yml' | sort"
>       register: file_names
> 
>     - include_role:
>         name: create_site
>         vars_from: "{{ item }}"
>       with_items: "{{ file_names.stdout_lines }}"
> 
> This will create 100 sites in serial. If create one site take 2 minutes, then 
> the whole playbook will take over 200
> minutes. I found 'async' option when execute tasks, however it seems only 
> used for async jobs on different hosts. Do you
> guys have experience or methods on how to execute one role with different 
> configuration files in parallel? Please send
> me E-mails.
> Much thanks for your help!

What is the "create_site" role actually doing?

Regards
 Racke

> 
> -- 
> 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/7d012eec-95de-48c3-8b8a-d32928170eacn%40googlegroups.com
> .


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/093a7d4c-1c82-48d3-b08d-9cbd88aee009%40linuxia.de.


signature.asc
Description: OpenPGP digital signature


[ansible-project] Help with async tasks.

2020-08-31 Thread Guannan Sun
Dear Tech Team,

I'm Guannan from China. I'm new to Ansible and looking for some technical 
help.
Actually I'm looking for a method to execute one role in parallel with 
loops of different configuration files. For example, I want to create 100 
sites using role "create_site" with 100 different configuration files. I 
simply write a playbook like this:

- hosts: localhost
  gather_facts: no
  tasks:
- name: register files
  shell: "find /tmp/site_files -name '*.yml' | sort"
  register: file_names

- include_role:
name: create_site
vars_from: "{{ item }}"
  with_items: "{{ file_names.stdout_lines }}"

This will create 100 sites in serial. If create one site take 2 minutes, 
then the whole playbook will take over 200 minutes. I found 'async' option 
when execute tasks, however it seems only used for async jobs on different 
hosts. Do you guys have experience or methods on how to execute one role 
with different configuration files in parallel? Please send me E-mails.
Much thanks for your help!

-- 
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/7d012eec-95de-48c3-8b8a-d32928170eacn%40googlegroups.com.