[ansible-project] Re: DNS lookup issue on Ansible

2016-06-17 Thread 'J Hawkesworth' via Ansible Project
I doubt ansible has its own dns cache. I forget which distro it was now but a while back i used to have to occasionally restart nscd service when I had dns problems like this. Hope this helps, Jon On Friday, June 17, 2016 at 2:20:55 PM UTC+1, Julien Deloubes wrote: > > Problem disappeared but

[ansible-project] Re: Run a script with a space in its path?

2016-06-22 Thread 'J Hawkesworth' via Ansible Project
So just so we are clear... script attempts to pick .ps1 off your ansible controller and transfer it to the windows node before running it. If you want to run a .ps1 that is already there right now your only choice is to use raw. If your script task is in a role then 'role magic' (as I have jus

[ansible-project] Re: Run a script with a space in its path?

2016-06-22 Thread 'J Hawkesworth' via Ansible Project
at creating a module for this. That'd certainly be a > little cleaner than adding an additional task to save some info to a > register variable and use that to implement a custom `changed_when` setting > for this task. > > But just for clarification – *should *the script modu

[ansible-project] Re: Have a script start running at a certain tag and run for every task that follows

2016-06-23 Thread 'J Hawkesworth' via Ansible Project
Sounds like you might need --start-at-task see http://docs.ansible.com/ansible/playbooks_startnstep.html It's been a while since I looked at the Tower ui but I think its an option on the each job from what I remember. Hope this helps, Jon On Thursday, June 23, 2016 at 12:49:29 AM UTC+1, mgolds

[ansible-project] Re: Help test WinRM updates for NTLM, kerb delegation

2016-06-23 Thread 'J Hawkesworth' via Ansible Project
Not to steal Matt's fire but I can confirm 0.2.0 is released. I have been running some tests against 2.1.1 rc1 this week and I can run all the windows integration tests in just over 15 mins on my test box (against Server 2012 R2). I installed pywinrm 0.2.0 and the same test runs in just over 10

[ansible-project] Re: Domain Authentication

2016-06-23 Thread 'J Hawkesworth' via Ansible Project
Hi Mark, I've not tried the NTLM support yet but I think you might need to set ansible_winrm_server_cert_validation: ignore ... in your inventory/ group_vars. Otherwise python will attempt to validate the certificate presented by your windows vm, which is (very likely) self signed one. Give

[ansible-project] Re: winrm and https

2016-06-23 Thread 'J Hawkesworth' via Ansible Project
As well as getting a valid, trusted cert generated for your host (and each of your windows hosts), I believe you should use the hostname rather than ip address. On Thursday, June 23, 2016 at 3:32:51 PM UTC+1, František Griga wrote: > > Hello, > > I have a problem with using Ansible to manage W

[ansible-project] Re: Write raw file with newlines intact

2016-06-24 Thread 'J Hawkesworth' via Ansible Project
Does it have to be stored as a var? Could you use the synchronize module (rsync wrapper) delegated to one host to rsync it straight to the other? If the source file doesn't actually vary that much you can use template / win_template module and add the jinja2 directive to instruct the template

[ansible-project] Re: launch executable on remote node

2016-06-24 Thread 'J Hawkesworth' via Ansible Project
I wouldn't know for sure but it would be unusual. Usually web services have some kind of client which can be launched independently from a web service. When you are doing things via winrm, its my understanding that there is no interactive user session, meaning there's no gui associated with th

[ansible-project] Re: launch executable on remote node

2016-06-24 Thread 'J Hawkesworth' via Ansible Project
Hmm. It sounds like the gui app could do with being split up into a windows service with a separate client app for the gui interface. I have encountered older windows apps which run as services but also present a GUI. For security reasons Microsoft have discouraged this for years now but I pu

[ansible-project] Re: Ansible and 'Ubuntu on Windows'

2016-06-24 Thread 'J Hawkesworth' via Ansible Project
7 UTC+2, Edgars rakstīja: >>> >>> I just installed Ansible on Windows 10/Ubuntu. Ansible works just fine >>> if I install it with apt-get (that is version 1.5.4). When I installed >>> ansible with pip, I hit the mentioned bug, >>> >>> Edgars &

[ansible-project] Re: SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

2016-06-28 Thread 'J Hawkesworth' via Ansible Project
Hi, Since python 2.7.9 ( I think) python's default behavior has been to validate certificates for any https connections. The certificate used by the windows hosts is likely self-generated, therefore won't be fully trusted. So in order to avoid the certificate check, you have to set the follow

[ansible-project] Re: Using backslash in Windows path

2016-06-28 Thread 'J Hawkesworth' via Ansible Project
Can you give a bit more detail? Don't forget that as well as python parsing, there is yaml parsing and if you are using templates - {{ }} then there is jinja2 parsing too. So can you share a minimal version of the problem? Jon On Tuesday, June 28, 2016 at 9:22:55 PM UTC+1, Karol Olczak wrote:

[ansible-project] Re: 500 WinRMTransport. SSL: CERTIFCATE_VERIFY_FAILED

2016-06-28 Thread 'J Hawkesworth' via Ansible Project
Hi, I think you don't need to set ansible_winrm_transport: ssl assuming you have set ansible_port: 5986 This is because 5986 is the https listener port for winrm Please can you try without this setting and report back? On Tuesday, June 28, 2016 at 9:22:57 PM UTC+1, Brian wrote: > > Install

[ansible-project] Re: Using backslash in Windows path

2016-06-28 Thread 'J Hawkesworth' via Ansible Project
this helps, Jon On Tuesday, June 28, 2016 at 11:04:19 PM UTC+1, J Hawkesworth wrote: > > Can you give a bit more detail? > > Don't forget that as well as python parsing, there is yaml parsing and if > you are using templates - {{ }} then there is jinja2 parsing too. > &

[ansible-project] Re: Help test WinRM updates for NTLM, kerb delegation

2016-07-01 Thread 'J Hawkesworth' via Ansible Project
ssues. Jon On Friday, July 1, 2016 at 10:05:21 AM UTC+1, Trond Hindenes wrote: > > So we can get these bits simply by doing pip install pywinrm==0.2.0 now? > > On Thursday, June 23, 2016 at 3:48:31 PM UTC+2, J Hawkesworth wrote: >> >> Not to steal Matt's fire but I can

[ansible-project] Re: VMware VM's Configuring Server Names

2016-07-04 Thread 'J Hawkesworth' via Ansible Project
Hi Mark, There are two as-yet-not-merged Pull Requests that tackle renaming windows hosts: https://github.com/ansible/ansible-modules-extras/pull/213 and https://github.com/ansible/ansible-modules-extras/pull/33 Would you able to test them out and see what works and make most sense to use?

[ansible-project] Re: Windows Task in a role for Linux hosts? How?

2016-07-05 Thread 'J Hawkesworth' via Ansible Project
Looks like you need to target your linux hosts and your windows ca machine like this: hosts: linux:windows-ca Then either delegate_to: linux or delegate_to: windows-ca >From the above you might also need to set become: false on the tasks you are delegating to windows It might make sense to b

[ansible-project] Re: Error in win_share

2016-07-05 Thread 'J Hawkesworth' via Ansible Project
Not sure -name: is valid for an entire playbook Instead of - name: Windows Sharing hosts: newserver try - hosts: newserver On Tuesday, July 5, 2016 at 2:56:59 PM UTC+1, megha sharma wrote: > > - name: Windows Sharing > hosts: newserver > tasks: > - name: Add secret share >

[ansible-project] Re: What does {{ vars|random }} do ?

2016-07-05 Thread 'J Hawkesworth' via Ansible Project
This is a filter - have a look at the documentation here: http://docs.ansible.com/ansible/playbooks_filters.html#random-number-filter On Tuesday, July 5, 2016 at 3:59:08 PM UTC+1, Anthony Cheng wrote: > > Looking over some ansible ec2 script I see reference to: > > "{{ vars|random }}" > > e.g.

Re: [ansible-project] Re: Version (and other) problems with Ansible Azure Modules

2016-07-07 Thread 'J Hawkesworth' via Ansible Project
Just a guess but if you are running ansible from source and switching between branches, you may need to run a make clean to get rid of any .pyc files Hope this helps, Jon On Thursday, July 7, 2016 at 4:26:17 AM UTC+1, Steven Carter wrote: > > Strange, I thought that I had this working with a

[ansible-project] Re: Parallelism in single host

2016-07-08 Thread 'J Hawkesworth' via Ansible Project
See http://docs.ansible.com/ansible/playbooks_async.html On Friday, July 8, 2016 at 12:19:01 PM UTC+1, krish wrote: > > Is it possible to execute tasks in parallel within same host without > splitting the plays. Is there any new functionality added newly for this ? > > -- You received this mess

[ansible-project] Re: on/off playooks for lots of resources w/o repeating them (minimal redundancy)

2016-07-11 Thread 'J Hawkesworth' via Ansible Project
I can think of a couple of ways - there are probably more One way would be by having both playbooks include a vars file which has the list of mounts in it: http://docs.ansible.com/ansible/include_vars_module.html or you could add the list of mounts to a group variable and have it apply to both

[ansible-project] Re: Login Credentials were rejected for Computers Attached to Active Directory

2016-07-11 Thread 'J Hawkesworth' via Ansible Project
So, for some reason it is trying to connect via ssl and not kerberos. I can think of two things for you to try: 1/ ensure you have install the python kerberos library as described here: http://docs.ansible.com/ansible/intro_windows.html#installing-python-kerberos Without this ansible will 'fal

[ansible-project] Re: launch executable on remote node

2016-07-11 Thread 'J Hawkesworth' via Ansible Project
This script can set up auto logon for a user. http://andyarismendi.blogspot.co.uk/2011/10/powershell-set-secureautologon.html I have a role that runs this script and then calls win_reboot to make the autologon happen. Hope this helps, Jon On Friday, July 8, 2016 at 5:36:59 PM UTC+1, skinnedknuc

[ansible-project] Re: launch executable on remote node

2016-07-12 Thread 'J Hawkesworth' via Ansible Project
Hi, Sorry role not shared anywhere right now. Keep meaning to put stuff on galaxy but haven't found the time. My apologies, looking at the code I'd forgotten that I'd tweaked the powershell script so I could pass in plaintext password. I doubt a SecureString would be serializable. I think t

[ansible-project] Re: How can i get the amount of free space (numerical value) in a logical disk drive in windows server 2012 R2

2016-07-13 Thread 'J Hawkesworth' via Ansible Project
Try something like this: Get-PsDrive C |select-object Free|ConvertTo-json You should then be able to use 'register' to capture the result and make use of it. By the way I found this which has a lot of good starting points for converting unix toolbox commands into powershell https://www.gitb

[ansible-project] Re: Create jira issue in ansible

2016-07-13 Thread 'J Hawkesworth' via Ansible Project
I think I had something like this. I think I fixed it by changing to 'yaml style' arguments instead of the key=value arguments. So try something like: jira: description:something issuetype: Bug operation: create password: project: xxx summary:test uri: https://hostname.c

[ansible-project] Re: launch executable on remote node

2016-07-13 Thread 'J Hawkesworth' via Ansible Project
Sorry to hear this, hope you can go back to a snapshot or similar? Can't really think why it would be different. I run the script like this: - name: set auto logon script: "setSecureAutoLogon.ps1 -Username {{ automation_user }} -Domain {{ windows_domain_name }} -Password {{ automation_passwor

[ansible-project] Re: How can i get the amount of free space (numerical value) in a logical disk drive in windows server 2012 R2

2016-07-14 Thread 'J Hawkesworth' via Ansible Project
ot; > ] > } > } > > > This is still not very useful. So i used *from_json* to parse the output. > > - debug: var="(drive.stdout | from_json).Free" > > and thus got the output in proper format: > > TASK [debug] > *** &g

[ansible-project] Re: EC2 slow cloud-init, Ansible SSH connection fails due to race condition (wait_for is not good enough)

2016-07-14 Thread 'J Hawkesworth' via Ansible Project
I'm not an ec2 user but I wonder if it might be possible to adapt the approach used here to wait for a webservice to return: https://groups.google.com/forum/#!topic/ansible-project/iLjIbsCASWU In that case he's using uri with an 'until' and using the 'default' filter to make sure no results doe

[ansible-project] Re: dynamically generated inventory (add_host) and playbook failures

2016-07-14 Thread 'J Hawkesworth' via Ansible Project
Maybe setting a max failure percentage for the play would help? http://docs.ansible.com/ansible/playbooks_delegation.html#maximum-failure-percentage I've not used maximum-failure-percentage myself so I don't know how easy it would be to identify the failed hosts to revisit though. Jon On Thursd

Re: [ansible-project] NTLM Delegation

2016-07-19 Thread 'J Hawkesworth' via Ansible Project
Just to clarify, delegation here means the ability to pass logged in credentials along to the remote host so that you can have the same rights and permssions on the remote host. This lets you do things like use remote shares in your playbooks. You can use NTLM with pywinrm 0.2.0 but I believe

[ansible-project] Re: Why is package management so convoluted with Ansible and Windows?

2016-07-19 Thread 'J Hawkesworth' via Ansible Project
I have a few ideas about why package management is a pain on windows. The first is that there is an assumption baked into a lot of aspects of windows that there is someone sitting in front of the screen. If you like windows is a 'workstation operating system'. The computer is right there in f

[ansible-project] Re: Error: global name 'VirtuaMachineSizeTypes' is not defined

2016-07-19 Thread 'J Hawkesworth' via Ansible Project
I believe there has been some change recently in the python library used to access azure. I think right now you might be best off using latest devel version of ansible to try out azure support. Hope this helps, Jon On Monday, July 18, 2016 at 8:35:20 PM UTC+1, Mohamed Ghaleb wrote: > > hey, any

[ansible-project] Re: including roles from roles?

2016-07-20 Thread 'J Hawkesworth' via Ansible Project
Someone mentioned a while back (here I think) a way to get dependent roles to run after roles is to create a wrapper role that references your dependent role - no tasks in it, just a meta/main.yml to point at the role that you want to run. Not a trick I have tried myself but it sounds like you

[ansible-project] Re: Creating ansible modules for windows

2016-07-21 Thread 'J Hawkesworth' via Ansible Project
You should just be able to put your custom modules in your /etc/ansible/library folder and they will become available to your playbooks. I think you have to have a module_name.ps1 and a module_name.py in /etc/ansible/library (the .py file is just used for documentation, but I think ansible mig

[ansible-project] Re: Error while doing kerbrose connection from Ansible to Windows

2016-07-22 Thread 'J Hawkesworth' via Ansible Project
Not sure what is wrong but kerberos needs DNS to work fully (both forward and reverse lookups). Check the hostname can be resolved to an ip from your ansible controller. Also check you have configured correct domain controllers in your /etc/krb5.conf Hope this helps, Jon On Friday, July 22,

[ansible-project] Re: Error while doing kerbrose connection from Ansible to Windows

2016-07-25 Thread 'J Hawkesworth' via Ansible Project
7; on position > 1 (argc 1) > " > > While using servername/ip in the hosts file and tries to getting conencted > the below mentioned error comes up. > > > On Friday, July 22, 2016 at 7:50:34 PM UTC+5:30, J Hawkesworth wrote: >> >> Not sure what is wrong bu

[ansible-project] Re: Error in NTLM for ansible to windows connection

2016-07-25 Thread 'J Hawkesworth' via Ansible Project
Have you followed the other setup steps described here? http://docs.ansible.com/ansible/intro_windows.html#windows-system-prep Jon On Monday, July 25, 2016 at 9:09:02 PM UTC+1, Rakshatha Shetty wrote: > > Hi, > > I'm using Ansible 2.1 and trying to do* NTLM connection* to windows > server, *ansi

[ansible-project] Re: win_regedit error "Input string was not in a correct formatInput string was not in a correct format"

2016-07-25 Thread 'J Hawkesworth' via Ansible Project
Which ansible version are you using? I recently fixed an error with handling change detection for dword type, so might be worth trying 2.1.1 RC5 if you can. Jon On Monday, July 25, 2016 at 9:09:02 PM UTC+1, Дубровин Юрий wrote: > > Hello. > > I have a problem with win_regedit. > > My code: > >

[ansible-project] Re: win_msi not installig the msi package

2016-07-26 Thread 'J Hawkesworth' via Ansible Project
I recommend using win_package instead of win_msi If you still want to use win_msi I recommend setting wait: true as this seems to make it run more reliably on Server 2008 R2 / Powershell 3.0. However I haven't seen your case where it appears to fail silently. I assume you have previously dow

[ansible-project] Re: ansible windows raw module no response?

2016-07-27 Thread 'J Hawkesworth' via Ansible Project
If it is always running then may be you need to set up whatever the run.bat does as a windows service. You can install nssm.exe and use win_nssm module to install programs as services, and then use the win_service module to start and stop them. You can use fetch module against windows machines

[ansible-project] Re: Windows playbooks causes cryptographic, windows remote management services to crash

2016-07-29 Thread 'J Hawkesworth' via Ansible Project
Not seen this myself and having been running 2.0.0.2 against our herd of windows server 2012 boxes for months. Did you upgrade pywinrm to 0.2.0 by any chance? Also I spotted this bug report which sounds simliar to your case - https://github.com/ansible/ansible/issues/16873 - although the stack

[ansible-project] Re: win_msi not installig the msi package

2016-07-29 Thread 'J Hawkesworth' via Ansible Project
> new package to be installed, how will i get the product Id of a new package. > > Thanks, > Megha > > > On Wednesday, July 27, 2016 at 10:45:09 AM UTC+5:30, J Hawkesworth wrote: >> >> I recommend using win_package instead of win_msi >> >> If you stil

[ansible-project] Re: WinRM timeout for VMWare Tools Install

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
Not doing this but interested to do so. Not quite the same but see this - https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1018377 I think if you can persuade it not to restart networking immediately, then you can use the win_reboot: action to rest

[ansible-project] Re: Windows playbooks causes cryptographic, windows remote management services to crash

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
s. For more information, see > https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning > . > InsecurePlatformWarning > > > On Friday, July 29, 2016 at 11:27:08 AM UTC-5, J Hawkesworth wrote: >> >> Not seen this myself and having bee

[ansible-project] Re: Scalable Spark Clusters (RE: Matt, Do you want your weekends back?)

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
Looks like there are several roles for installing Spark on Ansible Galaxy - probably a good starting point to see what others have done: https://galaxy.ansible.com/list#/roles?page=1&page_size=10&autocomplete=spark On Sunday, July 31, 2016 at 7:14:47 PM UTC+1, Matt Jude wrote: > > Good day, >

[ansible-project] Re: Windows playbooks causes cryptographic, windows remote management services to crash

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
> PS C:\Windows\system32> $PSVersionTable.PSVersion > > Major Minor Build Revision > - - - > 4 0 -1 -1 > > We are looking at powershell 5 for other reasons. Have you tried it out > with ansible? > > Michael > > On Monday, August

[ansible-project] Re: Why a progress over when ansible exec all tasks on windows?

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
I think that is just the way windows remoting works - when you log out it kills any processes you have created (similar to when you log out of a remote desktop window, rather than just disconnect). It is definitely possible to get your java jar program to run if you set it up to run as a window

[ansible-project] Re: Ansible executes task regardless of conditional

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
This isn't a pattern I use but I just wonder if you need to ensure that the list of hosts you are creating is held as a list set_fact: my_group: "{{ just_created | list }}" hosts: "{{ my_group }}" or possibly even On Monday, August 1, 2016 at 4:04:37 PM UTC+1, Trond Hindenes wrote: > > As fa

[ansible-project] Re: ansible windows raw module no response?

2016-08-01 Thread 'J Hawkesworth' via Ansible Project
ks for your answer.I am not sure whether my program is well.But I > think ansible should close the task if the task exec too long. > > 在 2016年7月28日星期四 UTC+8上午7:34:49,J Hawkesworth写道: >> >> If it is always running then may be you need to set up whatever the >> run.bat does a

[ansible-project] Re: Windows playbooks causes cryptographic, windows remote management services to crash

2016-08-02 Thread 'J Hawkesworth' via Ansible Project
Reading this again I realise that running multiple playbooks against my windows hosts simultaneously is something I do not do very often, so my experience may not apply. I hope pywinrm 0.2.0 turns out to fix this for you. Jon On Monday, August 1, 2016 at 9:01:27 PM UTC+1, Matt Davis wrote: > >

[ansible-project] Re: Developing playbooks on Windows

2016-08-03 Thread 'J Hawkesworth' via Ansible Project
Hi, I mostly just create playbooks having sshed into a virtual machine. We keep the entire ansible configuration (inventory, playbooks, roles, custom modules and plugins etc) in Mercurial (mandated version control where I work). For a while I used to edit playbooks on windows using Notepad++

[ansible-project] Re: kerberos configuration to ping Windows server with Ansible

2016-08-04 Thread 'J Hawkesworth' via Ansible Project
I have only ever used kerberos support with Active Directory servers, not LDAP ones. However, I think from what you have described that your kdc will be fr. ldap-ad.dmsi.corp.com I don't think you need an admin server set up for this purpose ( I don't have one set in my krb5.conf) You may have a

[ansible-project] Re: kerberos configuration to ping Windows server with Ansible

2016-08-04 Thread 'J Hawkesworth' via Ansible Project
y provide more information', >> 851968), ('Server not found in Kerberos database', -1765328377)) >> >> I guess because the server is not on the EMEAD.COM domain, there is an >> issue ? I don't understand how all this works >> >> Regards >>

[ansible-project] Re: win_unzip hanging

2016-08-22 Thread 'J Hawkesworth' via Ansible Project
m... is there anything >> new on the domain access? because it would make things a lot easier for me >> (and the windows community)!!! >> >> Thanks >> >> Le mercredi 15 juillet 2015 14:53:36 UTC+1, J Hawkesworth a écrit : >>> >>> Hi Gui

[ansible-project] Re: win_unzip hanging on overwrite

2016-08-22 Thread 'J Hawkesworth' via Ansible Project
I'd try and organise things so that there's no need to merge the contents of the directory (probably by removing the contents of the directory first using win_file state: absent.) Jon On Thursday, August 18, 2016 at 5:41:38 PM UTC+1, Derek Viljoen wrote: > > I'm new to ansible. I'm debugging a

[ansible-project] Re: Some Ansible Windows winrm variables doesn't seems to be use

2016-08-22 Thread 'J Hawkesworth' via Ansible Project
So that's a connection timeout. Is there a firewall between your ansible controller and the windows box? Did you run the configure for remoting .ps1 script on the windows node to set up winrm for ansible? Can you traceroute to 10.10.32.29 from your ansible box? Jon On Monday, August 22, 2016 a

[ansible-project] Re: winrm Unable to connect to windows10 desktop

2016-08-22 Thread 'J Hawkesworth' via Ansible Project
So ... you are getting connection refused. So winrm is connecting but isn't happy with something. Have a look in the event logs on the windows box to see if there is anything appearing when you attempt to connect. Actually I think its possible that the problem is your inventory file. I sugges

[ansible-project] Re: win_package - missing product id error

2016-08-23 Thread 'J Hawkesworth' via Ansible Project
Yes, I have hit this with notepad++. I think it hangs because a dialog is prompting the user for some input. I think there's a chocolatey package for it, so probably the easiest way to get round it is to use chocolatey. I think there's a zip file version as well if you don't mind scripting a

[ansible-project] Re: win_copy failing (timeout)

2016-09-01 Thread 'J Hawkesworth' via Ansible Project
win_copy is still unfortunately not great for large files. From the testing that I did earlier in the year it is still slower than fetching the same size file via http and there seems to be a max size, although this isn't something I've hit myself. What I do is add an http server (nginx) to my

[ansible-project] Re: win_service play fails when run without an optional parameter

2016-09-01 Thread 'J Hawkesworth' via Ansible Project
Hi, I wonder if you are somehow picking up an old version of the modules, as I just checked (latest devel 2.2 version and If ($params.start_mode) { is no longer in the code. If you are running from source ensure you have done a git submodule update --init and a source hacking/env-setup other

[ansible-project] Re: Ansible installed from yum is unable to connect to windows while Ansible installed via source file is working fine from the same host

2016-09-01 Thread 'J Hawkesworth' via Ansible Project
to get round that issue you need to set ansible_winrm_server_cert_validation: ignore In your inventory / group vars its documented here: http://docs.ansible.com/ansible/intro_windows.html#inventory Hope this helps, Jon On Thursday, September 1, 2016 at 11:13:02 AM UTC+1, ishan jain wrote: >

[ansible-project] Re: Installation of .exe on windows remote node get hung

2016-09-01 Thread 'J Hawkesworth' via Ansible Project
try win_package - win_msi is *only* for (well behaved) msi files. also win_chocolatey is an option for a lot of places if it meets your security requirements. A lot of (older) .exe programs will assume there is a user and pop up some kind of dialog box, which will cause the module to hang indef

[ansible-project] shameless plug for new windows modules

2016-09-06 Thread 'J Hawkesworth' via Ansible Project
Hello, I've created a couple of pull requests recently for two new windows modules, win_msg and win_say. win_msg will pop up messages on windows hosts (usefull for warning users to log out during upgrades, for example) win_say is a text to speech module, which will also optionally play a .wav

[ansible-project] Re: win_update performance

2016-09-07 Thread 'J Hawkesworth' via Ansible Project
Could you have a 'canary' group that you apply the updates to and get timings for that, before rolling out to your other hosts? How would powershell on linux help? On Wednesday, September 7, 2016 at 8:07:29 AM UTC+1, Mike Fennemore wrote: > > Hi Matt, > > Thanks for the quick reply. Well in our

[ansible-project] Re: unable to install exchange 2016 using ansible

2016-09-12 Thread 'J Hawkesworth' via Ansible Project
Can you share you playbook for creating Exchange? Is there anything useful in :\\ExchangeSetupLogs\\ExchangeSetup.log ? One of the errors was about being unable to talk to a local port. Does there need to be some firewall configuration before running this step? I think it is possible that you

[ansible-project] Re: running shell commands on Windows

2016-09-14 Thread 'J Hawkesworth' via Ansible Project
Hi, Windows doesn't have the same kind of shells as linux, so right now, your best choise is to write powershell and execute it from ansible using the raw or script modules. Powershell is a little different from bash or ksh. The main big difference is that you pipe objects not text. Here's

[ansible-project] Re: Kerberos Delegation Issues

2016-09-15 Thread 'J Hawkesworth' via Ansible Project
I just got this working a couple of days ago. The only differences I can see between your set up and mine are I set up win connection vars in group vars, rather than host vars (mixed environment - not all my hosts are windows). Might be worth trying to switch to group_vars as at some point I th

[ansible-project] Re: running shell commands on Windows

2016-09-15 Thread 'J Hawkesworth' via Ansible Project
By the way, this is useful if you are looking for ways to convert linux 'toolbox' commands to powershell equivalents: https://www.gitbook.com/book/devopscollective/a-unix-person-s-guide-to-powershell/details Jon On Wednesday, September 14, 2016 at 8:22:13 AM UTC+1, J Hawkesworth wro

[ansible-project] Re: Kerberos Delegation Issues

2016-09-16 Thread 'J Hawkesworth' via Ansible Project
Sorry, I should have been clearer. 2.0.0.2 and 2.1.1 are ansible versions. On Thursday, September 15, 2016 at 4:11:02 PM UTC+1, Surred wrote: > > Thanks for the response JH. I've moved the winrm connection details to > group_vars as you suggested, but am still not able to list the files of a

[ansible-project] Re: Tomcat restart failed...

2016-09-16 Thread 'J Hawkesworth' via Ansible Project
My guess would be that your playbook tried to start it before it had finished shutting down. Simplest thing to do would be wait a bit before trying the start, but it would be better to check it is down. You could use wait_for module to check it is down: http://docs.ansible.com/ansible/wait_for_

[ansible-project] Re: win_service play fails when run without an optional parameter

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
> the version in extras, will that solve the problem. This is an RPM install. > > Dimitri > > > On Thursday, September 1, 2016 at 3:20:09 AM UTC-4, J Hawkesworth wrote: >> >> Hi, >> >> I wonder if you are somehow picking up an old version of the modu

[ansible-project] Re: Kerberos Delegation Issues

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
> > JH, > > Do you know of any other tests/logging I could try/review to determine why > the kerberos delegation is not working in my environment? > > On Friday, September 16, 2016 at 2:22:05 AM UTC-5, J Hawkesworth wrote: >> >> Sorry, I should have been clear

[ansible-project] Re: unable to install exchange 2016 using ansible

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
The following ought to remove pykerberos and install kerberos and latest version of pywinrm. Latest version of pywinrm also needs requests-kerberos to make kerberos connections - if it doesn't get installed, install that too. Check what you have installed using 'pip list' pip uninstall pykerb

[ansible-project] reconfigure winrm via ansible?

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
Hi, Has anyone managed to successfully reconfigure winrm remotely via a playbook? I need to up some timeouts and increase the MaxMemoryPerShellMB I know that reconfiguring winrm is one of the things that is specifically disallowed over winrm remoting, but I imagine a scheduled task could do i

[ansible-project] Re: reconfigure winrm via ansible?

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
{{ scheduled_time }}" description="fix up winrm timeouts 1" enable=no state=absent user=SYSTEM argument='set winrm/config @{MaxTimeoutms = "3600"}' - name: fetch updated configuration raw: winrm get winrm/config register: new_configuration

[ansible-project] Re: Limit hosts for nested playbook

2016-09-22 Thread 'J Hawkesworth' via Ansible Project
I suggest you create some groups in your inventory, so instead of - hosts: all you run against - hosts: webservers (obviously webservers is just an example of a group). This is nice when reading playbooks as you instantly get a notion of what roles are needed on the different types of server y

[ansible-project] Re: Best way of writting inventory file

2016-09-26 Thread 'J Hawkesworth' via Ansible Project
Have a look at using separate group_vars files for common variables you can apply to more than one machine - see http://docs.ansible.com/ansible/intro_inventory.html#splitting-out-host-and-group-specific-data Also, consider having different inventory files. I have a different inventory for deve

[ansible-project] Re: using csvfile lookups inside a module

2016-10-03 Thread 'J Hawkesworth' via Ansible Project
Presumably you've got csv files coming from somewhere else that you want to use to drive things? If not, I'd suggest to you see if you can use group_vars http://docs.ansible.com/ansible/intro_inventory.html#group-variables to set variables for specific groups. Bear in mind you can have multipl

[ansible-project] Re: using csvfile lookups inside a module

2016-10-03 Thread 'J Hawkesworth' via Ansible Project
uration parameters > for an object. > > So...not what I wanted to hear but, not the end of the world either. > > Just noticed I hadn't set the delimiter parameter, however still get the " > ...unable to convert to bool" message. > > Asil > > > >

Re: [ansible-project] using csvfile lookups inside a module

2016-10-04 Thread 'J Hawkesworth' via Ansible Project
I wonder if you might be better off using include_vars to load all of your groups details in one pass, without multiple lookup calls. http://docs.ansible.com/ansible/include_vars_module.html There's a little bit more syntax to make your csv into yaml. Instead of... accounts,502,present,no engi

[ansible-project] Re: Output on Windows shows carriage return and new line feed

2016-10-10 Thread 'J Hawkesworth' via Ansible Project
I think I've understood the above, this behaviour is to be expected as Ansible expects JSON back from modules. Probably simplest way to fix it is to get your script to return json instead of whatever the objects at the end of the powershell pipeline output. Sometimes doing a | ConvertTo-Json

Re: [ansible-project] Re: Connecting to Windows host fails

2016-10-10 Thread 'J Hawkesworth' via Ansible Project
Did adding ansible_winrm_server_cert_validation: ignore Fix this for you? Jon On Friday, October 7, 2016 at 4:27:23 PM UTC+1, Aidan Gustard wrote: > > Try adding these into your group_vars/windows.yml file. > > ansible_connection: winrm > ansible_ssh_port: 5986 > ansible_winrm_transport: ssl > v

[ansible-project] Re: Ansible with winrm to WindowsServer 2008 with Exchange 2010 (Command Powershell)

2016-10-10 Thread 'J Hawkesworth' via Ansible Project
Hi, It is certainly possibly that the System.OutOfMemoryException is because of the lack of the hotfix you mention, which affects S2008. Either apply the patch manually to the box or just make sure it is fully up to date with windows updates (I think the fix was rolled up into SP1 if I recall).

[ansible-project] Re: Ansible with winrm to WindowsServer 2008 with Exchange 2010 (Command Powershell)

2016-10-10 Thread 'J Hawkesworth' via Ansible Project
Hi, It is certainly possibly that the System.OutOfMemoryException is because of the lack of the hotfix you mention, which affects S2008. Either apply the patch manually to the box or just make sure it is fully up to date with windows updates (I think the fix was rolled up into SP1 if I recall).

[ansible-project] Re: [Windows] Is there a way to install a single Windows Update by KB article ID?

2016-10-18 Thread 'J Hawkesworth' via Ansible Project
You can install hotfixes if necessary, although its a bit of a faff. see https://support.microsoft.com/en-us/kb/27738398 You have to use wusa with /extract to unpack the update file (which does work over winrm) and then use dism.exe to install the cab. Example below. Hope this helps, Jon - n

Re: [ansible-project] Re: Connecting to Windows host fails

2016-10-18 Thread 'J Hawkesworth' via Ansible Project
Running this script should do all the configuration of WinRM that is needed to control via ansible. if that is what you mean. https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 On Thursday, October 13, 2016 at 1:10:31 PM UTC+1, JayB wrote: > > What c

[ansible-project] Re: Copying or moving files on Windows systems

2016-10-21 Thread 'J Hawkesworth' via Ansible Project
Another thing that might trip you up is that C:\Program Files\ is rather more locked down in modern windows versions than it was in older ones, so you might have trouble copying to that location if you don't have full admin privs. I don't recall specifics now but I know I wound up installing so

[ansible-project] Re: Problems Connecting To Windows 2012 R2

2016-10-21 Thread 'J Hawkesworth' via Ansible Project
Is 'winTest' the hostname or the name of a group of hosts in your inventory? the windows host(s) that you want to connect to will need to be in a group called 'windows' in your inventory. [windows] winTest ... other hosts The name of the group, windows, has to match the name of the file (minus

Re: [ansible-project] Re: Ansible powershell module to be run on remote powershell on Linux machine.

2016-10-23 Thread 'J Hawkesworth' via Ansible Project
I know I am a bit late to this thread, and I guess it is possible you have a lot of powercli written already, but it might be worth your while investigating the existing vsphere and wmware modules. Jon -- You received this message because you are subscribed to the Google Groups "Ansible Proje

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
You can use a when: conditional against your role (if you don't mind seeing lots of 'skipped' steps for each task in the role. see http://docs.ansible.com/ansible/playbooks_conditionals.html#applying-when-to-roles-and-includes Jon On Monday, October 24, 2016 at 11:26:33 AM UTC+1, fanvalt wrote

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
October 24, 2016 at 2:15:43 PM UTC+1, fanvalt wrote: > > Thank you but I already use a when condition on the role. > But it won't make the 1st play with the 1st role being run first > > Le lundi 24 octobre 2016 15:06:35 UTC+2, J Hawkesworth a écrit : >> >> You ca

Re: [ansible-project] Re: Ansible powershell module to be run on remote powershell on Linux machine.

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
rShell beta for Linux >> was out, and did not have any problems. Simply put, it should work. Let me >> know if you're still blocked by this and I can fire up a test vm tomorrow >> to verify. >> >> >> >> >> On Sunday, October 23, 2016 at 9:45:

[ansible-project] Re: How can i specify the same target host twice or more in my playbook ?

2016-10-26 Thread 'J Hawkesworth' via Ansible Project
I think you are going to have to change, or at least add something to do this. I would do this by adding a temporary inventory file and group vars. If you have inventory with groups like [webservers] host1 app_folder=/opt/instance1 [database] host1 app_folder=/opt/instance2 then you can h

[ansible-project] Re: First Post for middleware engineer

2016-11-07 Thread 'J Hawkesworth' via Ansible Project
I use ansible to generate yaml files which are then passed to other playbooks. I haven't found a need to dynamically generate an entire playbook since you can control behavior just by passing different variables to playbooks. As well as getting to grips with roles, it would be well worth unde

[ansible-project] Re: How to save stdout_lines to a file without losing the newlines

2016-11-07 Thread 'J Hawkesworth' via Ansible Project
Have you tried the following? {{table.stdout_lines|join('\n') }} Not tested but sounds like it might do what you want. Jon On Monday, November 7, 2016 at 3:07:36 PM UTC, jean-christophe manciot wrote: > > Hi everyone, > > Considering a variable {{ table.stdout_lines ]] containing the followin

[ansible-project] Targeting Windows 2008 R2 machines with Ansible?

2016-11-07 Thread 'J Hawkesworth' via Ansible Project
Hello, I'm curious if anyone is making use of Server 2008/R2 versions of Windows Server any more. I am setting up a S2008R2 VM at the moment to test a PR and I'm wondering how much use this version of windows is getting these days. Jon -- You received this message because you are subscribed

[ansible-project] Re: Copy files from windows machine to linux machine using ansible

2016-11-09 Thread 'J Hawkesworth' via Ansible Project
; tasks: >>> - name: copy file >>>fetch: src=\path\to\file\on\windows\machine >>> dest=/destination/directory >>> >>> But, somehow it failed. Am I doing it the wrong way? >>> >>> On Monday, April 25, 2016 at 8:24:58 PM

<    2   3   4   5   6   7   8   9   >