Re: [ansible-project] how to run specific task locally on ansible ?

2020-05-21 Thread Vivek Kothawale
Hi

Use tags to achieve this.

Thanks,
Vivek

On Thu, May 21, 2020, 8:30 PM vinod devops 
wrote:

> there are no of tasks in play book,
>
> all tasks are running remotely on  host. I want to run only one task
> locally.
>
>
> How do I do that ? 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/c19122b7-5f83-48b0-b51d-eba574d62d7a%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/CAA420E_2mgz%3Db-AF9LZQfpXuK6NECNJ3UE%3DALiTTW7GyuPh_9w%40mail.gmail.com.


Re: [ansible-project] Running Ansible playbook with Jenkins plugin ... now need to add git

2020-05-02 Thread Vivek Kothawale
Hi

To achieve the above mentioned objective you can wirte Jenkins file and
package all the files using fpm and deploy that package in jenkins server
and then you can run playbooks using ansible jenkins by providing path to
playbook.

Thanks and Regards,
Vivek

On Sun, May 3, 2020, 12:18 PM Dick Visser  wrote:

> This looks like a question about how to use git, in combination with
> Jenkins, neither of which this list is supporting. You might get more
> response from a support forum on Jenkins.
>
> On Sun, 3 May 2020 at 04:59, Kiran Kumar  wrote:
>
>> Hi,
>>
>> I have a ansible server, which i use mainly to manage ntp client/dns
>> client/time zone/create users/install software etc on various linux
>> servers..  so no development to say, just as "infrastructure as code"
>>
>> On same server i installed Jenkins & on Jenkins i installed ansible
>> plugin. Now i have a UI ( Front end ) for my playbooks. So Jenkins runs the
>> playbooks.
>>
>> So far so good.
>>
>> Now i am scratching  my head & doing google ( and various online training
>> ) how do i ensure all those playbook & roles etc to  add to GIT & then
>> manage with GIT.
>>
>> This is what i did so far
>>
>>
>>- Install git plugin of Jenkins on same server
>>- Install git server on same server, now this server acts as
>>Jenkins+Ansible + Git
>>- Test my git server  by creating a project on  it & testing with a
>>work-station
>>
>>
>>
>> All stuff on my ansible is under  /etc/ansible  ie playbook in
>> /etc/ansible/playbooks , roles in /etc/ansible/roles ,  inventory at
>> /etc/ansible/hosts
>>
>> Please suggest  ( any good blog/web page/book ) or otherwise any
>> suggestions will help
>>
>> Thanks
>> Kiran
>>
>> --
>> 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/826bc85c-41b5-4d86-86f3-88dfb82bf93f%40googlegroups.com
>> 
>> .
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>
> --
> 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/CAL8fbwOpwfghzGkpLuMgHBDC3ZU%2BR86vXELA2FKAyNRa6Zoxfg%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/CAA420E9FDhOJLro1nDR2%3Djtv3VnZbKTgPv-y7Y6_px-U8sgRCg%40mail.gmail.com.


Re: [ansible-project] How to run 2 playbooks in parallel using a master playbook and monitor for any error

2020-04-23 Thread Vivek Kothawale
Hi

You can use strategy as free inside play and call multiple playbooks by
using include option in ansible

Thanks,
Vivek

On Wed, Apr 22, 2020, 7:38 PM Happy Souls 
wrote:

> Hi,
>
> I would appreciate if someone could share a simple example of running 2
> playbooks running in parallel, called in a master playbook .
>
> smallest of examples of basic tasks would be great.
>
> Regards,
> Abhishek
>
> --
> 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/6c1f6090-38b3-4d0d-b692-ba548a37d0b0%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/CAA420E-4zQbz-Asvz8GpdRTB-9bQggDYZmdnpLVFLcRrLBfWbQ%40mail.gmail.com.


Re: [ansible-project] Yum update on multiple hosts but using a cusom repo file

2020-04-21 Thread Vivek Kothawale
Hi
Could you please let me know how you doing it in manually ?

Thanks
Vivek

On Wed, Apr 22, 2020, 10:34 AM Dick Visser  wrote:

> If you are really new then you are better off reading about the basics
> first, for instance
>
>
> https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html
>
> This should give enough inspiration to get going with your task at hand.
>
>
>
> On Wed, 22 Apr 2020 at 06:53, Quad Zero  wrote:
>
>> Vivek,
>>
>> Could you actually show that to me in code? I am very new to this.
>>
>> Thank you sir.
>>
>> On Wednesday, April 22, 2020 at 2:50:52 PM UTC+10, Vivek Kothawale wrote:
>>>
>>> Hi
>>>
>>> You could use variable and reference that variable inside playbook.
>>> I this way you don't have to repeat on call same path mutiple time
>>> instead you can call that variable.
>>>
>>> Thanks,
>>> Vivek
>>>
>>> On Wed, Apr 22, 2020, 10:14 AM Quad Zero  wrote:
>>>
>>>> G'day all Ansible gurus,
>>>>
>>>> I am very new to Ansible and I am learning through youtube videos as I
>>>> am enquiring about this problem. It might be a simple one to some of you
>>>> guys:
>>>>
>>>> So I have multiple servers on my System. I have a VM by the name of YUM
>>>> which has all the updates (updates folder) on its /var/www/html folder so
>>>> it can be referenced from other systems if it was done manually (which is
>>>> what i have been doing until now).
>>>>
>>>> How do I specify this folder in Ansible to all other hosts?
>>>>
>>>> For eg:
>>>>
>>>> if my YUM server has all its updates in
>>>> http://192.168.0.5/rhel6pathes/april/
>>>>
>>>> how do i get the other servers to look at this location and update it
>>>> from here?
>>>>
>>>> Thank you so much.
>>>>
>>>>
>>>>
>>>> --
>>>> 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/ad7b76e9-6307-46f4-936a-b5cbfc7302e0%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ansible-project/ad7b76e9-6307-46f4-936a-b5cbfc7302e0%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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/f0395e8d-460c-4d75-9340-8d7ce6fa1562%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/f0395e8d-460c-4d75-9340-8d7ce6fa1562%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>
> --
> 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/CAL8fbwNnBttcaDzpfVE%3DQt46s9oAUHuE6Sk6T%2BECz4Y9rgAoEg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAL8fbwNnBttcaDzpfVE%3DQt46s9oAUHuE6Sk6T%2BECz4Y9rgAoEg%40mail.gmail.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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAA420E9KgDDWSo5vYgmpqhT6AvA3hLKxjRAiStWHF6ZFKJhZfg%40mail.gmail.com.


Re: [ansible-project] Yum update on multiple hosts but using a cusom repo file

2020-04-21 Thread Vivek Kothawale
Hi

You could use variable and reference that variable inside playbook.
I this way you don't have to repeat on call same path mutiple time instead
you can call that variable.

Thanks,
Vivek

On Wed, Apr 22, 2020, 10:14 AM Quad Zero  wrote:

> G'day all Ansible gurus,
>
> I am very new to Ansible and I am learning through youtube videos as I am
> enquiring about this problem. It might be a simple one to some of you guys:
>
> So I have multiple servers on my System. I have a VM by the name of YUM
> which has all the updates (updates folder) on its /var/www/html folder so
> it can be referenced from other systems if it was done manually (which is
> what i have been doing until now).
>
> How do I specify this folder in Ansible to all other hosts?
>
> For eg:
>
> if my YUM server has all its updates in
> http://192.168.0.5/rhel6pathes/april/
>
> how do i get the other servers to look at this location and update it from
> here?
>
> Thank you so much.
>
>
>
> --
> 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/ad7b76e9-6307-46f4-936a-b5cbfc7302e0%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/CAA420E-igPYdE6%2Bna8T%3D432YdnEahMtVauK03hhhiLytLAcSdQ%40mail.gmail.com.


Re: [ansible-project] Optimize Powershell in playbook

2020-04-01 Thread Vivek Kothawale
Hi

Can you please provide error msg which you have encountered while running
the
Playbook ?

Thanks,
Vivek



On Thu, Apr 2, 2020, 9:17 AM UnknownGnome  wrote:

> Hello,
>
> I'm trying to get a playbook working that will run the Optimize Powershell
> script that is here:
> https://docs.ansible.com/ansible/latest/user_guide/windows_performance.html
>
> The playbook succeeds, but when I check for one of the installed
> assemblies on a host, it shows as not installed.
>
> Has anyone ever successfully done this? Is there a better way to get that
> script to run on all of my hosts (and any new ones as they come up)?
>
>
> ---
> - name: Optimize Powershell
>   hosts: all
>   gather_facts: yes
>   tasks:
> - name: Copy script
> win_copy
> src: "{{fileserver}}\\Open\\Scripts\\Optimize-Powershell.ps1"
> dest: C:\temp\Optimize-Powershell.ps1
> remote_src: yes
> - name: Copy PsExec
>   win_copy:
> src: "{{fileserver}}\\Open\\PSTools\\PsExec.exe"
> dest: c:\temp\psexec.exe
> remote_src: yes
> - name: Run script through psexec
>   win_psexec:
> command:
> "powershell.exe -executionpolicy bypass -noninteractive -nologo -file C:\\
> temp\\Optimize-Powershell.ps1"
> executable: C:\temp\psexec.exe
> elevated: yes
> nobanner: yes
> interactive: yes
> username: "{{adminuser}}"
> password: "{{adminpass}}"
>
> --
> 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/d1d1b8af-1e52-4b93-8486-274cce948ce0%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/CAA420E8w%3DB1R4notA%3D73RQUY1-zbU5u18WLGjhqBftJ-Xey0jg%40mail.gmail.com.


Re: [ansible-project] unable to create directory using ansible file module

2020-03-16 Thread Vivek Kothawale
Hi shifa,

Can you please check whether dashboard dir is present on remote server?

Thanks,
Vivek

On Mon, Mar 16, 2020, 1:11 PM Shifa Shaikh  wrote:

> Dick Hi, The issue is not with the loop as I can see the correct value
> populated using debug.
>
> Aslo, the correct value shows up in the error output from the loop ... see
> below:
>
> fatal: [localhost]: FAILED! => {"changed": false, "msg": "file
> (/tmp/dashboard/APP state=directory recurse=yes) is absent, cannot continue"
> , "path": "/tmp/dashboard/APP state=directory recurse=yes"}
>
> /tmp/dashboard/APP is indeed the correct desired directory that should be
> created.
>
> Please suggest.
>
>
> On Monday, March 16, 2020 at 1:00:24 PM UTC+5:30, Dick Visser wrote:
>>
>> Hi
>>
>> you've missed a few basic things. The vars file contains a duplicate
>> variable layers - that won't work.
>> Also, you appear to want to loop over the variable layers, but you
>> don't actually use it.
>> Have a look at this URL, it has some nice examples of how loops work:
>>
>>
>> https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#iterating-over-a-simple-list
>>
>>
>>
>> On Mon, 16 Mar 2020 at 08:21, Shifa Shaikh  wrote:
>> >
>> > Here is my variable file:
>> >
>> > cat vars.yml
>> > ---
>> >
>> >   layers:
>> > - name: APP
>> >   layers:
>> > - name: WLS
>> >
>> >
>> > Here is my playbook
>> >
>> > cat varloop.yml
>> > ---
>> >
>> > hosts: localhost
>> > vars_files:
>> >   - vars.yml
>> >
>> >
>> >
>> > tasks:
>> >   - name: Create sublinks based of bad.txt files
>> > include_tasks: "{{ playbook_dir }}/inner.yml"
>> > loop: "{{ layers }}"
>> > loop_control:
>> >   loop_var: my_result
>> >
>> > inner.yml
>> > - name: Generate JSON data
>> >   block:
>> > - file: path="{{ playbook_dir }}/dashboard/{{ my_result.name }}
>> state=directory recurse=yes"
>> >
>> >
>> > However, I'm getting the following error running the code:
>> >
>> > TASK [file]
>> *
>>
>> > fatal: [localhost]: FAILED! => {"changed": false, "msg": "file
>> (/tmp/dashboard/APP state=directory recurse=yes) is absent, cannot
>> continue", "path": "/tmp/dashboard/APP state=directory recurse=yes"}
>> >
>> > I was expecting the play to create the directory "/tmp/dashboard/APP",
>> however it errors and fails.  Can you please suggest ?
>> >
>> > --
>> > 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/0fe8246b-1d71-44c4-baa0-6185815366a1%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/42e9abb0-78c1-4f0e-940a-a185f1a34ba6%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/CAA420E96TurmPm-gkPj_Z417wD1HBMOZqmCg1nboatYL_ttPaQ%40mail.gmail.com.


Re: [ansible-project] ansible playbook error

2020-01-22 Thread Vivek Kothawale
Hi Sandy,

The issue is with indentation
Under tasks you have to give two white space to make it indent

Try following


tasks:
  -  name: something

Let me know if you have any issue.

Thanks,
Vivek




On Wed, Jan 22, 2020, 2:31 PM Sandy Hung  wrote:

> ERROR! unexpected parameter type in action:  'ansible.parsing.yaml.objects.AnsibleSequence'>
>
> The error appears to be in '/home/sandy/phpldapadmin.yml': line 8, column
> 6, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>
>- name: install phpopenldap
>  ^ here
>
> sandy@test-VirtualBox:~$ sudo vi phpldapadmin.yml
> - hosts: all
>   remote_user: sandy
>   become: true
>
>   tasks:
>
>- name: install phpopenldap
>  apt:
>name: '{{item.name}}'
>state: '{{item.state | default("present")}}'
>purge: yes
>  with_items:
>
>   - name: phpldapadmin
>   - name: php
>   - name: libapache2-mod-php
>   - name: mcrypt
>   - name: php-mysql
>
>  #   - name: Force certbot to use Python 3
>  #lineinfile:
>  #  path: '{{ item }}'
>  #  regexp: '^#!/usr/bin/python$'
>  #  line: '#!/usr/bin/python3'
>  #with_items:
>  # - /usr/bin/certbot
>  #ignore_errors: yes
>  #failed_when: no
>
>  # - name: stat phpldapadmin
>  # stat: path=/var/www/html/
>  # register: phpldapadmin_stat
>
> --
> 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/e1627701-aaa8-42ba-92ce-1703693173d7%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/CAA420E9wvc%2BOxR52fzK1gW%2BRLkLSNnmB12G818dhqinZEezuOw%40mail.gmail.com.


Re: [ansible-project] Getting Terminated Message if playbook is executed in Docker

2020-01-07 Thread Vivek Kothawale
Hi Abhishek,

Can you please post error and can you please attach playbook here?

Best regards,
Vivek

On Tue, Jan 7, 2020, 1:10 PM Abhishek Inani 
wrote:

> Hi,
>
> I am running a playbook with few tasks in Docker
> After some tasks the playbook is stopped with message as [Terminated]
>
> While in VMs or bare metal it's works properly
>
> Any idea ?
>
> Thanks
> Abhishek Inani
>
> --
> 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/CANdWt_tSGDfWma%2BqyYNquiWu0Af_kgoNSznyjETzmA6fYGoy_w%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/CAA420E-7cHUppqMr-JhLXtqofQGVOtHhXvcv0ZryALhx7AdGnA%40mail.gmail.com.


Re: [ansible-project] API Call output via Ansible URI Module Not Getting the Complete Output

2020-01-06 Thread Vivek Kothawale
Hi pardeep,

You can use filter module of ansible to get ouput in from of yaml or json


Best regards,
Vivek

On Mon, Jan 6, 2020, 4:10 PM Pradeep Antil  wrote:

> Thank You Very Much, it resolves my output capture issue.
>
> Now content is saved in log file with the following format, is there any
> way to format that data while saving it a file. As you can see in the
> output below, in place of new line \n is printed.
>
>
> {'content': '{\n"result": [\n{\n"_ref":
> "member/bxx, \n"config_addr_type": "IPV4", \n
>  "host_name": "xx", \n"node_info": [\n
>{\n"ha_status": "NOT_CONFIGURED", \n
>"hwid": "892A5BA7A1CB4AA9BEAB99A3ECC81116", \n
>  "hwmodel": "", \n"hwplatform": "KVM", \n
>  "hwtype": "IB-V825", \n
>  "lan2_physical_setting": {\n
>  "auto_port_setting_enabled": true\n}, \n
>  "lan_ha_port_setting": {\n"ha_port_setting":
> {\n"auto_port_setting_enabled": true, \n
>  "speed": "10"\n}, \n
>  "lan_port_setting": {\n
>  "auto_port_setting_enabled": true\n}\n
>}, \n"mgmt_network_setting": {\n
>"address": "xxx", \n"gateway":
> "", \n"subnet_mask": "255.255.255.248"\n
>  }, \n"mgmt_physical_setting": {\n
>"auto_port_setting_enabled": true\n
>  }, \n"paid_nios": false, \n
>  "physical_oid": "0", \n"service_status": [\n
>  {\n"description": "Running", \n
>  "service": "NODE_STATUS", \n
>  "status": "WORKING"\n}, \n
>{\n"description": "2% - Primary drive usage
> is OK.", \n"service": "DISK_USAGE", \n
>"status": "WORKING"\n}, \n
>  {\n"description":
> "10.250.169.140", \n"service": "ENET_LAN", \n
>  "status": "WORKING"\n}, \n
>{\n"description":
> "xxx", \n"service": "ENET_LAN2", \n
>"status": "WORKING"\n}, \n
>  {\n"description":
> "10.250.169.132", \n"service": "ENET_MGMT", \n
>"status": "WORKING"\n},
> \n{\n"description": "3%
> - Data
>
>
>
> On Mon, Jan 6, 2020 at 2:55 PM Dick Visser  wrote:
>
>> Have a look at the return_content parameter of the uri module
>>
>> On Mon, 6 Jan 2020 at 09:34, Pradeep Antil 
>> wrote:
>> >
>> > Hi Team,
>> >
>> > I have a small playbook which connects to InfoBlox Server and collects
>> useful data via API and then save API commands out to variable and later
>> redirecting variable output to a log file.
>> >
>> > Issue is that Variable is not getting all output but it captures only
>> fraction of output. Any idea and suggestion how to capture complete output
>> of API call and save it in log file in formatted way , just like Jason
>> >
>> > Below is playbook:
>> >
>> > ---
>> > - hosts: localhost
>> >   connection: local
>> >   gather_facts: no
>> > vars_files:
>> > - infoblox_pass.yml
>> >   tasks:
>> > - name: Command to get Infoblox data
>> >   uri:
>> > url: "
>> https://x.x.x.x/wapi/v2.9/member?_return_fields%2B=node_info&_return_as_object=1
>> "
>> > method: GET
>> > user: admin
>> > password: "xxx"
>> > validate_certs: no
>> >   register: pool_members_resource
>> >
>> > - name: Command to get DNS & NTP Service Status of pool members
>> >   uri:
>> > url: "
>> https://x.x.x.x/wapi/v2.9/member?_return_fields%2B=service_status&_return_as_object=1
>> "
>> > method: GET
>> > user: admin
>> > password: ""
>> > validate_certs: no
>> >   register: pool_members_service_status
>> >
>> > #- debug:
>> > #msg: "{{ pool_members_service_status }}"
>> > - lineinfile:
>> > path: "/root/logs/infoblox-{{ dates }}.log"
>> > create: yes
>> > line: "{{ item }}"
>> >   with_items:
>> > - "{{ pool_members_resource }}"
>> > - "{{ pool_members_service_status }}"
>> >
>> > #- hosts: "{{ nagios_node }}"
>> > #  gather_facts: false
>> > #  tasks:
>> > #- copy:
>> > #src: "/root/logs/infoblox-{{ dates }}.log"
>> > #dest: /var/tmp/nagios_logs/infoblox/
>> > #owner: nagios
>> > # 

Re: [ansible-project] Ansible fetch only fetch specific file from directory not entire directory contents

2020-01-06 Thread Vivek Kothawale
FYI ...


On Mon, Jan 6, 2020, 2:59 PM Dick Visser  wrote:

> According to the comments on the 'src' parameter of the module on
> https://docs.ansible.com/ansible/latest/modules/fetch_module.html:
>
> The file on the remote system to fetch.
> This must be a file, not a directory.
> Recursive fetching may be supported in a later release.
>
>
>
>
> On Mon, 6 Jan 2020 at 08:57, Vivek Kothawale 
> wrote:
> >
> > Hi Team
> >
> >
> > While working with ansible fetch feature which is one of the best
> feature I found in ansible, I found that ansible fetch will only pull in
> the single file form remote machine it can not fetch (pull) entire
> directory contents
> >
> >
> > form remote machine which I found while running playbook I got below
> message fetch cannot work on directories, not transferring, ignored",Is
> this some kind of ansible fetch drawback or will this be resolve in new
> >
> >
> > feature ?
> >
> >
> > Please let me know
> >
> >
> > Thanks,
> > Vivek
> >
> > --
> > 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/7d56e222-6b5d-46fb-b14d-bce093b83ba8%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/CAL8fbwPwxD7OviP8%3DJGDqAGzZugKi5EZz25PS-jkTdO%2BX88TCg%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/CAA420E9J%2Bxfk6ECHBqY_eK1hEF9H-WWC9CnN_o9tMBgRUy-79Q%40mail.gmail.com.


[ansible-project] Ansible fetch only fetch specific file from directory not entire directory contents

2020-01-05 Thread Vivek Kothawale


Hi Team


While working with ansible fetch feature which is one of the best feature I 
found in ansible, I found that ansible fetch will only pull in the single 
file form remote machine it can not fetch (pull) entire directory contents


form remote machine which I found while running playbook I got below 
message fetch cannot work on directories, not transferring, ignored",Is 
this some kind of ansible fetch drawback or will this be resolve in new 


feature ?


Please let me know


Thanks,
Vivek

-- 
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/7d56e222-6b5d-46fb-b14d-bce093b83ba8%40googlegroups.com.