[ansible-project] finding a phrase through ansible script

2018-04-11 Thread Bishwajit Samanta
i am having a problem in finding solution. I have a piece of file which contains data in below format (json type with quotes)::- hostinfo: 'host001': ip: x.x.x.x hostclass: 'puppet' 'host002': ip: y.y.y.y hostclass: 'ess' 'host003': ip: z.z.z.z hostclass: 'mdb' No

[ansible-project] Re: finding a phrase through ansible script

2018-04-11 Thread Bishwajit Samanta
#x27;, 'equalto', 'ess')|first|first }}" ~ ~ On Wednesday, April 11, 2018 at 8:54:15 PM UTC+5:30, Bishwajit Samanta wrote: > > i am having a problem in finding solution. I have a piece of file which > contains data in below format (json type with quotes):

[ansible-project] Re: finding a phrase through ansible script

2018-04-11 Thread Bishwajit Samanta
googled selectattr but first|first parameter which you have passed i am not getting any good document. If you can help me in referring such, it would be of very nice help. On Wednesday, April 11, 2018 at 9:36:13 PM UTC+5:30, Bishwajit Samanta wrote: > > I am glad you replied so fast, but sorry

Re: [ansible-project] Re: finding a phrase through ansible script

2018-04-11 Thread Bishwajit Samanta
on > Jinja2 at http://jinja.pocoo.org/docs/dev/templates/ > > For the `first` filter specifically: > http://jinja.pocoo.org/docs/dev/templates/#first > > On Wed, Apr 11, 2018 at 11:47 AM, Bishwajit Samanta < > bishwajits...@gmail.com > wrote: > >> @Matt Martz : I am

[ansible-project] unable to fit the piece of code in ansible

2018-04-11 Thread Bishwajit Samanta
Hi all, I am a beginner in ansible. If anyone can help me in finding the answer. It would be great. My problem was finding a phrase in ansible which one of the person have helped me. But unfortunately i am not able to fit the piece of code in my playbook. hostinfo: host001': ip: 192.168.

[ansible-project] Re: List of running processes form multiple linux hosts using with_items

2018-04-12 Thread Bishwajit Samanta
I just changed the host as devops --- - hosts: devops gather_facts: no tasks: - name: Get the running process across the systems command: ps -ef register: output - name: Getting some details of systems local_action: copy content={{ output }} dest=/opt/{{ inventory_h

[ansible-project] Re: current run timestamp

2018-04-12 Thread Bishwajit Samanta
[defaults] I used callback_whitelist = profile_tasks You can set it in ansible.cfg. That can solve your problem i guess. On Wednesday, March 21, 2018 at 3:57:59 AM UTC+5:30, ordered...@gmail.com wrote: > > I want to set it up so there is a current ansible playbook run timestamp > set at the

[ansible-project] Re: unable to fit the piece of code in ansible

2018-04-12 Thread Bishwajit Samanta
Any one can suggest any idea please.. On Thursday, April 12, 2018 at 8:21:32 AM UTC+5:30, Bishwajit Samanta wrote: > > Hi all, > > I am a beginner in ansible. If anyone can help me in finding the answer. > It would be great. My problem was finding a phrase in ansible which one o

[ansible-project] Re:

2018-04-12 Thread Bishwajit Samanta
i have configured once, this during the time i have change certain parameters in the host file, where i declared the connection type as winrm etc. If you can share your host file configuaration, may be i can look into it. On Thursday, April 12, 2018 at 5:13:54 PM UTC+5:30, ishita pandey wrote:

[ansible-project] Re:

2018-04-12 Thread Bishwajit Samanta
Share me your host file which you have configured in ansible, where you have decalared your connection type as winrm etc. May be i can look into it and help you. On Thursday, April 12, 2018 at 5:13:54 PM UTC+5:30, ishita pandey wrote: > > Hi team, > > > I am trying to setup winrm connection to w

Re: [ansible-project] Re: unable to fit the piece of code in ansible

2018-04-12 Thread Bishwajit Samanta
u want to achieve. That is, > describe the end result that you are seeking. > > That is more likely to get a useful response. > > Regards, K. > > > On Thu, Apr 12, 2018 at 9:58 PM, Bishwajit Samanta < > bishwajits...@gmail.com > wrote: > >> Any one can sugges

Re: [ansible-project] Re:

2018-04-12 Thread Bishwajit Samanta
Apr, 2018, 17:33 Bishwajit Samanta, < bishwajitsamanta1...@gmail.com> wrote: > Share me your host file which you have configured in ansible, where you > have decalared your connection type as winrm etc. May be i can look into it > and help you. > > On Thursday, April 12, 2018 a

[ansible-project] ansible with elastic search with Jinja2 Template

2018-04-13 Thread Bishwajit Samanta
Hi, my question is :: My ansible script will be running for multiple systems. But in elasticsearch.jinja2 how can i change the value of node.name for different systems. Jinja 2 Code::- --- # -- Cluster ---

Re: [ansible-project] Re: unable to fit the piece of code in ansible

2018-04-13 Thread Bishwajit Samanta
; - hosts: somehost >> gather_facts: no >> vars_files: >> file: sometext.yaml >> name: sometext >> >> - debug: >> msg: "{{ hostinfo|dictsort|selectattr('1.hostclass', 'equalto', >> 'ess')|first

[ansible-project] Re: ansible with elastic search with Jinja2 Template

2018-04-13 Thread Bishwajit Samanta
Can anyone help me in my problem please ? On Friday, April 13, 2018 at 8:21:31 PM UTC+5:30, Bishwajit Samanta wrote: > > > > Hi, my question is :: > > > My ansible script will be running for multiple systems. But in > elasticsearch.jin

[ansible-project] Re: ansible with elastic search with Jinja2 Template

2018-04-13 Thread Bishwajit Samanta
can use: > node.name:{{inventory_hostname}} > > Which will use the inventory hostname defined in your Ansible inventory. > > For reference: > > https://github.com/mrlesmithjr/ansible-elasticsearch/blob/master/defaults/main.yml#L74 > > Hope this helps. > > On Friday, April

[ansible-project] Postgresql (Peer Authentication Error) with Ansible 2.4

2018-04-15 Thread Bishwajit Samanta
Hi, i am having a problem in setting up postgresql through ansible. Error::- -- Peer authentication failed for user "postgres". I checked google, i found people as saying i need to use become and become_user: postgress. But even after doing that i am getting, that those are not valid

[ansible-project] Re: Postgresql(psycopg2.ProgrammingError: relation "products" does not exist) with Ansible 2.4

2018-04-15 Thread Bishwajit Samanta
e(query)\n File \"/usr/lib/python2.7/dist-packages/psycopg2/extras.py\", line 120, in execute\nreturn super(DictCursor, self).execute(query, vars)\npsycopg2.ProgrammingError: relation \"products\" does not exist\n\n", "module_stdout": "", "

[ansible-project] Unable to use Shell script for Search guard Plugin in Elastic Search with Ansible

2018-04-16 Thread Bishwajit Samanta
Hi All, I am running a shell script for installation of Search Guard Plugin for Elastic Search. Below is the error given. If any body knows any better way for Search Guard plugin you can suggest me. Playbook: - --- - hosts: deploy gather_facts: no tasks: - script: /opt/search

[ansible-project] Query ::- Ansible VPN connect

2018-04-27 Thread Bishwajit Samanta
Hi all, I have a query about Connecting Ansible with VPN. In our Environment we have Cisco VPN connected. Would it be possible to connect ansible to those systems connected via CISCO VPN and then perform the tasks i gave for it ? Any source or links about this knowledge is welcomed... --

Re: [ansible-project] Query ::- Ansible VPN connect

2018-04-27 Thread Bishwajit Samanta
Any help .. any idea please ... On Fri 27 Apr, 2018, 17:11 Bishwajit Samanta, < bishwajitsamanta1...@gmail.com> wrote: > Hi all, > > I have a query about Connecting Ansible with VPN. > > In our Environment we have Cisco VPN connected. > > Would it be possible

[ansible-project] Apache Karaf Output via Ansible

2018-05-04 Thread Bishwajit Samanta
Hi Team, Is there any way to get the output of Karaf through ansible:: If i am executing the below command::- # echo encrypt-text abcd | ./client ( I am getting the below output ) 1249 [sshd-SshClient[6d78f375]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier -

Re: [ansible-project] Apache Karaf Output via Ansible

2018-05-04 Thread Bishwajit Samanta
I resolved the issue.. :) On Fri 4 May, 2018, 17:24 Bishwajit Samanta, wrote: > Hi Team, > > Is there any way to get the output of Karaf through ansible:: > > If i am executing the below command::- > > # echo encrypt-text abcd | ./client ( I am getting the below ou

[ansible-project] Unable to install through dpkg in Ansible

2018-05-05 Thread Bishwajit Samanta
Hi, I am trying to install a .deb Package through Ansible, it is not getting installed. Error:- -- TASK [recon_app : Install the Deb Package of ReconApp] *** Saturday 05 May 2018 18:34:02 +0530 (0:00:00.034) 0:00:00.034

[ansible-project] Unable to run Jenkins in docker container using Ansible

2018-05-21 Thread Bishwajit Samanta
Dear All, I am not able to run jenkins inside docker container using ansible playbook. Jenkins is getting started but unable to run it - name: Download Jenkins Container docker_container: name: Jenkins_server image: jenkins state: started ports: - "8080:8080"

[ansible-project] Vmware Esxi with Ansible

2018-08-28 Thread Bishwajit Samanta
Hi, I am trying to connect esxi 6.5 with ansible. I have copied ssh keys using ssh-copy-id to root id of the esxi server but when i am executing ansible -m ping vmware(ip) it says permission denied. Any idea how to make it work out ? 192.168.119.129 | UNREACHABLE! => { "changed": false,

[ansible-project] Re: Vmware Esxi with Ansible

2018-08-29 Thread Bishwajit Samanta
eg Porter wrote: >> >> Hmm. Well, by default ESXi hypervisors have ssh turned off. You need to >> manually go turn it on. Make sure ssh is running on the host. >> https://pubs.vmware.com/vsphere-6-5/index.jsp?topic=%2Fcom.vmware.vcli.getstart.doc%2FGUID-C3A44A30-EEA5-4

[ansible-project] Standalone ESXI with Vmware (Evaluation Version ESXI)

2018-09-06 Thread Bishwajit Samanta
Dear Team, I want to Run some shell commands in Vmware through Ansible. But i am facing Some errors. If possible can you help me. - name: Run command inside a vm vmware_vm_shell: hostname: 192.168.119.129 username: x password: xx datacenter: vnt

[ansible-project] when clause in Ansible not working + Vmware

2018-09-08 Thread Bishwajit Samanta
Hi Team, When clause is not working in Ansible as it is getting skipped. Can anybody help me with the error. --- - name: "Collecting Vmware Guest Facts" hosts: localhost vars: msg: | {{ value.instance.hw_power_status }} tasks: - name: Gathering Facts vmware_gu

[ansible-project] Re: Standalone ESXI with Vmware (Evaluation Version ESXI)

2018-09-08 Thread Bishwajit Samanta
Any help ? On Thursday, September 6, 2018 at 5:30:20 PM UTC+5:30, Bishwajit Samanta wrote: > > Dear Team, > > I want to Run some shell commands in Vmware through Ansible. But i am > facing Some errors. If possible can you help me. > > > - name:

[ansible-project] Vmware + when clause in Ansible

2018-09-08 Thread Bishwajit Samanta
Hi I am not able to use the Vm Poweredoff status in my when clause. Can anyone tell me how to fix it. - name: "Collecting Vmware Guest Facts" hosts: localhost vars: msg: | {{ value.instance.hw_power_status }} tasks: - name: Gathering Facts vmware_guest_facts:

[ansible-project] Can we Run Command in Jinja2 Template

2019-07-10 Thread Bishwajit Samanta
Hi Team, I was curious can we run command in jinja2 template say example {{pwd}} === here pwd is a shell command. -- 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 ema

[ansible-project] Folder Permission for Multiple directories at once

2019-08-07 Thread Bishwajit Samanta
Hi All, I am trying to achieve mentioning multiple directories in var.yml so that in loop i can give them folder permission however it is not working. Can anyone help me here. --- - name: "File List" hosts: localhost gather_facts: no become: yes become_user: root tasks: - include_vars: var.yml

[ansible-project] Multiple Directories Multiple Permissions

2019-08-08 Thread Bishwajit Samanta
Hi, I am looking for ways to solve my problem statement. I have a list of directories with different permissions for example, /path/to/folderA: 0755 /path/to/folderB: 0754 /path/to/folderC: 0745 Now today I have 3 folders of 3 different permissions tomorrow I have 6 folders of 6 different perm

Re: [ansible-project] Multiple Directories Multiple Permissions

2019-08-08 Thread Bishwajit Samanta
}" > mode: "{{ item.mode }}" > loop: "{{ folders }}" > > > On Thu, 8 Aug 2019 at 18:04, Bishwajit Samanta > > wrote: > > > > Hi, > > > > I am looking for ways to solve my problem statement. > > > >

[ansible-project] Running Ansible with Concourse

2019-11-18 Thread Bishwajit Samanta
Hi, I am trying to run ansible within Concourse, however when i am running i am only able to ping localhost. I cannot make passwordless login. I may be missing somewhere. Below are my steps:- I need some guidance as i am not able to Find any resource in Internet. Concourse Yaml File:- --- reso