Re: [ansible-project] Re: Running exe on windows from a batch file

2017-11-09 Thread 'J Hawkesworth' via Ansible Project
Hey, Not sure if either of these are the answer but a couple of things you can try.. Try using win_shell instead of win_command. I think it may handle args differently (because it is running inside a shell). Another thing you could try is using with_items to pass each of the packages you are i

Re: [ansible-project] Windows 10 Ubuntu | Ansible issue

2017-11-13 Thread 'J Hawkesworth' via Ansible Project
Seems to work if you use a full path. Also when you run bash.exe from a CMD window it executes the command in the current dir by looks of things in wsl cat test.sh #!/bin/bash ansible 10, -m win_ping ## end of test.sh in CMD prompt: bash -c "/home/jon/test.sh" WIN10TEST| SUCCESS => { "c

[ansible-project] Re: Ansible Install of MS Visual Studio Professional with Updates hanging

2017-11-16 Thread 'J Hawkesworth' via Ansible Project
Not something I've done myself but I have a couple of suggestions of things you can try: check the command line switches for the installer and make sure you are running the installer in a silent or unattended mode. If the installer pops up a window on the windows target, you'll never see it an

Re: [ansible-project] Re: Ansible Install of MS Visual Studio Professional with Updates hanging

2017-11-16 Thread 'J Hawkesworth' via Ansible Project
al With Updates 2015 > > raw: 'C:\TEMP\vs_pro.exe /NoRestart /passive /full /Log > C:\TEMP\vs2015_install_log.txt' > > On Thu, Nov 16, 2017 at 12:10 AM, 'J Hawkesworth' via Ansible Project < > ansible...@googlegroups.com > wrote: > >> Not something I

[ansible-project] Re: Tomcat Role for Windows

2017-11-16 Thread &#x27;J Hawkesworth' via Ansible Project
This is a bit old (jdk8, tomcat8) and has a few assumptions which might not be true for your environment (the jdk and tomcat installers are kept on a web server refered to as {{build_server}}. Its two roles one for the jdk and one for tomcat. Definitely some things could be improved - likely y

[ansible-project] Re: Tomcat Role for Windows

2017-11-16 Thread &#x27;J Hawkesworth' via Ansible Project
This is a bit old (jdk8, tomcat8) and has a few assumptions which might not be true for your environment (the jdk and tomcat installers are kept on a web server refered to as {{build_server}}. Its two roles one for the jdk and one for tomcat. Definitely some things could be improved - likely y

[ansible-project] Re: Intermittent Kerberos Issues and Unable to Fetch Files Greater than 500MB

2017-11-17 Thread &#x27;J Hawkesworth' via Ansible Project
Not had that particular error but I know from experience that kerberos is particularly dependent on DNS working reliably and also clock synchronisation. I suggest checking that your ansible controller is able to nslookup your domain controller machines reliably. Something like the following (n

[ansible-project] Re: Ansible + Chocolatey + Windows File based local repository

2017-11-24 Thread &#x27;J Hawkesworth' via Ansible Project
Good to know there's a workaround I think if you used Kerberos for authentication, and configure your inventory/group_vars for credential delegation, your ansibles modules will connect to the shares as the same user that ansible connected as, meaning you shouldn't have to setup anonymous access.

[ansible-project] Re: Wont be able to ping Windows Machines Via Linux Ansible Server

2017-11-26 Thread &#x27;J Hawkesworth' via Ansible Project
Hey I think you have the settings right, you just need to move /etc/ansible/windows.yml to /etc/ansible/group_vars/windows.yml You have created the group called windows in your inventory [windows] Lenovo-PC But the group variables aren't taking effect because they aren't in the location ansible

[ansible-project] Re: ansible_winrm_read_timeout_sec & ansible_winrm_operation_timeout_sec errors?

2017-11-28 Thread &#x27;J Hawkesworth' via Ansible Project
>From that github issue, Dag suggests trying ansible_winrm_read_timeout_sec=150.0 If that doesn't work setting all of this stuff "ansible_user=username ansible_password=password ansible_become_pass=password ansible_port=5986 ansible_connection=winrm ansible_winrm_server_cert_validation=ignore

[ansible-project] Re: 3 Solutions to structure a deployment ?

2017-11-28 Thread &#x27;J Hawkesworth' via Ansible Project
I am no expert. I am big fan of doing the simplest thing that works for now, and then refactoring things when the simplest thing becomes too simple. Some things that might help you decide what is going to work best for you. You can have mulitple files in your tasks folder in your role. This le

[ansible-project] Re: unable to install pywinrm on Centos 6.5

2017-12-02 Thread &#x27;J Hawkesworth' via Ansible Project
Looks like it wants a newer version of cffi. What happens if you install cffi first? I recall having some trouble getting cryptography installed when I was using Centos 6.5, but forget the details now. I think maybe I had to use yum to remove the version supplied with the OS. Things have prob

Re: [ansible-project] Re: Wont be able to ping Windows Machines Via Linux Ansible Server

2017-12-08 Thread &#x27;J Hawkesworth' via Ansible Project
Not sure what c:\tmp\notepad.exe is in your example, but here is how I install notepad++ {{ deploy_dir }} is a staging location where I keep files to be installed. I guess you could use C:\tmp for that if it makes sense for you. the /S makes the notepad++ installer run in silent, or 'unattende

[ansible-project] Re: Ansible with Windows

2017-12-08 Thread &#x27;J Hawkesworth' via Ansible Project
Yes, this is possible, there is lots of information on authentication options in the documentation here: https://docs.ansible.com/ansible/devel/windows.html Hope this helps, Jon On Tuesday, November 28, 2017 at 5:07:07 PM UTC, Alicia Nguyen wrote: > > Hi, > > I had ansible controlling a few Win

[ansible-project] Windows folks: help test the new pywinrm beta!

2017-12-09 Thread &#x27;J Hawkesworth' via Ansible Project
Thanks for this, that's great news. Congratulations to you and Jordan for getting this done. Looking forward to giving this a go as soon as I can. Jon -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] Re: Wont be able to ping Windows Machines Via Linux Ansible Server

2017-12-09 Thread &#x27;J Hawkesworth' via Ansible Project
I think you just have a syntax error, and need to put 'hosts' before 'tasks'. I can't test this at the moment, but from memory the syntax would be as follows. # start of playbook - name: install notepad plus plus playbook hosts: windows tasks: - name: fetch notepad-plus-plus installe

[ansible-project] How to hot deploy to tomcat with ansible?

2017-12-10 Thread &#x27;J Hawkesworth' via Ansible Project
I can recommend using Jenkins for running your maven builds. I don't use the Tomcat manager app to hot deploy apps, but I imagine you could use the uri or win_uri module to post your war file. You can run remote ansible playbooks using the 'Send Files Over SSH' Jenkins plugin - and probably othe

[ansible-project] Re: How to hot deploy to tomcat with ansible?

2017-12-17 Thread &#x27;J Hawkesworth' via Ansible Project
Sorry I thought I had replied to this one days ago. Yes you are right uri doesn't do that so curl would be the only other option I can think of right now. The way we do releases without down time is to have a minimum of two vms running Tomcat and a load balancer in front of them. To deploy, we

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-17 Thread &#x27;J Hawkesworth' via Ansible Project
You can pass win_shell a chdir in the 'args' section as well if that helps (may not if a full path is needed). Feel free to go back to your vendor and ask them how their automated testing works if its such a pain to install/uninstall their product. The only way we will get better quality instal

[ansible-project] Re: How to hot deploy to tomcat with ansible?

2017-12-19 Thread &#x27;J Hawkesworth' via Ansible Project
I'd recommend setting up tomcat as a service on windows. I'd fear that if you start tomcat using a .bat file, when your playbook completes your tomcat process may get ended. Also once you have tomcat set up as a service, you can use win_service to start/stop/restart it. You can configure the se

[ansible-project] Re: Basic solution wanted - Start IE url

2017-12-22 Thread &#x27;J Hawkesworth' via Ansible Project
I guess you might be able to get this to work by using win_psexec although I haven't tried. Starting interactive programs like this isn't really what winrm is intended for (the 'rm' bit stands for 'remote management') and running interactive programs is sort of at the edge of machine management

[ansible-project] Re: Basic solution wanted - Start IE url

2017-12-22 Thread &#x27;J Hawkesworth' via Ansible Project
Perhaps next best thing is to use win_shortcut to create links to the applications on the desktop. -- 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-p

[ansible-project] Source environment file on connection

2017-12-24 Thread &#x27;J Hawkesworth' via Ansible Project
I would log in to a representative machine, do the source command and then examine what environment variables have been set, and then configure environment for any commands that need it. See http://docs.ansible.com/ansible/latest/playbooks_environment.html Jon -- You received this message be

[ansible-project] Re: ansible - small iterations server lifecycle

2018-01-05 Thread &#x27;J Hawkesworth' via Ansible Project
This seems to me to be 'going against the grain' of how ansible wants to work. What I do is organise hosts into groups by their function, web server, database server etc and I have a playbook for provisioning/updating each server type. The playbooks share a lot of roles but if I need to do so

[ansible-project] "Start in" field for win_shortcut

2018-01-13 Thread &#x27;J Hawkesworth' via Ansible Project
Not sure I follow. Can you share your playbook step(s) that you are using? Jon -- 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...@g

[ansible-project] Idempotent fetching of files by URL

2018-01-13 Thread &#x27;J Hawkesworth' via Ansible Project
Try Force: no I think that will work, although I use win_get_url more than get_url Jon -- 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+uns

[ansible-project] Re: "Start in" field for win_shortcut

2018-01-14 Thread &#x27;J Hawkesworth' via Ansible Project
Right, I understand what you mean now. Did you try setting 'directory' to the location where you want 'start in' to be? If that doesn't do it, have a look at the module code, it's probably going to be fairly straightforward to add another module parameter, assuming the api supports setting the

[ansible-project] Debug Module Returns "Hello, World!" when a message is specified.

2018-01-14 Thread &#x27;J Hawkesworth' via Ansible Project
My guess is all the module results are contained in a key called 'results' within the var that you registered. Try this - debug: var: "{{ docker_repo_line }}" I suspect that the bit you want is in - debug: msg: "{{ docker_repo_line.results.stdout }}" But try inspecting the who

[ansible-project] Re: "Start in" field for win_shortcut

2018-01-16 Thread &#x27;J Hawkesworth' via Ansible Project
ing at the "win_shortcut.psl" file? I have no idea what I >> would add. >> Do you think you could be more specific? I'm not yet a confident coder. >> >> >> >> On Sunday, January 14, 2018 at 12:29:05 AM UTC-8, J Hawkesworth wrote: >>&

[ansible-project] Re: JMESPath-like expression to traverse Ansible variables

2018-01-16 Thread &#x27;J Hawkesworth' via Ansible Project
You need to use the json_query filter (and install jmespath module on your ansible controller machine) if you want to use JMESPath filtering. See http://docs.ansible.com/ansible/latest/playbooks_filters.html#json-query-filter There's an example there that looks fairly similar to what you are t

[ansible-project] Re: How to force win_unzip to overwrite a existing file?

2018-01-22 Thread &#x27;J Hawkesworth' via Ansible Project
If it makes sense for what you are doing, you can allways make sure that the zip is removed by running a win file state: absent first, like this. - name: ensure old zip is removed win_file: state: absent path: C:\path\to\zipfile.zip On Thursday, January 18, 2018 at 11:49:44 PM UTC, J

[ansible-project] Re: Tasks in rescue don't work if host is unreachable

2018-01-23 Thread &#x27;J Hawkesworth' via Ansible Project
I suggest you delegate your rescue tasks to localhost - when things go wrong on remote hosts, the local host, where ansible is running, is the most likely thing to still be working. Documentation about delegation is here if you aren't familiar with it: http://docs.ansible.com/ansible/latest/pl

[ansible-project] Re: VARIABLE IS NOT DEFINED!

2018-01-23 Thread &#x27;J Hawkesworth' via Ansible Project
I think you just need to set gather_facts: yes otherwise host-related variables, such as inventory_hostname won't exist when you come to use them later in your playbook. Hope this helps, Jon On Saturday, January 20, 2018 at 7:26:57 AM UTC, Surjeet Singh wrote: > > am i impacted with some b

[ansible-project] Re: vsphere_guest module doesn't receve datastore value

2018-01-23 Thread &#x27;J Hawkesworth' via Ansible Project
I use vmware_guest to clone vms and it works fine. However I recall having problems with using VMXNET3 and wound up switching to e1000e. I think this is because VMXNET3 depends on vmware tools and so isn't available during the early boot up process (I could be wrong about why, but I definitely

[ansible-project] Re: Any tips on working with SQL Express on Windows

2018-01-23 Thread &#x27;J Hawkesworth' via Ansible Project
I don't know if there's any difference with Express but this guy seems to have done something similar http://sqlblog.com/blogs/allen_white/archive/2011/05/19/change-sql-servers-authentication-mode-with-powershell.aspx Assuming you can load the SMO dll (like here): http://sqlblog.com/blogs/allen

Re: [ansible-project] Command module failure- ansible

2018-01-23 Thread &#x27;J Hawkesworth' via Ansible Project
It seems like that something that your script is doing is causing the command module to fail. Without seeing the code for script_name.sh it is hard to make any useful suggestions about what is causing the failure. Also its possible you need some environment variables set by your login shell, s

[ansible-project] Re: Any tips on working with SQL Express on Windows

2018-01-25 Thread &#x27;J Hawkesworth' via Ansible Project
Sure, you need to use 'register' to capture the output from your script - something like this - name: grant automation user access to the new cert script: grantRightsToMyCerts.ps1 {{ signing_cert_thumbprint }}" register: grant_results - name: debug grant_results debug: var=grant_results

[ansible-project] Re: How to retry up to N times (on failures) with win_get_url

2018-01-25 Thread &#x27;J Hawkesworth' via Ansible Project
Could you show the error in context somehow? I think your playbook looks fine, but my guess is the failure isn't between the windows box and the webserver you are downloading from, but instead ansible isn't able to talk to the windows box. I.e. you are handling a failure here

[ansible-project] Re: [Windows] Install visual studio

2018-01-25 Thread &#x27;J Hawkesworth' via Ansible Project
I have successfully installed visual studio using win_chocolatey in the past (with become escalating to run as local administrator). Might be worth trying that. I suspect running with become might fix your problem as clearly its upset about having access to C:\\Users\\ansible\\r4muzag1.gdd Ho

[ansible-project] Re: Any tips on working with SQL Express on Windows

2018-01-25 Thread &#x27;J Hawkesworth' via Ansible Project
You are welcome You can probably use changed_when: False for these scripts which are just gathering information See http://docs.ansible.com/ansible/latest/playbooks_error_handling.html#overriding-the-changed-result Jon On Thursday, January 25, 2018 at 1:27:48 PM UTC, Justin Seiser wrote: > >

[ansible-project] Re: win_copy failing

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
I don't think win_copy can collect from a share like you are trying to do in the example above. The assumption is that the source file you are copying is on the ansible controller. One trick you could use is to run smbclient on the ansible controller to collect the files you want to deploy to

[ansible-project] Re: wait_for a windows file

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
Hmm wait_for is a python module. waiting for the port will work fine as that will presumably be happening on the ansible controller, rather than remotely on the machine you are trying to access. If only waiting for a file will do then you could try using the fetch module to pull the file back

[ansible-project] Re: Unpack tar.gz on Windows Server?

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
If you want an example role to install 7zip - have a look in the integration tests test/integration/roles/test-win-msi/ All the best, Jon On Wednesday, 10 February 2016 21:55:55 UTC, Slim Slam wrote: > > The easiest way seems to be to install 7z http://www.7-zip.org and use > that. It can hand

[ansible-project] Re: Adding Multiple lines to file

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
Lots of examples of the various ways to loop here: http://docs.ansible.com/ansible/playbooks_loops.html#standard-loops Depending on what you are trying to achieve, you might actually find the win_template module is easier to work with rather than multiple calls to win_lineinfile Hope this help

[ansible-project] Re: Adding Multiple Lines to file (Windows Servers)

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
blockinfile is not a windows module unfortunately. There is an as yet un merged module for manipulating the windows hosts file though - perhaps give that a try - https://github.com/ansible/ansible-modules-extras/pull/1455 Hope that helps, Jon On Thursday, 11 February 2016 10:34:55 UTC, Mark

[ansible-project] Re: How to make symbolic links in windows via Ansible ?

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
Obviously you will need to connect as an Administrator user. You don't mention which version of windows you are controlling but you may just need to temporarily disable UAC prompt for Administrator users. On Server 2012 the setting for this is in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\C

Re: [ansible-project] Random undefined variables (facts) since ansible 2.0 upgrade

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
Do you have fact gathering set to smart in your ansible.cfg? On Thursday, 11 February 2016 13:28:38 UTC, Michael Baydoun wrote: > > In our case, the facts are being gathered, and used other plays included > in site.yml, but later on in a subsequent play the a fact that was defined > previously i

[ansible-project] Re: Powershell Script playbook no running on servers

2016-02-11 Thread &#x27;J Hawkesworth' via Ansible Project
Hmm, not sure what is going on there. Try running with -v so you can see stdout from script module output Also check the event log to see if there is anything there. When run on the server do you have accept UAC prompt? Might need to turn that off to run remotely via ansible. Hope this helps

[ansible-project] Re: Running NSSM from copied executables on windows and avoid installing NSSM

2016-02-12 Thread &#x27;J Hawkesworth' via Ansible Project
You will need to connect as a user with admin level privileges. You can probably use win_copy to push the nssm.exe on to your machine first. If I recall it is a single standalone executable with no external dependencies (except possibly .net) Jon On Friday, 12 February 2016 09:04:26 UTC, ishan ja

[ansible-project] Re: Powershell Script playbook no running on servers

2016-02-12 Thread &#x27;J Hawkesworth' via Ansible Project
Try with -vv ( 6 vs) which should show you the stdout / stderr from the script run. I would be tempted to insert some lines like the following to see what progress, if any, your script is making: Write-Host "Got here" Actually - I did a little digging and found this page - http://help

[ansible-project] Re: Debugging Ansible 2 on Windows Server?

2016-02-15 Thread &#x27;J Hawkesworth' via Ansible Project
Bit of a guess but I wonder if you are hitting a quota limit in the winrm configuration on your windows machine? MaxMemoryPerShellMB looks the most likely - see https://msdn.microsoft.com/en-us/library/windows/desktop/ee309367(v=vs.85).aspx Unpatched Server 2008 R2 had a bug that mis-set the

[ansible-project] Re: Debugging Ansible 2 on Windows Server?

2016-02-15 Thread &#x27;J Hawkesworth' via Ansible Project
orry, I'm not a Windows > expert). > > Thanks, > > J > > > On Monday, February 15, 2016 at 5:40:58 AM UTC-6, J Hawkesworth wrote: >> >> Bit of a guess but I wonder if you are hitting a quota limit in the winrm >> configuration on your windows machine?

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread &#x27;J Hawkesworth' via Ansible Project
Above looks good. You could try using win_stat, which returns a checksum and then do whatever is necessary if the checksum has changed. Something like the following --- - hosts: all tasks: - name: stat the hosts file win_stat: path: C:\windows\system32\drivers\etc\hosts

[ansible-project] Re: Running NSSM from copied executables on windows and avoid installing NSSM

2016-02-16 Thread &#x27;J Hawkesworth' via Ansible Project
ate the privileges to > start as admin, so it is obvious we need additional steps to connect via > ansible other than using the admin account. > On Friday, 12 February 2016 20:42:42 UTC+5:30, J Hawkesworth wrote: >> >> You will need to connect as a user with admin level privileg

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread &#x27;J Hawkesworth' via Ansible Project
So, not quite sure what's going on here but... register just stores the output from the win_stat command in a variable with the name you've given it. So you need to do something with the contents of the variable - hence the debug in the example playbook above Also I think variable names can't

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread &#x27;J Hawkesworth' via Ansible Project
Glad its working. I don't know why those other variable names might be failing. Perhaps worth checking your playbook is valid yaml. I like to use either notepad++ as it has YAML syntax hightlighting, or use www.yamlint.com to check for correctness. Jon On Tuesday, 16 February 2016 14:54:06 U

[ansible-project] Re: Debugging Ansible 2 on Windows Server?

2016-02-16 Thread &#x27;J Hawkesworth' via Ansible Project
gt; before. How can it just fail with no > output? I don;t see anything in the Windows event logs, but I could be > missing something. > I'm hoping that Ansible 2.01 might work a bit better. > > J > > On Monday, February 15, 2016 at 3:04:10 PM UTC-6, J Hawkesworth wro

[ansible-project] Re: win_package arguments format

2016-02-17 Thread &#x27;J Hawkesworth' via Ansible Project
Are you using Ansible 2.0.0.2? I suggest trying to do away with the quotes if at all possible, even if you wind up with a full path to the setup.iss arguments: "-s -f1 C:\\Users\\UserName\\Desktop\\Software\\setup.exe" Jon On Wednesday, 17 February 2016 11:29:02 UTC, Gerald Spencer wrote: > >

[ansible-project] Re: copy file from remote windows server to local machine?

2016-02-22 Thread &#x27;J Hawkesworth' via Ansible Project
I may be missing the point here but is the fetch module what you need? Fetch works against windows hosts and linux hosts. Plenty of examples in the integration tests here: https://github.com/ansible/ansible/blob/devel/test/integration/roles/test_win_fetch/tasks/main.yml Hope this helps, Jon

[ansible-project] Re: Ansible Playbooks can run PowerShell scripts but not long ones

2016-02-22 Thread &#x27;J Hawkesworth' via Ansible Project
Ok, there could be a number of things going on here. WimRM enforces quotas on things like maximum amount of memory used and other resources, presumably as a security measure. Another thing that could be going on here is that one or more of the 18 things that are installed require an interactive

[ansible-project] Re: Ansible managing Windows hosts with non admin user

2016-02-22 Thread &#x27;J Hawkesworth' via Ansible Project
>From here it looks like this is possible, although you would have to tweak user rights: https://social.technet.microsoft.com/Forums/scriptcenter/en-US/60de5fcd-33e0-479b-9668-fcf683678a2f/winrm-for-nonadministrative-users?forum=ITCG I get the impression that the intention for WinRM is for admis

[ansible-project] Re: Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote tem

2016-02-22 Thread &#x27;J Hawkesworth' via Ansible Project
Hi, Can I check that you have replaced your ansible.cfg with a new version supplied with ansible 2.0.0.2? Jon On Monday, 22 February 2016 13:57:25 UTC, Timothy Vandenbrande wrote: > > I can confirm this. > I have this issue on ansible 2.0.0.2, but works on ansible 1.9.x > I get this error whicl

[ansible-project] Re: Ansible windows modules

2016-02-23 Thread &#x27;J Hawkesworth' via Ansible Project
I would recommend trying the win_package module which can take properties and, if you capture the product_id you can use that in your playbook to make sure it only attempts installation once. Hope this helps, Please report back if this works for you so others can learn from your experience. M

[ansible-project] Re: Windows File Difference

2016-02-23 Thread &#x27;J Hawkesworth' via Ansible Project
At the moment I don't think there's anything in the windows modules that will help with this. If anyone knows better please say but I think today --check and --diff aren't implemented for windows modules. However, it might be possible to make use of the --check and --diff playbook command line

[ansible-project] Re: Ansible windows modules

2016-02-24 Thread &#x27;J Hawkesworth' via Ansible Project
Quang, I suggest you try running the installation as a user with Administrative privileges. You may also find you need to temporarily disable UAC prompting for Administrative users only, which on Server 2012 R2 can be achieved by modifying [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curren

[ansible-project] Re: Powershell Script not working when using PLaybook

2016-02-24 Thread &#x27;J Hawkesworth' via Ansible Project
Have you checked the event viewer on the remote windows machine? I haven't used Octopus Deploy / Tentacle so don't know if it is attempting any operations on remote machines during its installation. If so its possible you are hitting a 'second hop' issue - going from Ansible box to windows ho

[ansible-project] Re: Windows File Difference

2016-02-25 Thread &#x27;J Hawkesworth' via Ansible Project
Hi Sorry, probably didn't explain myself very well and what I was proposing was probably pretty fragile. You'd have to set up a directory of reference files that you want to compare to, and another of candidate files. Then you'd need a playbook to use fetch to pull the candidate files back fro

[ansible-project] win_regedit; binary data

2016-02-25 Thread &#x27;J Hawkesworth' via Ansible Project
Hi, Does anyone have an example of using win_regedit to set binary data? I have a hex encoded string from a reg export but so far not found a way to convert it to whatever powershell needs. Many thanks, Jon -- You received this message because you are subscribed to the Google Groups "Ansibl

[ansible-project] Re: win_regedit; binary data

2016-02-25 Thread &#x27;J Hawkesworth' via Ansible Project
you a modified version of win_regedit. All the best, Jon On Thursday, 25 February 2016 10:18:29 UTC, J Hawkesworth wrote: > > Hi, > > Does anyone have an example of using win_regedit to set binary data? > > I have a hex encoded string from a reg export but so far not found a

[ansible-project] Re: Updated ansible to track latest, now I have error 'Connection' object has no attribute '_split_ssh_args'

2016-02-26 Thread &#x27;J Hawkesworth' via Ansible Project
Not seen this myself but a couple of things to investigate. You don't mention which version of ansible you were running previously - if it wasn't from a development checkout, ensure you have run source hacking/env-setup Probably worth re-running even if you were on a dev checkout before. Also

[ansible-project] Re: Ansible managing Windows hosts with non admin user

2016-02-26 Thread &#x27;J Hawkesworth' via Ansible Project
d or ipconfig. > > I wonder what Ansible is doing? > > On Monday, 22 February 2016 10:31:33 UTC, J Hawkesworth wrote: >> >> From here it looks like this is possible, although you would have to >> tweak user rights: >> >> >> https://soci

[ansible-project] Re: Ansible managing Windows hosts with non admin user

2016-02-27 Thread &#x27;J Hawkesworth' via Ansible Project
Thanks for this. Since ansible and pywinrm are behaving the same, it occurs to me that the winrm configuration might not suit pywinrm. >From the above it appears you have created specific configuration for winrm, >rather than using the settings that are applied if you run the >ConfigureRemoti

[ansible-project] Re: Ansible windows modules

2016-02-27 Thread &#x27;J Hawkesworth' via Ansible Project
I have used the workaround described in the article to install a hotfix. I expanded the .msu and then used raw to run dism.exe to install the expanded file, so I hope the same workaround will work for you. Hope this helps, Jon -- You received this message because you are subscribed to the

[ansible-project] Re: win_template always changing?

2016-02-29 Thread &#x27;J Hawkesworth' via Ansible Project
Hi I have noticed this behaviour when running the windows integration tests. As far as I can tell it is something that has started happening relatively recently. What version of ansible are you using? Many thanks, Jon On Monday, 29 February 2016 11:39:43 UTC, Chris Bennett wrote: > > Hi there

Re: [ansible-project] Re: win_template always changing?

2016-03-01 Thread &#x27;J Hawkesworth' via Ansible Project
Chris, Thanks for testing. Did you also update to latest devel of the submodule project? Jon On Tuesday, 1 March 2016 10:25:12 UTC, Chris Bennett wrote: > > Hi Jon/Brian, > > I'm running devel. Performed a pull & retried but still seeing a > change in the file. > > Regards, > > Chris > --

Re: [ansible-project] Re: win_template always changing?

2016-03-01 Thread &#x27;J Hawkesworth' via Ansible Project
Chris, glad you are working again. I just tested and the template integration tests are passing again now with latest devel. For info I think there is still an issue regarding leaving temp dirs behind when using win_template which I am investigating under https://github.com/ansible/ansible-mod

[ansible-project] Re: Ansible Not Passing Domain

2016-03-02 Thread &#x27;J Hawkesworth' via Ansible Project
My guess would be that you don't have the python kerberos library installed as it looks like ansible is making a plaintext connection rather than a kerberos one. from the command line on your ansible controller, start python and enter import kerberos if you don't have kerberos you will get

[ansible-project] Re: Windows 7 Ansible 2.0

2016-03-02 Thread &#x27;J Hawkesworth' via Ansible Project
I think Windows 7 comes with powershell 2.0 - Ansible needs powershell 3.0 or later. Have you upgraded to powershell 3 or 4, (or Windows Management Framework 3.0 or 4.0)? I suggest using the windows hostname rather than ip, just to rule that out too. Hope this helps, Jon On Wednesday, 2 Marc

[ansible-project] Re: Ansible win_regedit error: {"failed": true, "msg": "'dict object' has no attribute 'datatype'"}"

2016-03-02 Thread &#x27;J Hawkesworth' via Ansible Project
I think you are on the right track. I suspect you don't want 'item.datatype' in your with_items list - you only need item. when you are dereferencing the variable. Not tested, but I think maybe something like this is what you are after. I changed subkey to location as it seems subkey has a spe

Re: [ansible-project] Problem in exuting ConfigureRemotingForAnsible.ps1 in windows 7

2016-03-02 Thread &#x27;J Hawkesworth' via Ansible Project
The script has changed a bit since Chris's message (over a year ago). Can you confirm you have upgraded to powershell 3 or 4 on the machines before running ConfigureRemotingForAnsible.ps1 It would help if you provide the exact error message. Hope this helps, Jon On Wednesday, 2 March 2016

[ansible-project] Re: Line breaks are excluded when copying a file from ansible linux host to windows server using win_copy

2016-03-03 Thread &#x27;J Hawkesworth' via Ansible Project
My guess is you are hitting the difference between what linux and windows considers a line ending. linux is happy with \n windows wants \r\n if you run od -cx yourfile you will probably only see \n if the file was originally created on a windows machine, in say, Notepad, then it will get

[ansible-project] Re: "Kerberos-based authentication was failed. Code 401" - but I've already acquired a valid ticket

2016-03-05 Thread &#x27;J Hawkesworth' via Ansible Project
I'd recommend using the hostname, rather than the ip address of the windows machine you want to connect to in your inventory. Kerberos/Active Directory seems to be intended to work with host and domain names. I would also check that ping yourhost and ping yourhost.mycloud.local return the corr

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-05 Thread &#x27;J Hawkesworth' via Ansible Project
What version of windows and service pack is on the hosts that won't respond to ping? Are you using the win_ping module? win_ping will connect using the wirnm port, rather than the normal ping port. You might have firewall configured not to respond to the normal ping port on the machines which

[ansible-project] Re: Unzip on windows is giving You cannot call a method on a null-valued expression

2016-03-07 Thread &#x27;J Hawkesworth' via Ansible Project
Does install_base_path exist? On Monday, 7 March 2016 14:01:28 UTC, Deepa Yr wrote: > > - > name: "Unpack license into Client install" > win_unzip: > dest: "{{ install_path }}\\" > src: "{{ install_base_path }}\\Bundles.zip" > > Path {{ install_path }}\\ already exists. > > When abov

[ansible-project] Re: Connecting to Azure Win Servers

2016-03-07 Thread &#x27;J Hawkesworth' via Ansible Project
Hmm, looks like it is trying to make an SSH connection, rather than a WinRM connection Port 22 is the giveaway there - should be 5985 or 5986 for winrm. I suggest checking your inventory/group vars to make sure you have ansible_connection: winrm set in your inventory or group vars for this h

[ansible-project] Re: How to copy a file from control machine to the host where task is running

2016-03-07 Thread &#x27;J Hawkesworth' via Ansible Project
Try the copy module: http://docs.ansible.com/ansible/copy_module.html On Monday, 7 March 2016 05:20:10 UTC, Deepa Yr wrote: > > Any help on this ? > > > On Thursday, March 3, 2016 at 3:04:12 PM UTC+5:30, Deepa Yr wrote: >> >> I have few files in control machine ie host1. >> My playbook/tasks are

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-07 Thread &#x27;J Hawkesworth' via Ansible Project
us know if you need to have any other details about the infra. > > > On Saturday, March 5, 2016 at 7:53:51 PM UTC+5:30, J Hawkesworth wrote: >> >> What version of windows and service pack is on the hosts that won't >> respond to ping? >> >> Are you u

[ansible-project] Re: playbook to install software on windows clients from linux control machine

2016-03-08 Thread &#x27;J Hawkesworth' via Ansible Project
Hi Deepa This thread is old, things have moved on. win_package is now part of ansible 2.0 and win_copy is suitable for transferring files from your ansible controller to your windows machines. Hope this helps, Jon On Tuesday, 8 March 2016 07:25:46 UTC, Deepa Yr wrote: > > Were you able to res

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-08 Thread &#x27;J Hawkesworth' via Ansible Project
ect to can be found using both hostname > and ip address > > *Yes, we can found the machines with IP and host names. This was tested > using RDP.* > > > Please let me know if you want to have any other details. > > Thanks, > Akash John > > > >

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-08 Thread &#x27;J Hawkesworth' via Ansible Project
gt; *Default principal: user...@corp.mydomain.com* >>> *Valid starting Expires Service principal* >>> *03/07/2016 11:05:32 03/07/2016 21:05:32 >>> krbtgt/corp.myd...@corp.mydomain.com* >>> *renew until 03/07/2016 21:05:32 * >>

[ansible-project] Re: Running exe file on windows from linux control machine

2016-03-09 Thread &#x27;J Hawkesworth' via Ansible Project
Assuming your product is 64 bit, you can also install it on a windows machine somewhere and look in the following location in the registry to find the product_id: HKLM:\Software\microsoft\windows\currentversion\uninstall The package_id is only used to check whether the package has already been

[ansible-project] Re: The term '/bin/sh' is not recognized as the name of a cmdlet - PowerShell

2016-03-10 Thread &#x27;J Hawkesworth' via Ansible Project
Can you share your ansible.cfg differences between a clean ansible.cfg? Looks like the result of some sudo/become settings are getting added to your setup module invocation on the windows box and confusing things. Jon On Wednesday, 9 March 2016 14:30:18 UTC, Peter Daniel wrote: > > I'm testing

[ansible-project] how to debug 'ERROR! failed to combine variables, expected dicts but got a 'dict' and a 'AnsibleUnicode''

2016-03-10 Thread &#x27;J Hawkesworth' via Ansible Project
Hi, I've been refactoring an inventory file and moving some things out into group and host vars. When I try and use debug just to check that the inventory file is ok like this: ansible locahost -i bust_inventory -m debug I'm getting ERROR! failed to combine variables, expected dicts but go

[ansible-project] Re: how to debug 'ERROR! failed to combine variables, expected dicts but got a 'dict' and a 'AnsibleUnicode''

2016-03-10 Thread &#x27;J Hawkesworth' via Ansible Project
... and to answer my own question... remember when moving inventory vars, which may be expressed as key=value pairs into your host_vars or group_vars, that host_vars and group_vars expect proper yaml syntax i.e. key: value Jon On Thursday, 10 March 2016 15:44:45 UTC, J Hawkesworth wrote

[ansible-project] Re: Create multiple VMware guests with a Playbook?

2016-03-11 Thread &#x27;J Hawkesworth' via Ansible Project
Hi Mark, I've not tried this myself with this specific module, but I think you should be able to use one of the with_ mechanisms in your playbook to create multiple vms. Have a look at http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-hashes Hope this helps, Jon On Thursday,

[ansible-project] Re: Create multiple VMware guests with a Playbook?

2016-03-14 Thread &#x27;J Hawkesworth' via Ansible Project
Hi Mark, I think you are getting pretty close. I can see a couple of issues in your playbook which might unstick you... First the with_items needs to go right at the end of all of the parameters for the vsphere guest module - at the moment you have the exsi parameter after the with_items. Als

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2016-03-18 Thread &#x27;J Hawkesworth' via Ansible Project
I suggest you add a task, before your win_service task that installs the service if it is not yet installed. Depending on what the service is, you might be able to use win_package to install it. If it is already installed, there is not much to loose by running the win_package task a second ti

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2016-03-19 Thread &#x27;J Hawkesworth' via Ansible Project
where i check the service with win_service works fine except > that in the case it is not present, it will give me a lot of red > statements. What i am looking for is a better way where i can simply > check that if a given service is created or not. I wish NSSM had some API > to check f

[ansible-project] Re: check if a (file or directory) symbolic links exists on a windows file system with the help of win_file

2016-03-19 Thread &#x27;J Hawkesworth' via Ansible Project
I don't have any experience of using symlinks on windows, but my advice for construction windows paths (assuming you are using ansible 2.0 or later) is... 1/ If you need to double quote your path names, then always use double backslash for the path separator So win_stat: "path=E:\\folder\\lin

[ansible-project] Re: win_stat poses an error when i try to get info about a file symbolic link actively in use by a processor

2016-03-21 Thread &#x27;J Hawkesworth' via Ansible Project
It looks like a fix for this has already been made in latest development version of ansible. https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/powershell.ps1#L214 Are you able to try latest development version? Jon On Monday, 21 March 2016 05:48:53 UTC, ishan jain wrote:

<    1   2   3   4   5   6   7   8   9   >