[ansible-project] Ansible service module

2017-11-12 Thread Harish Singh
Hey !! If I am working with ansible service module, if in case my tomcat take time more then min. Or 2 min. How can I verify if my service stop only then next step will run. ?? Or service module can take care this will hold till services not stopped. ?? Live env took time so not able to test

Re: [ansible-project] Re: How to append to list vars

2017-11-12 Thread Dick Visser
Thanks but I prefer the union approach as that takes care of removing any double values. Dick On Thu, 2 Nov 2017 at 19:55, Arbab Nazar wrote: > Dick, something like this: > http://blog.crisp.se/2016/10/20/maxwenzin/how-to-append-to-lists-in-ansible > > > On Wednesday,

Re: [ansible-project] Install Java using its source :: Ansible

2017-11-12 Thread Dick Visser
You could write up everything from scratch. But since this is a common requirement many people have already done that. I would just use one of those roles, for instance https://github.com/frieder/ansible-role-oraclejdk/blob/master/README.md. Dick On Mon, 13 Nov 2017 at 04:57,

Re: [ansible-project] ansible2.4 can not run dockerd(binary) in backgroud

2017-11-12 Thread twinmegami arara
log only shows ``` time="2017-11-13T06:28:03.485879714+01:00" level=warning msg="could not change group /var/run/docker.sock to docker : group docker not found" time="2017-11-13T06:28:03.488257938+01:00" level=info msg="libcontainerd: new containerd process, pid: 8426" ``` I also tried install

[ansible-project] Install Java using its source :: Ansible

2017-11-12 Thread luke . devon80
Hi I want to install java using its source (tar.gz) for number of redhat servers . Can you please give me a little guide ? How can I use ansible for this task and what are the command list ? For example : I have 10 no.of redhat 7.2 servers and I want to install

[ansible-project] ansible ping with specific user dont work

2017-11-12 Thread iamlightsocialxen
Hello All, Just new to Ansible and trying to implement in our organozation. Noticed this, When ran ping from root user prompt by mentioning "delpoy" user , it errors out. ++ [root@dev-armor21 ~]# ansible all -m ping --user=delpoy dev-mado21 | UNREACHABLE! =>

[ansible-project] Re: Ansible playbook yaml syntax errors

2017-11-12 Thread Veera
Thanks a Lot. What I did is ,indent the lines as in the exact examples of per the examples of modules yum, copy and uri and it worked . This program is an example given for me to learn block and I continue with that . when I learn block completely , I will do the changes as you

Re: [ansible-project] HowTo run tasks only after a snapshot was successfully taken?

2017-11-12 Thread Jörg Kastning
Am 12.11.2017 um 15:23 schrieb Kai Stian Olstad: >> Here is a not working example playbook: >> --- >> - hosts: localhost >> connection: local > > Instead of using hosts: localhost, you could use the inventory hostname or > the group. > Since you have connection: local it will run on the

Re: [ansible-project] E-mail Playbook Results of Ansible Run

2017-11-12 Thread Kai Stian Olstad
On lørdag 11. november 2017 19.22.33 CET Jon Adcock wrote: > I've setup an Ansible (v2.4) playbook that configures/checks for compliance > with a list of (STIG-based) security checks. I have this playbook > scheduled in cron to run weekly but I really want to get an e-mail > reporting on the

Re: [ansible-project] group_vars still needs for vars: in playbook

2017-11-12 Thread Kai Stian Olstad
On lørdag 11. november 2017 18.40.01 CET Federico Olivieri wrote: > Hi all, > I moved host variables from inventory to group_vars/all: > > In one example I have seen that, once moved the variable, it is possible to > remove vars: from playbook (like the playbook automagically discover the >

Re: [ansible-project] Running ansible script on same host multiple times?

2017-11-12 Thread Kai Stian Olstad
On lørdag 11. november 2017 08.42.12 CET SHUBHAM JAIN wrote: > Thank you so much Kai for your solution. it will definitely help me. > I am using inventory_hostname so name will be different according to your > solution but i wanted same name. > I want to automate multiple kafka brokers on single

Re: [ansible-project] HowTo run tasks only after a snapshot was successfully taken?

2017-11-12 Thread Kai Stian Olstad
On torsdag 9. november 2017 10.50.54 CET Jörg Kastning wrote: > let me explain my scenario first, before I come to my question. > > We run most of our linux servers as virtual machines in VMware vSphere > Clusters. I would like to use a playbook that takes a snapshot from a vm > befor it runs