[ansible-project] how to get the name of current running playbook

2018-08-03 Thread Han Lu
I want to get the playbook name I performed. ie: ansible-playbook -i hosts test.yaml test.yaml is the playbook name I want to get. Is there a variable hold the value of "test.yaml" ? use case: - name: run test cases if the playbook is test.yaml shell: some test command when: current_play ==

[ansible-project] Re: Adding windows as client to Ansible server

2018-08-03 Thread Julien
Hello Vamsi, Can you try to run this script into your windows host and retry? It is an official script made by ansible team to configure WinRM https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -- You received this message because you are subscribe

[ansible-project] Re: I want to make a specific loop but don't know the way how to do it

2018-08-03 Thread Julien
I always need a solution :) up -- 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 post to this group, send email

[ansible-project] Galaxy Release 3.0.5

2018-08-03 Thread chousekn
Galaxy release 3.0.5 was deployed today, 3 August, at 6:00 AM Eastern. This was a maintenance release that addressed the following bug fixes and closed PRs: Bug Fixes - Fixed broken error handling on home page, when 500 errors arise from the Namespace resource. Issue #981

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread yaakov.kuperman via Ansible Project
Awesome! Thanks! YK On Thursday, August 2, 2018 at 6:04:12 PM UTC-4, Brian Coca wrote: > > You can use the appropriate service module: > > - service: name=myservice enabled=yes > check_mode: true > register: isit > > - fail: msg=its not enabled > when: isit is changed > > > > > > -- >

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread Adam Miller
On Fri, Aug 3, 2018 at 7:52 AM yaakov.kuperman via Ansible Project wrote: > > Awesome! Thanks! As an option, you can also use the service_facts module to inspect service state: https://docs.ansible.com/ansible/latest/modules/service_facts_module.html#service-facts-module -AdamM > > YK > On Thu

[ansible-project] Use ansible to stop/start components of an application

2018-08-03 Thread samuel desseaux
Hello, I work on a project to manage some applications. We have some applications and for an application, each component is on a different server. As we have more than 200 applications, we would like to use ansible to manage them when we have to stop/start for maintenance. How can i do this?

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread Pavel Cahyna
On Fri, Aug 03, 2018 at 08:14:15AM -0500, Adam Miller wrote: > On Fri, Aug 3, 2018 at 7:52 AM yaakov.kuperman via Ansible Project > wrote: > > > > Awesome! Thanks! > > As an option, you can also use the service_facts module to inspect > service state: > https://docs.ansible.com/ansible/latest/mo

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread yaakov.kuperman via Ansible Project
I was actually thinking of trying to change that, but I'm short on time. Should I log a ticket or is that out of scope for the module? I was also thinking about making it possible for service_facts to operate only on a single service, in order to save time on data collection. Same question - s

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread Adam Miller
On Fri, Aug 3, 2018 at 8:29 AM yaakov.kuperman via Ansible Project wrote: > > I was actually thinking of trying to change that, but I'm short on time. > Should I log a ticket or is that out of scope for the module? > > I was also thinking about making it possible for service_facts to operate >

Re: [ansible-project] Is there a way to check if a service is already enabled on a linux machine?

2018-08-03 Thread yaakov.kuperman via Ansible Project
done, for both: https://github.com/ansible/ansible/issues/43641 https://github.com/ansible/ansible/issues/43642 On Friday, August 3, 2018 at 9:43:39 AM UTC-4, Adam Miller wrote: > > On Fri, Aug 3, 2018 at 8:29 AM yaakov.kuperman via Ansible Project > > wrote: > > > > I was actually thinking of

Re: [ansible-project] Re: Install R packages via Ansible

2018-08-03 Thread Brian Coca
Ansible does not currently have an 'R package manager' so you'll need to use the shell/command modules to install R packages not available via the OS package manager. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Re: wait_for JoinDomain, does it exist?

2018-08-03 Thread Sylvain Martel
Unfortunately, wait_for_connection requires WinRM to be enabled on the windows guest, and WinRM is only configured after we join the server to the domain. The reason being that the certificate to configure WinRM comes from the Domain CA.(We refuse to use self-signed certificate because, frankl

[ansible-project] Re: wait_for JoinDomain, does it exist?

2018-08-03 Thread Sylvain Martel
We're also new to Ansible, so not sure either if this can be done, but I'll dig into it. Thanks! On Thursday, 2 August 2018 16:08:22 UTC-4, Luis Bonilla wrote: > > I'm about to get into Ansible so I'm not too familiar with which modules > you can use but if you can create a variable that repres

[ansible-project] running ptython script in role

2018-08-03 Thread christian . tremel
i want to run a python script in a role. currently the script is in the tasks directory but i also tried the file dir which also is not working. where i have to put this script so it can be found at runtime? - local_action: command "{{ item }}" with_items: - "inventoryctl.py group -

[ansible-project] Tower installation question

2018-08-03 Thread taylorjs69
I have a RJEL 7 server that I'm getting ready to install Tower on, but I have created a second disk that I would like the database installed on. Is this possible? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this gro

[ansible-project] Trouble with ec2_vpc_vgw

2018-08-03 Thread ttwalto
I am trying to run ec2_vpc_vgw just to attach a vpc to a vgw (virtual private gateway). The vgw and vpc both already exist. I don't need to create them. Here's what I run: - name: attach vpc to virtual private gateway ec2_vpc_vgw: region: "{{ openshift_aws_region }}" vpc_id: "{{ vpcout

Re: [ansible-project] ansible: set fact with multiple values

2018-08-03 Thread Kai Stian Olstad
On 02.08.2018 11:36, christian.tre...@itsv.at wrote: hmmthis seems a little bit sophisticated as the list of groups is much longer in reality as in my example code which has only 4, so this leads to a big variable mess. no way to reference the group names in any other way? I don't think I

[ansible-project] Turn off auto-alphabetic ordering with URI module

2018-08-03 Thread Nojan Sheybani
Is there a way to disable the alphabetic ordering that is applied to a file being POSTed using the URI module? -- 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 t

Re: [ansible-project] running ptython script in role

2018-08-03 Thread Kai Stian Olstad
On 03.08.2018 16:29, christian.tre...@itsv.at wrote: i want to run a python script in a role. currently the script is in the tasks directory but i also tried the file dir which also is not working. where i have to put this script so it can be found at runtime? It's using path to find the exec

[ansible-project] Install R packages via Ansible

2018-08-03 Thread Mischa ter Smitten
You might want to have a look at https://github.com/Oefenweb/ansible-r -- 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...@googlegroup

Re: [ansible-project] Looping over include_tasks serializes execution across the host batch

2018-08-03 Thread Kai Stian Olstad
On 27.07.2018 10:59, ALF wrote: Hi, I wrote a role where I execute a task file for every interface of each target machine. Unfortunately, when reaching the loop the engine allows only one target at a time to execute the included tasks and stall the others with NOOP. How can I modify my code to

[ansible-project] Win_update

2018-08-03 Thread Izzy
Is anyone using win_update for their windows servers on vmware to patch them Or working for them? For the life of me, I can't make them install available updates. I'm just curious how others are handling it if at all. FYI I am running 6.5 VMware and ansible 2.4 version because 2.6 broke my playbook

Re: [ansible-project] Looping over include_tasks serializes execution across the host batch

2018-08-03 Thread Matt Martz
It's a little hard to say based on the small amount of information you have given, however an `include_tasks` is uniquely defined by 3 items: 1. the file being included 2. the args passed to the include (in most cases this is just `item` from a loop) 3. the parent of the include This uniqueness i

[ansible-project] Re: wait_for JoinDomain, does it exist?

2018-08-03 Thread Jordan Borean
Sounds like wait_for_connection will still work. If you are waiting for it to be joined to the domain and that's when winrm will be active then it sounds like it does what you want. wait_for_connection does run over WinRM but if it isn't available it will keep on retrying until it either works o

[ansible-project] Re: wait_for JoinDomain, does it exist?

2018-08-03 Thread Sylvain Martel
Our current Ansible workflow is like this: 1- Deploy VM from template, using vmware_guest and we do a join domain as part of the customization feature. But the vmware_guest module does not wait for customization to finish before giving back control to Ansible for the next step. 2- Execute a po

Re: [ansible-project] Trouble with ec2_vpc_vgw

2018-08-03 Thread Karl Auer
I have not tried this myself, but it occurs to me that maybe you should be using ec2_vpc_vpn to modify the VPN's gateway, rather than using ec2_vpc_vgw to modify the gateway's VPN. That is, don't think of it as attaching a VPN to a gateway, think of it as associating a gateway with a VPN. BTW, na

[ansible-project] Re: wait_for JoinDomain, does it exist?

2018-08-03 Thread Luis Bonilla
Remember that in vCenter the VM name being reported by the VM tools should be host.domain.com so you can get this info from vCenter -- 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

Re: [ansible-project] Re: Ansible adhoc command/playbook is not displaying output for the passed argument

2018-08-03 Thread Ajay Kumar Manukonda
Hi Ganesh, Thanks for suggesting me the right resources to get started with ansible automation for network devices. The problem is we run a multi-vendor environment and this particular issue only occurs with Dell Force10 devices running "Force10 Operating System". I still wasn't able to find an ea

[ansible-project] how split csvfile for each row for single column

2018-08-03 Thread Atul Sharma
I dont find way to use row with column , in csvfile module it is splitting only for single row it is not included rest of the lines in csvfile to split please share how to can do achieve this? following playbook i am using ### --- - hosts: localhost con

[ansible-project] win_shell task failing with ansible error: Get-AnsibleParam: Missing required argument: _raw_params

2018-08-03 Thread Ali Khawaja
Ansible version: 2.6.1 (and I tried with 2.7.0 development branch as well) I have a simple win_shell task though which I am trying to execute powershell script which is sitting on the remote system. I have verified the path and the existence of script. - name: DPS Server Installation win_shel