[ansible-project] Re: Windows SecPol

2017-06-01 Thread 'J Hawkesworth' via Ansible Project
Hi, Not quite. There's a not-yet-merged pull request for a secpol module. https://github.com/ansible/ansible/pull/22775 However, there is a plan to break it up into more than one module, If you are in a hurry you could try out the above module (you can add custom modules to your ansible inst

[ansible-project] Re: combining dicts in a list

2017-06-05 Thread 'J Hawkesworth' via Ansible Project
Try this. Its not exactly pretty, but it seems to do what you need. $ cat listtest-playbook.yml --- - hosts: localhost gather_facts: false vars: containers: - port: 2000 release: trusty - port: 2001 release: xenial tasks: - name: show var debug:

[ansible-project] Re: Ansible falling back to SSL, have keberos and all dependencies

2017-06-05 Thread 'J Hawkesworth' via Ansible Project
If you are using port 5986 in your windows group vars, it will communicate with winrm via ssl, so that's not necessarily your problem. The 'the specified credentials were rejected by the server' usually just means the username and password that were supplied weren't ones that the server can au

[ansible-project] Re: connecting to windows machine from linux through Ansible and getting timedout exception.

2017-06-07 Thread 'J Hawkesworth' via Ansible Project
Lots of possible causes for this. Can you connect via remote desktop to the host? Did you run the ConfigureRemotingForAnsible.ps1 powershell script on the windows host? Check you have a route to the windows host from your ansible controller. (ping, traceroute). Check you can resolve the hos

[ansible-project] Re: How to retain the remote session till the script is fully executed |

2017-06-07 Thread 'J Hawkesworth' via Ansible Project
I think you might just need to use async - http://docs.ansible.com/ansible/playbooks_async.html to get this working. However, depending on what you are trying to achieve, it might be worth re-organising things so that ansible starts the cluster nodes individually. This would let you do useful

[ansible-project] Windows; second hop auth delegation; NetApp device

2017-06-08 Thread 'J Hawkesworth' via Ansible Project
Hello, Has anyone else encountered problems when using a netapp file storage device in a second hop (with kerberos and auth delegation turned on)? In one environment we have a NetApp Model: FAS3220, OS: 7 mode v8.2.1 which refuses to let us write to storage via a windows host. The storage admi

[ansible-project] Re: Windows Kerberos Issues

2017-06-12 Thread 'J Hawkesworth' via Ansible Project
There's a command line switch you have to use on the ConfigureRemotingForAnsible.ps1 if you want to use CredSSP I think. Re your kerberos problem, has the windows box you are trying to hit actually been joined to the domain? On Thursday, June 8, 2017 at 8:41:40 PM UTC+1, Jim Heald wrote: >

[ansible-project] Re: Azure SPNs and conflicts/accidental deletions/wrong deployments

2017-06-12 Thread 'J Hawkesworth' via Ansible Project
I can't comment on Azure but I have seen issues reported regarding SPNs interacting with attempts to connect via winrm - link here: https://groups.google.com/forum/#!topic/ansible-project/37u6k31Rxmc Hope this helps, Jon On Thursday, June 8, 2017 at 5:46:40 PM UTC+1, David Peterson wrote: > >

[ansible-project] Re: how can we import terminal output of specific task/variable/message/debug in a excel sheet ?

2017-06-14 Thread 'J Hawkesworth' via Ansible Project
You could register the results of whatever command output you are interested in, then use a local action (or delegate to localhost) task to append to a .csv file on your ansible controller. Then you could use win_copy to copy the .csv file over to a windows desktop machine so that it can be vi

[ansible-project] Re: Can i use .yml file like this?

2017-06-15 Thread 'J Hawkesworth' via Ansible Project
You could perhaps use template to generate the playbook file that you want to use, then run the generated playbook. I don't know what alternative value for module might be, but you could perhaps use when: condition to only run ios_command if some condition is true. Something like this (not tes

[ansible-project] Re: Send SMS using Twilio in ansible , getting below error

2017-06-15 Thread 'J Hawkesworth' via Ansible Project
Looks like you either need to use a more recent version of python. Perhaps you can delegate the module to run on a newer linux distribution if you can't upgrade your ansible controller machine. On Wednesday, June 14, 2017 at 11:11:07 AM UTC+1, nishant bawane wrote: > > i have tried using the t

[ansible-project] Re: win_command not working ?

2017-06-15 Thread 'J Hawkesworth' via Ansible Project
Sure, the thing to understand is that win_command is for running executables directly. This means two things, 1/ the user's environment isn't applied and 2/ you aren't running inside a dos box or powershell window - you are just starting a .exe (and receiving back whatever it sends to stdout a

[ansible-project] Re: Using ansible_winrm_server_cert_validation

2017-06-15 Thread 'J Hawkesworth' via Ansible Project
Yeah, I think that restriction is still in place, but group_vars is a good place for it. You have 'hosts: all' in your example playbook, but not all of them are going to be windows hosts (probably) so defining a group called windows and having these vars defined for hosts that belong to the w

[ansible-project] Re: Ansible Module to look up variables

2017-06-19 Thread 'J Hawkesworth' via Ansible Project
Check mode might be able to do what you want, but you would likely want to also use tags as well to let you skip lots of steps which are irrelevant when you only wish to calculate and display the versions. On Friday, June 16, 2017 at 9:44:37 PM UTC+1, Hagen Kuehn wrote: > > I would like to cre

[ansible-project] Re: Capture return values to file

2017-06-19 Thread 'J Hawkesworth' via Ansible Project
For simple strings, you can write them to disk by using the 'content' option of the copy module http://docs.ansible.com/ansible/copy_module.html (which you can delegate to localhost to copy to your ansible controller machine). Hope this helps, Jon On Monday, June 19, 2017 at 2:23:38 PM UTC+1

[ansible-project] Re: Synchronize from one host to anothers

2017-06-19 Thread 'J Hawkesworth' via Ansible Project
It looks like you are missing a / in the src= part of your synchronize action, here: - name: Synchronizacja synchronize: src=etc/corosync/authkey dest=/etc/corosync/authkey delegate_to: 192.168.10.186 instead try - name: Synchronizacja synchronize: src=/etc/corosync/authkey dest=/etc/cor

[ansible-project] Re: Conditionals based on empty JSON dict

2017-06-20 Thread 'J Hawkesworth' via Ansible Project
Not tried, but wondering if you could use - name: work out if create failed set_fact: create_a_record_failed: true when: linode_api_error.ERRORARRAY|length > 0 to detect if you need to fail, then you can retrieve the error message in a separate step. - fail: msg="Setting DNS entr

[ansible-project] Re: Ansible WinRM Connection 'Connection reset by peer' only when Windows Role ADFS/WAP is Installed and Post Configuration Finished

2017-06-23 Thread 'J Hawkesworth' via Ansible Project
My guess would be that something about these windows server roles causes some kind of reset or restart of some part of the http stack (which WinRM depends on). I know kerberos needs DNS to work properly - the hostname is important for kerberos for reasons I forget, but it needs to be able to go

[ansible-project] Re: Win_Service not working in handler?

2017-06-25 Thread 'J Hawkesworth' via Ansible Project
Is zabbix_agentd.conf being updated. Since you have spaces in the dest, I think you *might* need to quote the dest like this dest: 'C:\Program Files\Zabbix Agent\zabbix_agentd.conf' ( Use single quotes - ' ' not double quotes " " - if you use double quotes you have to have double backslashes

[ansible-project] Re: Anyone have experiences with using lots of groups and group_vars files?

2017-06-25 Thread 'J Hawkesworth' via Ansible Project
Hi I don't have as many servers as you to manage, but I do have multiple locations (which i express as different inventory) and use groups with child groups and 20 or so server types. Another difference between my situation and yours is I started from scratch and didn't really have anything I

[ansible-project] Re: starting karaf with ansble

2017-06-28 Thread 'J Hawkesworth' via Ansible Project
Maybe your application needs some environment variables which aren't set when ansible runs the command. You can set specific environment variables though - see http://docs.ansible.com/ansible/playbooks_environment.html Jon On Wednesday, June 28, 2017 at 3:20:21 PM UTC+1, fanvalt wrote: > > Hel

[ansible-project] How to reformat a yaml dictionary?

2017-06-28 Thread 'J Hawkesworth' via Ansible Project
Hello, So I have a var dictionary which stores component groups and components components_by_group: web: - frontend_app - admin_app database: - db_tools - flyway I'd like to invert this so that I can use the component to lookup the group group_by_component:

[ansible-project] Re: Using json query filter

2017-06-30 Thread 'J Hawkesworth' via Ansible Project
I can recommend using the http://jmespath.org/tutorial.html to figure out what your jsonquery needs to be. You can paste your json into any of the example boxes and then tinker with the jsonquery and see the results directly on the webpage. Hope this helps a bit Jon On Friday, June 30, 2017

[ansible-project] Re: How to reformat a yaml dictionary?

2017-06-30 Thread 'J Hawkesworth' via Ansible Project
tput when group and component match components_by_group but I think you just get a single flat list with the cartesian product in it. Any suggestions - devious or elegant - would be gratefully appreciated. Jon On Wednesday, June 28, 2017 at 4:17:41 PM UTC+1, J Hawkesworth wrote: > > He

[ansible-project] Re: Unable to install dot net framework 4.5.2 using win_feature

2017-07-03 Thread 'J Hawkesworth' via Ansible Project
Hi, I've not had that error you encountered when installing .net 4.5.2 using win_feature. Is .net 4.5.2 already in the running windows image? You can probably tell by running Get-WindowsFeature on the machine where you want to install. If it isn't already present in windows I imagine it wi

[ansible-project] Re: How to reformat a yaml dictionary?

2017-07-03 Thread 'J Hawkesworth' via Ansible Project
"admin_app": "web", > "db_tools": "database", > "flyway": "database", > "frontend_app": "web" > } > } > > > Am Mittwoch, 28. Juni 2017 17:17:41 UTC+2 schrieb J Hawkesworth: >>

Re: [ansible-project] Re: How to reformat a yaml dictionary?

2017-07-03 Thread 'J Hawkesworth' via Ansible Project
ure' Ansible it ends > up being quite convoluted (and usually spread across multiple files, since > 'include' is the only way to have loop inside a loop whilst retaining full > control over the data). > > kind regards > Pshem > > > On Mon, 3 Jul 2017 at 1

[ansible-project] Re: question on loop

2017-07-03 Thread 'J Hawkesworth' via Ansible Project
That sounds a bit like this example from the loop documentation in ansible: http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-subelements Hope this helps. Jon On Monday, July 3, 2017 at 1:51:51 PM UTC+1, rakesh boinapally wrote: > > I have requirement where i have to create ssh

[ansible-project] Re: Config for Windows host

2017-07-03 Thread 'J Hawkesworth' via Ansible Project
'Connection refused' usually means you have established a connection to the machine, but its not happy with your attempt to log in. I suggest you run ansible with -v which will give you a bit more debug information and check that the user you are connecting with is the one you expect. Also

Re: [ansible-project] get_url runs but doesnt download the file

2017-07-04 Thread 'J Hawkesworth' via Ansible Project
The output above seems to be saying that the file /home/ansible/index.html is present on 10.10.0.5. If you are expecting the file to be re-downloaded each time the playbook runs, then set 'force: yes' in your playbook, otherwise it will not attempt to fetch the file again. Jon On Monday, July

[ansible-project] Re: Using a windows file share as a source in win_chocolatey.

2017-07-06 Thread 'J Hawkesworth' via Ansible Project
Yeah the module doesn't currently pick up from shares, a private chocolately server is probably the easiest way to fix that. Worth adding that if you want to pick up files from shares for other reasons you should enable kerberos auth delegation so that you can access files from the share as thi

[ansible-project] Re: ansible and windows AD module

2017-07-07 Thread 'J Hawkesworth' via Ansible Project
Possibly a second hop issue. Try setting ansible_winrm_kerberos_delegation: true in your windows inventory (documented at the end of this section of the documentation page: http://docs.ansible.com/ansible/intro_windows.html#inventory Hope this helps, Jon On Wednesday, July 5, 2017 at 4:53:13

[ansible-project] Re: Role to generate System documentation.

2017-07-07 Thread 'J Hawkesworth' via Ansible Project
ansible-cmdb generates nice looking html pages from gathered facts, that might be a good place to start. Jon On Wednesday, July 5, 2017 at 11:54:11 PM UTC+1, Stephen Eaton wrote: > > G'day one and all, > > Yesterday while updating some system operations manuals I thought some of > this could be

[ansible-project] Re: Ansible with windows server 2008 r2 sp1 - sysprep

2017-07-07 Thread 'J Hawkesworth' via Ansible Project
Maybe you need to use runonce to run the powershell script to enable remoting: https://docs.ansible.com/ansible/vmware_guest_module.html Be aware that unpatched Windows Server 2008 R2 has a bug in WMF 3.0 which stops winrm from being able to do anything useful. You need to install http://suppo

[ansible-project] Re: Add user to "administrators" group or "administrateurs" group

2017-07-10 Thread 'J Hawkesworth' via Ansible Project
I suggest you run the 'setup' module against your hosts, and use one of the facts to find out if the machine is FS or US. For windows hosts, ansible_facts.ansible_env.USERNAME might be enough. If that isn't enough, on windows hosts you can use the Get-Culture cmdlet to find out which culture

[ansible-project] Re: storing standard output to variable

2017-07-14 Thread 'J Hawkesworth' via Ansible Project
I suggest you do a - name: examine shell output debug: var: so_output and run with -v to see what you have stored in so_output variable. From memory you'll have stdout and stdout_lines attributes in so_output and possibly the same for stderr. Depending on what you are trying to achie

[ansible-project] Re: Install Docker on Windows Server 2016 using win_shell module

2017-07-24 Thread 'J Hawkesworth' via Ansible Project
Hi, I am curious if you got any further with this. I looked at the link above but couldn't see any powershell command like you show to install docker. It looks like there is a .msi installer now, which I would hope could be installed using the win_package module. The .msi installer is describ

[ansible-project] Re: Fetch Time Out with Windows Server 2008 SP2 and R2 - Works for Server 2012

2017-07-25 Thread 'J Hawkesworth' via Ansible Project
Hmm, just wondering if you are hitting this "On Windows 7 and Server 2008 R2 machines, due to a bug in Windows Management Framework 3.0, it may be necessary to install this hotfix http://support.microsoft.com/kb/2842230 to avoid receiving out of memory and stack overflow exceptions. Newly-inst

[ansible-project] Re: Fetch Time Out with Windows Server 2008 SP2 and R2 - Works for Server 2012

2017-08-14 Thread 'J Hawkesworth' via Ansible Project
I'm sorry I don't have any S2008s to even try this out on. A couple of things you could try though... Not sure what python version you are using but perhaps try a newer 2.x revision if there's one available for your controller. Also you could try upgrading Windows Management Framework and the ins

Re: [ansible-project] win_shell/win_command chdir to Directory with Spaces

2017-08-14 Thread 'J Hawkesworth' via Ansible Project
I think you can probably just do this using chdir: 'C:\Program Files\your path\goes\here' By the way, some community members have been working on some general advice for constructing paths when dealing with windows. Eventually the plan is to get this into the actual ansible documentation bu

[ansible-project] Re: Quote mismatch when executing a command on windows boxes

2017-08-14 Thread 'J Hawkesworth' via Ansible Project
I'd probably try and solve this one a different way. If recording the files that you've removed is important, I'd probably use win_find http://docs.ansible.com/ansible/latest/win_find_module.html then register the results and then use the registered results as with_items input to win_file stat

Re: [ansible-project] Ansible parallell playbooks

2017-08-14 Thread 'J Hawkesworth' via Ansible Project
I suppose use you could modify your playbook so that after the task that all the other machines must wait for, ansible creates a file on the controller machine. Then the next step in the playbook would use wait_for, delegated to the controller so the other machines would have to wait until the

[ansible-project] Re: win_package unable to install .exe Chart Director

2017-08-14 Thread 'J Hawkesworth' via Ansible Project
If they used nsis to package try /sd I think it is reasonable to ask the vendor to provide a silent installation option too. Point out that it is in their interest too - if you can automate installation, then doing automated testing against all supported versions of an operating system is easi

[ansible-project] Re: Trigger a new jenkins job through ansible

2017-08-16 Thread 'J Hawkesworth' via Ansible Project
Maybe use the uri module to call jenkins rest api - see https://wiki.jenkins.io/display/JENKINS/Remote+access+API On Tuesday, August 15, 2017 at 4:50:00 PM UTC+1, Seeram Venkatesh wrote: > > Hi Techies, > > I'm looking for a solution where I want to trigger a Jenkins build through > Ansible. >

[ansible-project] Re: Trigger ansible through powershell

2017-08-18 Thread 'J Hawkesworth' via Ansible Project
Probably lots of ways, anything that can run a command line can do it. Depending on your needs you could do any of the following Install Tower and make use of the rest api, perhaps using powershell's Invoke-RestMethod cmdlet https://docs.microsoft.com/en-us/powershell/module/microsoft.powershel

[ansible-project] Re: Cannot connect to WindowsServer from Centos7 ProxyError

2017-08-18 Thread 'J Hawkesworth' via Ansible Project
Please can you try exporting HTTP_PROXY or HTTPS_PROXY environment variables before running ansible? I *think* this will let ansible (actually requests via pywinrm) know that you are using a proxy. Hope this helps, Jon On Friday, August 18, 2017 at 8:37:28 AM UTC+1, Aleksander Lipka wrote:

[ansible-project] Re: delegate_to localhost tries to connect to WinRM

2017-08-21 Thread 'J Hawkesworth' via Ansible Project
I think the above is right -e has highest precedence, which is why setting host level (or group vars) is the right place for specifying windows connection parameters, (as it appears in the windows documentation page). On Friday, August 18, 2017 at 3:13:45 PM UTC+1, Mike Klebolt wrote: > > I coul

[ansible-project] Re: Cannot connect to WindowsServer from Centos7 ProxyError

2017-08-21 Thread 'J Hawkesworth' via Ansible Project
r Lipka wrote: >>> >>> How do I export them? >>> When I echo them, I can see: >>> >>> root@localhost@localdomain: ansible# echo $http_proxy >>> http://161.90.234.10:8080 >>> >>> root@localhost@localdomain: ansible

Re: [ansible-project] Need to know if Ansible has capablity for parallel execution

2017-08-21 Thread 'J Hawkesworth' via Ansible Project
There are various tricks for parallel running of playbooks: https://www.slideshare.net/bcoca/more-tips-n-tricks See slide 19 onwards In the end I wound up using an external tool - lots of options there too. There's a (closed) discussion on this topic here: https://github.com/ansible/proposals

Re: [ansible-project] Re: Trigger ansible through powershell

2017-08-21 Thread 'J Hawkesworth' via Ansible Project
ins. Is there anyway we can receive support in this > front?? > > Sent from my iPhone > > On 18-Aug-2017, at 6:39 PM, 'J Hawkesworth' via Ansible Project < > ansible...@googlegroups.com > wrote: > > Probably lots of ways, anything that can run a command line can d

[ansible-project] Re: Win custom modules don't work after update to 2.3.1/2.3.2. How to proceed?

2017-08-22 Thread &#x27;J Hawkesworth' via Ansible Project
So the code that executes windows modules was changed between 2.2. and 2.3. Unfortunately this made debugging a bit more difficult (but gave speed advantages and paved the way for other useful changes I believe). If you can update to latest devel a more detailed developer guide has been writte

[ansible-project] Re: Trigger a new jenkins job through ansible

2017-08-29 Thread &#x27;J Hawkesworth' via Ansible Project
rescue: - name: fail: msg: "Build job [ {{jenkins_protocol}}://{{jenkins_host}}/job/{{ jenkins_job }}/{{poll_result.json.executable.number}}/api/json ] did not report SUCCESS within the timeout period. This can happen if the job is taking longer than the polling tim

[ansible-project] Re: Monit module doesn't seem to work as expected with ubuntu 16.04

2017-08-29 Thread &#x27;J Hawkesworth' via Ansible Project
Does 16.04 come with a different version of monit than 14.04? Its possible the monit module might need some code changes to keep up with later versions of monit I suppose (I am just guessing here). Jon On Saturday, August 26, 2017 at 8:43:15 PM UTC+1, naw...@indix.com wrote: > > Hi, > > The mon

Re: [ansible-project] Need to chat off-forum

2017-08-29 Thread &#x27;J Hawkesworth' via Ansible Project
I'd suggest automating stuff for any environments you have control over (say development or just virtualization running on your machine if necessary). You can give other teams the ability to control password access (probably lots of ways to do this - keep inventory in separate repo and let oth

[ansible-project] Re: Playbooks and diff

2017-08-29 Thread &#x27;J Hawkesworth' via Ansible Project
You could probably use command or shell modules to run a diff between the downloaded file and the master file. On Saturday, August 26, 2017 at 10:13:51 PM UTC+1, Tcpip wrote: > > HI all, > > I have a simple playbook that only downloads configuration to a txt file, > but where Im getting lost i

Re: [ansible-project] Vmware_guest

2017-08-30 Thread &#x27;J Hawkesworth' via Ansible Project
What error do you get when it doesn't work? It looks like you are attempting to delete a vm via its uuid. Has the vm already been deleted? There are other examples here: http://docs.ansible.com/ansible/latest/vmware_guest_module.html I suggest removing the vars_prompt stuff and hard coding

[ansible-project] Re: powershell version upgrade on windows server 2008 R2

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
My guess is that is because you are also replacing Windows Management Framework, which includes WinRM, which is the mechanism used to communicate with the windows machine. If the WinRM service gets restarted during the upgrade I can imagine this will fail. You might be able to get around this

[ansible-project] Re: Conditional run of win_feature with ansible

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
win_feature also can take a comma-separated list of features to install. This is going to be MUCH faster than using with_items as the features can all be tackled in a single batch. There's an example of a comma-separated list in the documentation here: http://docs.ansible.com/ansible/latest/wi

[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
Its odd that you are getting the insecure request warnings - I am wondering if you are running ansible from a folder with a different ansible.cfg in it perhaps, as the ansible_winrm_server_cert_validation: ignore doesn't seem to be taking effect. On Wednesday, August 30, 2017 at 10:55:31 PM UTC

[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
Please share your playbook or command line On Wednesday, August 30, 2017 at 11:23:35 PM UTC+1, Thijn Bukkems wrote: > > Also tried to stop or start the print spooler just to test another > command.. This is what's in the log > > 2017-08-30 17:19:53,300 urllib3.connectionpool Starting new HTTPS >

Re: [ansible-project] Re: WinRM Not listening on all IPs even though configured that way

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
If this is the case, this feels like a windows bug to me. WinRM is intended for administration, so it should really not be tied to the configuration of IIS, which is typically there to provide application services (not administration). As for a workaround I can only think of lifting the IIS li

[ansible-project] Re: Hierarchical lookups.

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
Nice. A lookup plugin seems to make sense to me. I suppose another possibility might be keeping your inventory in Jerakia in which case a dynamic inventory script might be another entry point. There is work going on at the moment to make inventory plugins so would be worth asking on the deve

[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
Well spotted! Yeah, use hostnames. If you end up switching over to using kerberos hostnames are essential (as is fully functioning DNS lookups (both hostname -> ip and ip -> hostname). Jon On Thursday, August 31, 2017 at 10:51:01 AM UTC+1, sohail.p...@gmail.com wrote: > > > Use windows fqdn n

[ansible-project] Re: winrm send_input failed

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
Please share the playbook that is causing this error, and also the group_vars you are using. You might need to change some of the timeouts - try something like the following. ansible_winrm_operation_timeout_sec=60ansible_winrm_read_timeout_sec=70 Is the server busy when this happens? Can you

[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
the winrm > settings and user accounts on both are exactly the same. they even reside > in the same subnet. very strange! > > Op donderdag 31 augustus 2017 02:54:28 UTC-7 schreef J Hawkesworth: >> >> Well spotted! Yeah, use hostnames. If you end up switching over to using &g

[ansible-project] Re: powershell version upgrade on windows server 2008 R2

2017-08-31 Thread &#x27;J Hawkesworth' via Ansible Project
Powershell itself is completely dependent on .net so I guess this is not surprising either. I'd suggest trying win_scheduled_task module. If you are going to the trouble then it might be worth going straight to .net 4.7 - if so be aware of this (although you are on S2008SP2 so probably not aff

[ansible-project] Re: ssh -q? / Oracle sqlplus scripts

2017-09-04 Thread &#x27;J Hawkesworth' via Ansible Project
I have not had the problem you describe. However, I can think of some other ways to solve the problem. 1/ if you have sqlplus installed on your windows machine you might be able to use script module to run sqlplus commands. If you do though, you will likely need to use 'chcp' to change code

Re: [ansible-project] Re: Structuring and managing multiple unrelated projects

2017-09-04 Thread &#x27;J Hawkesworth' via Ansible Project
You could just keep your individual inventories for each client but then use a directory containing symlinks to all the client inventory files. I use this trick as I have 2 environments that run inside the same physical datacenter. Mostly I want to make changes to just one environment at a tim

Re: [ansible-project] Re: Structuring and managing multiple unrelated projects

2017-09-05 Thread &#x27;J Hawkesworth' via Ansible Project
'm not too sure how it could work because each inventory file > looks like this: > > [web] > somehost > > [web] > some_other_host > > On Monday, 4 September 2017 14:00:34 UTC+1, J Hawkesworth wrote: >> >> You could just keep your individual inventories f

Re: [ansible-project] Ansible roles stored in Git

2017-09-05 Thread &#x27;J Hawkesworth' via Ansible Project
Probably lots of 'correct' ways of setting this up, but if you want a suggestion of how to start, this is something that Sam Doran talked about in his Ansiblefest London talk earlier this year. The video is here: https://www.youtube.com/watch?v=7gEKmsuJr7s&feature=youtu.be (other interesting p

[ansible-project] Re: Task execution only for special items within a loop

2017-09-05 Thread &#x27;J Hawkesworth' via Ansible Project
I am not sure I have fully understood your example but if the goal is to install someArtifact and a corresponding someArtifact-properties, but also allow for there not to be a someArtifact-properties, (in which case you would just install 'someArtifact', then you might be able to make use of de

Re: [ansible-project] Ansible roles stored in Git

2017-09-06 Thread &#x27;J Hawkesworth' via Ansible Project
If I recall from the talk, the suggestion was each role would have a git repo of its own, then required roles are loaded using a requirements.yml file Some talk about this pattern here: https://stackoverflow.com/questions/25230376/how-to-automatically-install-ansible-galaxy-roles We don't have l

[ansible-project] Re: win_command not able to execute command file on win 2008

2017-09-07 Thread &#x27;J Hawkesworth' via Ansible Project
It sounds like you have hit this issue: https://github.com/ansible/ansible/issues/21915 I guess you could try updating the powershell / windows management framework version to see if that helps, or perhaps upgrade the machine to S2008R2? All the best, Jon On Wednesday, September 6, 2017 at 8

Re: [ansible-project] How do I get the Ansible plugin to work with Jenkins?

2017-09-08 Thread &#x27;J Hawkesworth' via Ansible Project
You can export ANSIBLE_FORCE_COLOR=TRUE if you have AnsiColor plugin installed in your jenkins you will see the colours in the Console output of your jobs. Jon On Friday, September 8, 2017 at 9:13:54 AM UTC+1, Dave Cottlehuber wrote: > > On Sat, 2 Sep 2017, at 06:17, manne shiva kumar wrote: >

[ansible-project] Re: Multiple tomcats and wait for app to start

2017-09-08 Thread &#x27;J Hawkesworth' via Ansible Project
Here's how we wait for some of our tomcat apps to start up: - name: check every 3 seconds for 40 attempts if tomcat is up and ready to serve the healthcheck page uri: url: 'http://{{ inventory_hostname }}/app/healthcheck.jsp' return_content: yes timeout: 2 delegate_to: localhost

[ansible-project] Re: how to join two json data structure to perform a join operation

2017-09-11 Thread &#x27;J Hawkesworth' via Ansible Project
Not had to solve this problem myself but I'd have a look at 'with_together' and set_fact so that you could create a new fact which contains all the information. See http://docs.ansible.com/ansible/latest/playbooks_loops.html#looping-over-parallel-sets-of-data for documentation about with_toget

[ansible-project] Ansible Windows Sprint 2

2017-09-18 Thread &#x27;J Hawkesworth' via Ansible Project
Hello, There will be a second Windows Sprint on Tuesday 2017-09-19 starting at 19:00 UTC - see http://everytimezone.com/#2017-9-18,1860,cn3 for when that is in a timezone near you. The idea is to tackle some of the outstanding issues and open pull requests to reduce the backlog and in the proc

[ansible-project] Re: Targeting Windows & Linux Machines from One Role

2017-09-22 Thread &#x27;J Hawkesworth' via Ansible Project
I'd back this up I have win- roles and linux- roles Bear in mind you can run multiple plays in one playbook, targeting different host groups. Also since a linux host isn't ever also a windows host you can probably run playbooks in parallel, even if they are installing the same 'thing' such as

[ansible-project] windows ansible powershell in 2.3.1

2017-10-01 Thread &#x27;J Hawkesworth' via Ansible Project
Is the windows host running server 2008? If so I think there is an open bug report about running the script module against that version of Windows. However it might be possible to solve the problem in a different way. Ansible 2.3 includes win_domain_membership modulehttp://docs.ansible.com/ansi

[ansible-project] Ansible playbook to spawn 2 VMs. The nginx on VM1 should be configured to access the endpoint on VM2 on a specific port.

2017-10-08 Thread &#x27;J Hawkesworth' via Ansible Project
This looks like a school assignment. What have you got so far? What part do you need help with? Worth looking on galaxy for roles that can set up the components you need. Jon -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe f

[ansible-project] ansible vwmare_guest, cloning Windows Server 2012R2

2017-10-12 Thread &#x27;J Hawkesworth' via Ansible Project
Hello, Can anyone tell me the steps I need to go through to get vmware_guest to successfully clone a template and have the clone join an existing domain? Once the clone comes up, it never seems to have network access, so domain joining always fails. A lot of times I have tried the network conne

[ansible-project] Re: win_shell - What's the proper way to use a command with a flag in ansible playbook or adhoc command.

2017-10-13 Thread &#x27;J Hawkesworth' via Ansible Project
For win_find, you can probably use a paths like paths: "C:\\Temp\\*{{ansible_hostname}}*" or if you need to use the hostname as defined in your inventory paths: "C:\\Temp\\*{{inventory_hostname}}*" One of the nice things about win_find is it will give you a better structured set of r

[ansible-project] Re: win_shell - What's the proper way to use a command with a flag in ansible playbook or adhoc command.

2017-10-13 Thread &#x27;J Hawkesworth' via Ansible Project
Oh, meant to say ansible_hostname and inventory_hostname are documented here: http://docs.ansible.com/ansible/latest/playbooks_variables.html On Friday, October 13, 2017 at 8:46:28 AM UTC+1, J Hawkesworth wrote: > > For win_find, you can probably use a paths like > >path

[ansible-project] Re: Ansible and vmware_guest

2017-10-17 Thread &#x27;J Hawkesworth' via Ansible Project
>From what I have read, you need to specify a 'name' and 'vlan' parameter for each network interface you want configured in your clone, so maybe just add a - name: network2 vlan: some_vlan_id into to the 'networks' section? You don't mention what OS you are installing but something I have

[ansible-project] Re: ansible vwmare_guest, cloning Windows Server 2012R2

2017-10-17 Thread &#x27;J Hawkesworth' via Ansible Project
r playbook. Hope this helps anyone else trying to do this. Jon On Thursday, October 12, 2017 at 4:51:44 PM UTC+1, J Hawkesworth wrote: > > Hello, > > Can anyone tell me the steps I need to go through to get vmware_guest to > successfully clone a template and have the clone join a

[ansible-project] Re: Manage Windows Remote Servers

2017-10-21 Thread &#x27;J Hawkesworth' via Ansible Project
Could you not spin up a linux box in Azure and put ansible on that? Then you can manage your azure windows nodes from there. Its always best to keep your ansible controlers 'near' (in networking terms) to the machines you are managing anyway. At work we have 1 ansible controller per datacenter.

[ansible-project] Re: Manage Windows Remote Servers

2017-10-21 Thread &#x27;J Hawkesworth' via Ansible Project
We're not using Tower so I can't really comment on that, but I guess you could rsync / scp / transfer data in other ways to some central machine for reporting purposes. We use rsync for moving binaries between datacenters (via ansible synchronise module) (and some smbclient for fetching stuff f

[ansible-project] Ansible for Windows...

2017-10-24 Thread &#x27;J Hawkesworth' via Ansible Project
It probably depends what you do with it. If you are mostly managing windows machines you probably won't need to do much than know how to run commands and edit files on Linux. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe f

[ansible-project] Basic nslookup functionality

2017-10-24 Thread &#x27;J Hawkesworth' via Ansible Project
It might be possible for you to use the dig lookup plugin to get information from dns. Seehttps://docs.ansible.com/ansible/devel/plugins/lookup/dig.html Hope this helps, Jon -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe f

[ansible-project] Re: Manage Windows Remote Servers

2017-10-24 Thread &#x27;J Hawkesworth' via Ansible Project
Just came across a Tower feature that might be just what you are looking for. It's called Isolated Nodes - see the description herehttps://www.ansible.com/blog/deep-dive-red-hat-ansible-tower-3-2 Hope this helps, Jon -- You received this message because you are subscribed to the Google Group

[ansible-project] Playbook for windows - Variable error

2017-10-26 Thread &#x27;J Hawkesworth' via Ansible Project
Hi, You can construct valid windows paths with spaces if you single quote the path, like this. app_dir: 'C:\Program Files (x86)\My App Directory' If you need to build up a path from a variable you may well need to use double quotes and double backslashes, like this. another_dir: "{{ app_home

[ansible-project] Playbook for windows - Variable error

2017-10-26 Thread &#x27;J Hawkesworth' via Ansible Project
Also, what are you trying to do? It's worth looking at the existing windows modules and seeing if they do some of what need. Powershell has a ConvertTo-Json cmdlet that might well simplify your code, but it's worth trying to use the modules as things like idempotency and the ability to use che

Re: [ansible-project] Having issue finding my hosts

2017-10-26 Thread &#x27;J Hawkesworth' via Ansible Project
I think the \t in your path will be interpreted as a tab character, which is not valid in a Windows path. It's best to use key: value syntax when working with Windows paths, rather than the key=value style. Generally, for hard coded windows paths they will work fine if you use key: value and e

[ansible-project] Re: Playbook for windows - Variable error

2017-10-27 Thread &#x27;J Hawkesworth' via Ansible Project
json part, yes I am already converting pscustomobjects to json > via ConvertTo-Json, but ansible I had to tell ansible that I only want the > powershell json result returned. Not all the ansible debug info. > > > Den torsdag den 26. oktober 2017 kl. 21.27.36 UTC+2 skrev J Hawkesw

[ansible-project] Re: Passing array or json as variable to powershell

2017-10-27 Thread &#x27;J Hawkesworth' via Ansible Project
Have a look at the integration tests here for some examples of how you can pass args to the script module: https://github.com/ansible/ansible/blob/devel/test/integration/targets/win_script/tasks/main.yml If you have a lot of existing powershell maybe this is the way to go but be aware that you

[ansible-project] Re: Need help to automate tasks.

2017-10-29 Thread &#x27;J Hawkesworth' via Ansible Project
You can do something like this (thanks to Matt Martz who originally suggested it) - name: check if app is up and ready to serve the wsdl uri: url: 'http://{{ inventory_hostname }}/app/app.wsdl' return_content: yes timeout: 2 delegate_to: localhost register: poll_result until:

[ansible-project] Re: Need help to automate tasks.

2017-10-29 Thread &#x27;J Hawkesworth' via Ansible Project
Oh, I meant to say you can use the block...rescue ... allways with 'debug' module to display the messages you want. See http://docs.ansible.com/ansible/latest/playbooks_blocks.html and http://docs.ansible.com/ansible/latest/debug_module.html Jon On Sunday, October 29, 2017 at 9:34:19

Re: [ansible-project] Excluding servers from all

2017-10-29 Thread &#x27;J Hawkesworth' via Ansible Project
Worth saying when you need to run against everything you can pass multiple inventory files to the ansible-playbook 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, se

[ansible-project] Re: fatal: [localhost]: FAILED! when installing IIS on Windows Server 2016 ec2

2017-11-07 Thread &#x27;J Hawkesworth' via Ansible Project
I don't use ec2 but I think having the 'connection: local' for your windows hosts is causing you problems, as it appears to be attempting to use the win_feature.py (documentation) instead of the win_feature.ps1 (actual windows module code). The connection type for windows hosts, at the moment a

[ansible-project] Re: Win_command module adds an additional slash to the windows path.

2017-11-07 Thread &#x27;J Hawkesworth' via Ansible Project
You don't mention which ansible version you are using, but I think latest devel version and possible 2.4.1 has some improvements to argument handling for win command. If you are using an older ansible version, I suggest trying win_shell. Make sure groovy is on your PATH (or use the args: chdi

<    1   2   3   4   5   6   7   8   9   >