[ansible-project] ansibot starts auto-closing collection issues and pull requests in ansible/ansible

2020-08-12 Thread Martin Krizek
Greetings Ansible Community,

The change [0] to enable ansibot [1] to auto-close issues and PRs that
have the `needs_collection_redirect` label [2] in ansible/ansible
repository was just merged. In addition to closing, bot will also post
a comment explaining the reason and a link to a collection that the
issue/PR should be moved to. The bot will also add a label
`bot_closed` to such issues so we can go back and verify bot's
actions.

As an additional note, while ansibot tries its best to determine the
collection the issue/PR should be moved to, it is not a trivial task
and if it seems off please reach out on IRC or mailing list to get
help figuring out the correct place for the issue/PR.

For further information please see
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

Thanks,
Martin

[0] https://github.com/ansible/ansible/pull/71179
[1] https://github.com/ansible/ansibullbot/
[2] https://github.com/ansible/ansible/labels/needs_collection_redirect

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


Re: [ansible-project] Find VLAN in a range of VLAN (930-932)

2020-08-12 Thread Dick Visser
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#network-vlan-filters

On Tue, 11 Aug 2020 at 21:51, Spiro Mitsialis  wrote:
>
> Using various methods, I can get a list of VLAN on a switch port.  The list 
> looks like the following:
> "vlans": 
> "1,134,170,175,540,605,819-820,911-912,930-932,945,952,955,959-960,1200-1201,1400"
>
> I would like to check to see if VLAN 931 is in the list.  In this case its 
> between 930-932 in the list.  Is there a filter or function that I can use to 
> see if its in the list?
> Is there some other way I can get this info?
>
> For a single VLAN number I can use when: 'item in vlans" if in a loop but 
> 'in" looks for exact match.
>
> --
> 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/7fbfa960-ecea-46a7-b3b1-660f56f912dbo%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwMjXRmFstqzmM8odU4ph_Tn1hTs4SBT2sEw%3DW4HjF0ovw%40mail.gmail.com.


Re: [ansible-project] Find VLAN in a range of VLAN (930-932)

2020-08-12 Thread Dick Visser
You can create a "real" list of all the vlans that this range-list contains.
Once that is done it's trivial to do your check:


---
- hosts: localhost
  connection: local
  gather_facts: no

  vars:
vlan_range:
"1,134,170,175,540,605,819-820,911-912,930-932,945,952,955,959-960,1200-1201,1400"

  tasks:
- set_fact:
vlans: "{{ vlans|default([]) |
  union(lookup('sequence', item.split('-')|first + '-' +
item.split('-')|last + ':%04d', wantlist=True ) |
  map('int')|list)  }}"
  loop: "{{ vlan_range.split(',') }}"

- debug: var=vlans

- debug:
msg: "Found!"
  when: "931 in vlans"


On Wed, 12 Aug 2020 at 10:12, Dick Visser  wrote:
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#network-vlan-filters
>
> On Tue, 11 Aug 2020 at 21:51, Spiro Mitsialis  
> wrote:
> >
> > Using various methods, I can get a list of VLAN on a switch port.  The list 
> > looks like the following:
> > "vlans": 
> > "1,134,170,175,540,605,819-820,911-912,930-932,945,952,955,959-960,1200-1201,1400"
> >
> > I would like to check to see if VLAN 931 is in the list.  In this case its 
> > between 930-932 in the list.  Is there a filter or function that I can use 
> > to see if its in the list?
> > Is there some other way I can get this info?
> >
> > For a single VLAN number I can use when: 'item in vlans" if in a loop but 
> > 'in" looks for exact match.
> >
> > --
> > 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/7fbfa960-ecea-46a7-b3b1-660f56f912dbo%40googlegroups.com.
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

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


[ansible-project] Re: fortigate / fortinet

2020-08-12 Thread dvenur...@gmail.com
Hi Robert,

Are you able to run playbooks using fortinet galaxy collections.

Actually I am facing issue using it.

Can you please show how you maintain inventory file and playbook with 
sample values.

Is it work with python2 interpreter.

I am getting timeout error.

---
- hosts: fortigate
  collections:
   - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   #ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   #ansible_httpapi_port: 443
  tasks:
  - name: Configure global attributes.
fortios_system_global:
  vdom:  "{{ vdom }}"
  system_global:
 pre_login_banner: "enable"

[fortigate]
[fortigate:vars]
xx.xx.xx.xx
ansible_network_os=fortinet.fortios.fortios
ansible_python_interpreter=/usr/bin/python3
ansible_user=
ansible_password=

On Wednesday, May 13, 2020 at 2:50:57 PM UTC+5:30 Robert wrote:

> Hallo Andrew,
>
> I had the same problem as you. Please use 
> https://galaxy.ansible.com/fortinet/fortios. This works very well.
>
> Am Mittwoch, 6. Mai 2020 21:49:51 UTC+2 schrieb Andrew Meyer:
>>
>> Has anyone gotten a fortinet/fortigate playbook to work?  I have a 
>> Fortigate 100D running 6.2.2 and I can't get it to pass an ansible ping.
>>
>

-- 
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/0bac650c-6e49-4f64-a7de-65560e0c0a4fn%40googlegroups.com.


[ansible-project] Re: fortigate / fortinet

2020-08-12 Thread dvenur...@gmail.com
my ansible is on python2.7 I have tried by change 
ansible_python_interpreter=/usr/bin/python3  but nothing works out can you 
please help here.

On Wednesday, August 12, 2020 at 2:52:51 PM UTC+5:30 dvenur...@gmail.com 
wrote:

> Hi Robert,
>
> Are you able to run playbooks using fortinet galaxy collections.
>
> Actually I am facing issue using it.
>
> Can you please show how you maintain inventory file and playbook with 
> sample values.
>
> Is it work with python2 interpreter.
>
> I am getting timeout error.
>
> ---
> - hosts: fortigate
>   collections:
>- fortinet.fortios
>   connection: httpapi
>   vars:
>vdom: "root"
>#ansible_httpapi_use_ssl: yes
>ansible_httpapi_validate_certs: no
>#ansible_httpapi_port: 443
>   tasks:
>   - name: Configure global attributes.
> fortios_system_global:
>   vdom:  "{{ vdom }}"
>   system_global:
>  pre_login_banner: "enable"
>
> [fortigate]
> [fortigate:vars]
> xx.xx.xx.xx
> ansible_network_os=fortinet.fortios.fortios
> ansible_python_interpreter=/usr/bin/python3
> ansible_user=
> ansible_password=
>
> On Wednesday, May 13, 2020 at 2:50:57 PM UTC+5:30 Robert wrote:
>
>> Hallo Andrew,
>>
>> I had the same problem as you. Please use 
>> https://galaxy.ansible.com/fortinet/fortios. This works very well.
>>
>> Am Mittwoch, 6. Mai 2020 21:49:51 UTC+2 schrieb Andrew Meyer:
>>>
>>> Has anyone gotten a fortinet/fortigate playbook to work?  I have a 
>>> Fortigate 100D running 6.2.2 and I can't get it to pass an ansible ping.
>>>
>>

-- 
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/820325c5-6ee9-46eb-87de-03195a2f0388n%40googlegroups.com.


Re: [ansible-project] how to compare lists whose elements are regular expressions in Ansible?

2020-08-12 Thread rajthecomputerguy
Thanks for your response, 

I have still issue when there are two elements matched in regex pattern. 
please help

Playbook:
---
- name: list regex compare
  hosts: localhost
  gather_facts: no
  connection: local

  vars:
list1:
  - linux.*
  - 6.*
  - mysql|python|gvim

list2:
  - linux
  - linux linux
  - 6.0.2
  - msql
  tasks:

 - debug:
 msg: "{{ item.0 is match(item.1) }}"
   loop: "{{ list2|zip(list1)|list }}"

 - set_fact:
 list3: "{{ list3|default([]) + [item.0 is match(item.1)] }}"
   loop: "{{ list2|zip(list1)|list }}"

 - debug:
 msg: "{{ list3 is all  }}"

output:
TASK [debug] 

Wednesday 12 August 2020  05:50:20 -0400 (0:00:00.060)   0:00:00.060 
**
ok: [localhost] => (item=[u'linux', u'linux.*']) => {
"msg": true
}
ok: [localhost] => (item=[u'linux 1', u'6.*']) => {
"msg": false
}
ok: [localhost] => (item=[u'6.0.2', u'mysql|python|gvim']) => {
"msg": false
}

TASK [set_fact] 
*
Wednesday 12 August 2020  05:50:20 -0400 (0:00:00.049)   0:00:00.110 
**
ok: [localhost] => (item=[u'linux', u'linux.*'])
ok: [localhost] => (item=[u'linux 1', u'6.*'])
ok: [localhost] => (item=[u'6.0.2', u'mysql|python|gvim'])

TASK [debug] 

Wednesday 12 August 2020  05:50:20 -0400 (0:00:00.054)   0:00:00.164 
**
ok: [localhost] => {
"msg": false
}

PLAY RECAP 
**
localhost  : ok=3changed=0unreachable=0failed=0



On Wednesday, August 12, 2020 at 11:05:09 AM UTC+5:30, Vladimir Botka wrote:
>
> On Tue, 11 Aug 2020 21:29:40 -0700 (PDT) 
> rajthecomputerguy > wrote: 
>
> > ... compare two lists 
> > 
> > list1: 
> >- linux.* 
> >- 6.* 
> >- mysql|python|gvim 
> > 
> > list2: 
> >- linux 
> >- 6.0.1 
> >- mysql 
>
> See "Testing strings" and chose from “match”, “search” or “regex”. 
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#testing-strings
>  
>
> For example, the task below "match" items of the lists 
>
> - debug: 
> msg: "{{ item.0 is match(item.1) }}" 
>   loop: "{{ list2|zip(list1)|list }}" 
>
> If "compare two lists" means you want to know whether all items match 
> or not, create new list and test all items in it at once. For example 
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#test-if-a-list-contains-a-value
>  
>
> - set_fact: 
> list3: "{{ list3|default([]) + 
>[item.0 is match(item.1)] }}" 
>   loop: "{{ list2|zip(list1)|list }}" 
> - debug: 
> msg: "{{ list3 is all }}" 
>
>
> -- 
> 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/5f7600ca-d96d-47e2-b639-ed581c754440o%40googlegroups.com.


[ansible-project] wild card is not working for adapter_names in win_dns_client

2020-08-12 Thread Prakash PMS
Hi,

when wild card is used for adapter_names in win_dns_client to set DNS in 
windows machines, it is not recognizing the interface.

  tasks:
  - name: Set DNS to Primary Domain Controller
win_dns_client:
  adapter_names: 'tap*'
  ipv4_addresses: '{{ ad_domain_server }}'

Following is the error.

TASK [Set DNS to Primary Domain Controller] 

An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: at , : line 207
fatal: [X.X.X.X]: FAILED! => {"changed": false, "msg": "Unhandled exception 
while executing module: Invalid network adapter name: tap*"}

The documentation says wild card is supported and also given example for 
Ethernet*. When windows instances are provisioned in openstack or kvm using 
redhat virtio driver, it creates interface with tapxxx format.

Regards
Prakash

-- 
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/5b186bd8-10de-42ea-97e1-24153555914ao%40googlegroups.com.


Re: [ansible-project] wild card is not working for adapter_names in win_dns_client

2020-08-12 Thread Dick Visser
what ansible version are you running

On Wed, 12 Aug 2020 at 12:15, Prakash PMS  wrote:
>
> Hi,
>
> when wild card is used for adapter_names in win_dns_client to set DNS in 
> windows machines, it is not recognizing the interface.
>
>   tasks:
>   - name: Set DNS to Primary Domain Controller
> win_dns_client:
>   adapter_names: 'tap*'
>   ipv4_addresses: '{{ ad_domain_server }}'
>
> Following is the error.
>
> TASK [Set DNS to Primary Domain Controller] 
> 
> An exception occurred during task execution. To see the full traceback, use 
> -vvv. The error was: at , : line 207
> fatal: [X.X.X.X]: FAILED! => {"changed": false, "msg": "Unhandled exception 
> while executing module: Invalid network adapter name: tap*"}
>
> The documentation says wild card is supported and also given example for 
> Ethernet*. When windows instances are provisioned in openstack or kvm using 
> redhat virtio driver, it creates interface with tapxxx format.
>
> Regards
> Prakash
>
> --
> 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/5b186bd8-10de-42ea-97e1-24153555914ao%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwPACCTpD8J74WkbRBYeUz0ZQxguHHOeNXfHY-uWbz%3D_DQ%40mail.gmail.com.


Re: [ansible-project] wild card is not working for adapter_names in win_dns_client

2020-08-12 Thread Prakash PMS

ansible 2.9.6 on ubuntu 20.04

On Wednesday, 12 August 2020 16:05:44 UTC+5:30, Dick Visser wrote:
>
> what ansible version are you running 
>
> On Wed, 12 Aug 2020 at 12:15, Prakash PMS  > wrote: 
> > 
> > Hi, 
> > 
> > when wild card is used for adapter_names in win_dns_client to set DNS in 
> windows machines, it is not recognizing the interface. 
> > 
> >   tasks: 
> >   - name: Set DNS to Primary Domain Controller 
> > win_dns_client: 
> >   adapter_names: 'tap*' 
> >   ipv4_addresses: '{{ ad_domain_server }}' 
> > 
> > Following is the error. 
> > 
> > TASK [Set DNS to Primary Domain Controller] 
>  
> > An exception occurred during task execution. To see the full traceback, 
> use -vvv. The error was: at , : line 207 
> > fatal: [X.X.X.X]: FAILED! => {"changed": false, "msg": "Unhandled 
> exception while executing module: Invalid network adapter name: tap*"} 
> > 
> > The documentation says wild card is supported and also given example for 
> Ethernet*. When windows instances are provisioned in openstack or kvm using 
> redhat virtio driver, it creates interface with tapxxx format. 
> > 
> > Regards 
> > Prakash 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/5b186bd8-10de-42ea-97e1-24153555914ao%40googlegroups.com.
>  
>
>
>
>
> -- 
> Dick Visser 
> Trust & Identity Service Operations Manager 
> GÉANT 
>

-- 
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/4d6961a3-d54e-4cdb-a14b-25358b961e49o%40googlegroups.com.


[ansible-project] Re: ignore_unreachable statement does not work with block/rescue?

2020-08-12 Thread pan...@hotmail.de
Thank you, that works.

I appreciate the help .


moonchil...@gmail.com schrieb am Mittwoch, 12. August 2020 um 08:46:56 
UTC+2:

> wait_for_connection might be more suitable for reachability checks in your 
> case:
>
> https://docs.ansible.com/ansible/latest/modules/wait_for_connection_module.html
>
> ---
> - name: Verify if host is up
>   hosts: Server2
>   gather_facts: no
>   become: true
>
>   tasks:
> - block:
>   - name: Ping the Server
> wait_for_connection:
>   timeout: 10
>   rescue:
>   - debug:
>   msg: "The Ping was not successful"
>
> It allows you to set the timeout, and to retry before triggering rescue. 
> And it's designed to allow actions to be taken in case of faliure. 
>
> Dana utorak, 11. kolovoza 2020. u 17:38:32 UTC+2 korisnik 
> pan...@hotmail.de napisao je:
>
>> Hello guys,
>> I'm trying to check if the server is still reachable with a block -rescue 
>> statement.
>> If the server is no longer available, the rescue statement should do 
>> something. 
>>
>> This is basically the simple playbook:
>>
>> ---
>> - name: Verify if host is up 
>>   hosts: Server2
>>   gather_facts: no
>> #  ignore_unreachable: true
>>   become: true
>>
>>   tasks:
>> - block:
>>   - name: Ping the Server
>> ping:
>> ignore_unreachable: true
>>   rescue: 
>>   - debug:
>>   msg: "The Ping was not successful"
>> ...
>>
>> The problem is that Playbook aborts directly if the server is not 
>> available and does not execute the rescue statement. 
>> I tried the ignore_unreachable statement on all possible positions. I 
>> have also added the statement ignore_errors. 
>>
>> If im doing it without block / rescue, it is working without any problems.
>>
>> So the Question: Can the keyword "ignore_unreachable" not be used in a 
>> block - rescue statement?
>>
>

-- 
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/1066851d-f6d5-487a-8541-dec763b54614n%40googlegroups.com.


[ansible-project] Providing Progress for Long running tasks which do not support Async

2020-08-12 Thread ASHWIN KUMAR NAIK
Hi,

I am running playbooks via an ssh command. The issue is when a long-running 
task is run in the playbook the ssh client gives a broken pipe error and 
quits.

Tweaking SSH  client by adding* ServerAliveInterval 30  & 
ServerAliveCountMax 2 * did not help .

I was able to handle this for the command module by using async. Since the 
polling continuously posts a message on the terminal the ssh session 
remains alive.

The task for which it fails is for unarchiving a particular file which 
takes a longer time to run.
Unlike the shell or command module, the unarchive module doesn't support 
async.

Is there a way to echo some message when the unarchive task is running. 


Thanks,
Ashwin


-- 
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/3ef64de6-f0e3-4a68-9c1e-cc7d0f2e30f7o%40googlegroups.com.


Re: [ansible-project] Setting Conditionals with Output

2020-08-12 Thread James Hixon
JYL,

Appreciate the recommendation. I should have mentioned that the Windows OS
is 2008r2. I did try this module before submitting and per the win_share
module docs and error message after run, this OS is not supported by the
win_share module.

James

On Wed, Aug 12, 2020 at 12:45 AM Jean-Yves LENHOF 
wrote:

> Hi,
>
> Perhaps using the module which does this, you'll have the idempotence ;-)
>
> https://docs.ansible.com/ansible/latest/modules/win_share_module.html
>
> Regars,
>
> JYL
>
>
> Le 11/08/2020 à 17:00, jhix...@gmail.com a écrit :
>
> New at Ansible and still trying to get the hang of setting conditional
> based upon output.
>
> I am setting Windows file shares with the below task. The initial run
> works fine; however, when you repeat the task, it fails stating that the
> shares already exist. How do I set a conditional that states if the network
> share already exists ignore, move on, rather than fail the run.
>
> Task:
>
> - name: Set File Shares
>   win_shell: |
> net share WebContent="E:\Inetpub\wwwroot" /Grant:Everyone,READ
> /Grant:OSC\ServerAdministrator,CHANGE
> net share LogFiles="F:\Inetpub\LogFiles" /Grant:Everyone,READ
> net share Indexes="C:\Indexes" /Grant:Everyone,READ
> /Grant:OSC\ServerAdministrator,CHANGE
> net share Components="C:\Component Services" /Grant:Everyone,READ
> /Grant:OSC\ServerAdministrator,CHANGE
> net share Resources="C:\Inetpub" /Grant:Everyone,READ
> /Grant:OSC\ServerAdministrator,CHANGE
>
> Output:
>
> STDOUT:
>
> LogFiles was shared successfully.
>
> STDERR:
>
> The name has already been shared.
>
> More help is available by typing NET HELPMSG 2118.
>
> The name has already been shared.
>
> More help is available by typing NET HELPMSG 2118.
>
> The name has already been shared.
>
> More help is available by typing NET HELPMSG 2118.
>
> The name has already been shared.
>
> More help is available by typing NET HELPMSG 2118.
>
>
> MSG:
>
> non-zero return code
> --
> 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/ee5cc554-c461-486f-88ca-13d18e1f940bn%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/4320c0ef-bbf7-b564-47e5-f0476b0f16d5%40lenhof.eu.org
> 
> .
>

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


Re: [ansible-project] Upgrade Ansible from 2.9.10 to 2.9.11 on RHEL8

2020-08-12 Thread Jay Amin
Hello Lee,
So I don't have access to subscription manager or PIP. I have to perform
this as localinstall and hence your above commands don't work when tried.

Do you know how would I upgrade without using subscription manager or
without using pip command?

Thanks
Jitesh

On Wed, Aug 12, 2020 at 2:25 AM Thomas Stephen Lee 
wrote:

> try
>
> $ sudo subscription-manager repos --enable
> ansible-2.9-for-rhel-8-x86_64-rpms
>
> and
>
> $ sudo dnf upgrade ansible
>
> --
> Lee
>
> On Tue, Aug 11, 2020 at 11:50 PM Jay Amin  wrote:
>
>> Hello,
>> Can anyone tell me how do I upgrade Ansible v2.9.10 to 2.9.11 or 2.9.12
>> on RHEL 8?
>>
>> I cannot use since system is not connected to any subscription manager or
>> repo. I use local repo. I cannot use PIP either.
>>
>> I downloaded ansible-2.9.11-1.el8.noarch.rpm but now need help on how to
>> upgrade to this version.
>>
>> Thanks
>> Jay
>>
>> --
>> 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/e7704d73-8111-4ae4-9571-31f6672ef560n%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/714c4a1D-BM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAG7s96UnKSXy%2B03OWxzb_Xg3OYKxpGVQn9UT3pj_xprUgYTFkw%40mail.gmail.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/CA%2BxBmCOQFc9%3DutL%2B82S-%3DG_B7cX0ZLwWP1%3DAqx881vsGYK3XbQ%40mail.gmail.com.


Re: [ansible-project] Upgrade Ansible from 2.9.10 to 2.9.11 on RHEL8

2020-08-12 Thread Jim Barlow
You can install pip yourself as a user:
https://pip.pypa.io/en/stable/installing/

On Wed, Aug 12, 2020 at 9:01 AM Jay Amin  wrote:

> Hello Lee,
> So I don't have access to subscription manager or PIP. I have to perform
> this as localinstall and hence your above commands don't work when tried.
>
> Do you know how would I upgrade without using subscription manager or
> without using pip command?
>
> Thanks
> Jitesh
>
> On Wed, Aug 12, 2020 at 2:25 AM Thomas Stephen Lee 
> wrote:
>
>> try
>>
>> $ sudo subscription-manager repos --enable
>> ansible-2.9-for-rhel-8-x86_64-rpms
>>
>> and
>>
>> $ sudo dnf upgrade ansible
>>
>> --
>> Lee
>>
>> On Tue, Aug 11, 2020 at 11:50 PM Jay Amin  wrote:
>>
>>> Hello,
>>> Can anyone tell me how do I upgrade Ansible v2.9.10 to 2.9.11 or 2.9.12
>>> on RHEL 8?
>>>
>>> I cannot use since system is not connected to any subscription manager
>>> or repo. I use local repo. I cannot use PIP either.
>>>
>>> I downloaded ansible-2.9.11-1.el8.noarch.rpm but now need help on how to
>>> upgrade to this version.
>>>
>>> Thanks
>>> Jay
>>>
>>> --
>>> 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/e7704d73-8111-4ae4-9571-31f6672ef560n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ansible Project" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/ansible-project/714c4a1D-BM/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, 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/CAG7s96UnKSXy%2B03OWxzb_Xg3OYKxpGVQn9UT3pj_xprUgYTFkw%40mail.gmail.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/CA%2BxBmCOQFc9%3DutL%2B82S-%3DG_B7cX0ZLwWP1%3DAqx881vsGYK3XbQ%40mail.gmail.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/CAF5BPe04YkaUV8LN1KV40mMW6w-48ZiAy6_fjXW%3DXs0CqGrJnw%40mail.gmail.com.


Re: [ansible-project] Upgrade Ansible from 2.9.10 to 2.9.11 on RHEL8

2020-08-12 Thread Piyush Bansal
Hello,

Apart from manual install, there is two other ways depending your
infrastructure apart from manual way:

1) if you have a proxy for internet then configure proxy on rhel8 ansible
node and then perform install via pip. If you don't have proxy already then
you could configure squid default proxy in some other linux flavored server.

2) create a linux/CentOS server (maybe on VMware workstation) with two
network interfaces one of which could connect to internet and then
2A) if you can access rhel8 Ansible server from your local laptop then
bridge the another network connection to your local laptop network adapter
which has reachability to the Ansible node.

OR - in this setup reachability is not working for you then try for
following 2B
2B) bridge the second network adapter of workstation CentOS/Linux vm with
adapter of Ansible node.

OR -
If this is also not possible then just deploy the CentOS vm and assign two
network interface one of which connects to internet and another nic in same
subnet as your rhel8 Ansible.

Once you have both reachability Ansible server and internet, from
rhel/centos  vm you deployed then

3) make this custom vm as repository for rhel8 Ansible vm and then download
required packages or dependency on customer vm so that you could trigger
installation of these packages on rhel8 Ansible vm.

Hope this help🙂

Thanks & Regards,
Piyush



On Wed, 12 Aug, 2020, 7:28 pm Jim Barlow,  wrote:

> You can install pip yourself as a user:
> https://pip.pypa.io/en/stable/installing/
>
> On Wed, Aug 12, 2020 at 9:01 AM Jay Amin  wrote:
>
>> Hello Lee,
>> So I don't have access to subscription manager or PIP. I have to perform
>> this as localinstall and hence your above commands don't work when tried.
>>
>> Do you know how would I upgrade without using subscription manager or
>> without using pip command?
>>
>> Thanks
>> Jitesh
>>
>> On Wed, Aug 12, 2020 at 2:25 AM Thomas Stephen Lee 
>> wrote:
>>
>>> try
>>>
>>> $ sudo subscription-manager repos --enable
>>> ansible-2.9-for-rhel-8-x86_64-rpms
>>>
>>> and
>>>
>>> $ sudo dnf upgrade ansible
>>>
>>> --
>>> Lee
>>>
>>> On Tue, Aug 11, 2020 at 11:50 PM Jay Amin  wrote:
>>>
 Hello,
 Can anyone tell me how do I upgrade Ansible v2.9.10 to 2.9.11 or 2.9.12
 on RHEL 8?

 I cannot use since system is not connected to any subscription manager
 or repo. I use local repo. I cannot use PIP either.

 I downloaded ansible-2.9.11-1.el8.noarch.rpm but now need help on how
 to upgrade to this version.

 Thanks
 Jay

 --
 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/e7704d73-8111-4ae4-9571-31f6672ef560n%40googlegroups.com
 
 .

>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Ansible Project" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/ansible-project/714c4a1D-BM/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, 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/CAG7s96UnKSXy%2B03OWxzb_Xg3OYKxpGVQn9UT3pj_xprUgYTFkw%40mail.gmail.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/CA%2BxBmCOQFc9%3DutL%2B82S-%3DG_B7cX0ZLwWP1%3DAqx881vsGYK3XbQ%40mail.gmail.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/CAF5BPe04YkaUV8LN1KV40mMW6w-48ZiAy6_fjXW%3DXs0CqGrJnw%40mail.gmail.com
> 

Re: [ansible-project] Providing Progress for Long running tasks which do not support Async

2020-08-12 Thread Brian Coca
no, not currently


-- 
--
Brian Coca

-- 
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/CACVha7fYtZSkUxfuT9%2Bs-9asyN%3DpCwiOYCUX%3DwqXrjS8a57Nyg%40mail.gmail.com.


[ansible-project] Re: unable to install .exe files using win package module on a windows sever

2020-08-12 Thread 'J Hawkesworth' via Ansible Project
Lots of things could be going wrong here.

What error do you get?  Is there anything in windows event log?  Change 
arguments and get the installer to write to a log file and look in that for 
problems.

Does installer need administrator privilege?  May be you need to run using 
become runas - see 
https://docs.ansible.com/ansible/latest/plugins/become/runas.html?

Hope the above helps



On Tuesday, August 11, 2020 at 11:06:56 AM UTC+1, surabhy vaishakh wrote:
>
> ---
> - name: Install DXSDK 
>   hosts: win
>
>   tasks:
> - name: Download DXSDK
>   win_get_url:
>url:  
> https://download.microsoft.com/download/3/A/5/3A53CE87-F5C9-4CE5-92E1-5E2AF4841741/DXSDK_Mar09.exe
>dest: C:\Program Files\ansibleinstaller\XSDK_Mar09.exe
>
> - name: Install exe
>   win_package:
> path: 'C:\Program Files\ansibleinstaller\XSDK_Mar09.exe'
> product_id: "DXSDK"
> arguments: /S /install
> state: present
>

-- 
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/3b6657bd-bcec-4710-9620-a2fb9fdd1315o%40googlegroups.com.


Re: [ansible-project] wild card is not working for adapter_names in win_dns_client

2020-08-12 Thread 'J Hawkesworth' via Ansible Project
You proably need to fetch the adaptor name which you can do with 
Get-NetAdapter powershell command

https://docs.microsoft.com/en-us/powershell/module/netadapter/get-netadapter?view=win10-ps

then pass that to the module parameters.

On Wednesday, August 12, 2020 at 11:39:57 AM UTC+1, Prakash PMS wrote:
>
>
> ansible 2.9.6 on ubuntu 20.04
>
> On Wednesday, 12 August 2020 16:05:44 UTC+5:30, Dick Visser wrote:
>>
>> what ansible version are you running 
>>
>> On Wed, 12 Aug 2020 at 12:15, Prakash PMS  wrote: 
>> > 
>> > Hi, 
>> > 
>> > when wild card is used for adapter_names in win_dns_client to set DNS 
>> in windows machines, it is not recognizing the interface. 
>> > 
>> >   tasks: 
>> >   - name: Set DNS to Primary Domain Controller 
>> > win_dns_client: 
>> >   adapter_names: 'tap*' 
>> >   ipv4_addresses: '{{ ad_domain_server }}' 
>> > 
>> > Following is the error. 
>> > 
>> > TASK [Set DNS to Primary Domain Controller] 
>>  
>> > An exception occurred during task execution. To see the full traceback, 
>> use -vvv. The error was: at , : line 207 
>> > fatal: [X.X.X.X]: FAILED! => {"changed": false, "msg": "Unhandled 
>> exception while executing module: Invalid network adapter name: tap*"} 
>> > 
>> > The documentation says wild card is supported and also given example 
>> for Ethernet*. When windows instances are provisioned in openstack or kvm 
>> using redhat virtio driver, it creates interface with tapxxx format. 
>> > 
>> > Regards 
>> > Prakash 
>> > 
>> > -- 
>> > 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...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/5b186bd8-10de-42ea-97e1-24153555914ao%40googlegroups.com.
>>  
>>
>>
>>
>>
>> -- 
>> Dick Visser 
>> Trust & Identity Service Operations Manager 
>> GÉANT 
>>
>

-- 
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/dfeda7e3-e3df-4986-96ee-885956edb008o%40googlegroups.com.


[ansible-project] 2 levels nested loop with variables

2020-08-12 Thread Nico H
Hi, I have been looking into *nested *, *subelements *and other *lookups *with 
no luck to make this working , using ansible 2.8. 
Basically , I'd like to construct a loop than can itself iterate over other 
variables (list or dict). 
*  iam_managed_policy:*
*policy_name: "{{ item.name }}"*
*policy: "{{ item.policy }}"*
*state: present*
*  loop:*
*- { name: "rds-{{mysql_privilege}}-{{regions}}", policy: 
"{{ lookup('template', template.json.j2') }}" }*
*  vars:*
*mysql_privilege:*  
*- rw*
*- ro*
*regions:*
*- us-west-1*
*- us-west-2*

but it end up with such result:
"Couldn't create policy rds-prod-[u'rw', u'ro'] - [u'ca-central-1', 
u'us-west-1']"

What i d like is each loop would build a 2 dimensions array with the vars 
elements ( rw-us-west-1 , rw-us-west-2,  ro-us-west-1, ro-us-west-2)

Is that even possible to achieve with ansible ? 
thanks

-- 
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/10e79093-9fde-47c5-a019-2234f21d10c4n%40googlegroups.com.


[ansible-project] how can I config fortigate device with os version below 5.6

2020-08-12 Thread 李育睿
Hello everyone,

I want to use ansibl to config fortigate device,but the device fireware 
version is below 5.6
I found ansible module that can deploy fortigate are all using fortiapi to 
do it,so FortiGate versions are supported from 5.6 onwards .
Does there has anyway can help me use ansible to deploy fortigate device 
with 5.0~5.4 version  ?
 


-- 
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/e014264a-f026-439e-8940-2e031390c5dfn%40googlegroups.com.