[ansible-project] Re: Can't connect using winrm not accepting self-signed certs

2017-08-31 Thread Jordan Borean
Hi As a quick starting step you can add the following to your inventory so that Ansible works with untrusted certificates. ansible_winrm_server_cert_validation: ignore If you want to actually connect with HTTPS and work with the trust mechanism without ignoring it you would need to import the

Re: [ansible-project] YUM module not installing/uninstall local JDK RPM

2017-08-31 Thread Dick Visser
You can install an rpm by it's file name, but you cannot uninstall it by its file name. You have to use the actual package name, so in this case probably "jdk1.8.0". This isn't a limitation of ansible, but merely the way yum works (and apt-get too, for that matter) Dick On 30 August 2017 at 22:1

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

2017-08-31 Thread '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] --tags not propagating thru a play include

2017-08-31 Thread Barry Kaplan
I have a playbook that includes lots of other playbooks, eg # site.yml - include: mesos-master.yml - include: mesos-slave.yml Inside mesos-master.yml for example, I have play that looks like - name: Configure logging hosts: mesos_master become: yes tags: [logging] roles: - role: log

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

2017-08-31 Thread '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 '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 '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 >

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

2017-08-31 Thread Sukanya shenoy
Thank you for your suggestion but it is not even installing dotNet framework 4.5v. On Thursday, August 31, 2017 at 2:46:54 PM UTC+5:30, J Hawkesworth wrote: > > My guess is that is because you are also replacing Windows Management > Framework, which includes WinRM, which is the mechanism used to

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

2017-08-31 Thread Sukanya shenoy
- name: Windows Powershell Upgrade hosts: tag_AnsibleCLI_windows tasks: - name: Install and upgrade powershell win_shell: | New-Variable -Name "file" -Value "http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe";

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

2017-08-31 Thread Sukanya shenoy
Here is my playbook to install dotNet framework 4.5 - name: Windows Powershell Upgrade hosts: tag_AnsibleCLI_windows tasks: - name: Install and upgrade powershell win_shell: | New-Variable -Name "file" -Value "http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a

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

2017-08-31 Thread Thijn Bukkems
The folder structure looks like this /etc/ansible: ansible.cfg inventory.yml /etc/ansible/group_vars/: web.yml I haven't configured the ansible.cfg in /etc/ansible regarding the cert validation. Op donderdag 31 augustus 2017 02:26:34 UTC-7 schreef J Hawkesworth: > > Its odd that you are getti

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

2017-08-31 Thread '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: Unable to do basic win_ping from CentOS7 to Windows 2012

2017-08-31 Thread Thijn Bukkems
command line: ansible web -m win_service -a "name=spooler state=stopped" Op donderdag 31 augustus 2017 02:27:02 UTC-7 schreef J Hawkesworth: > > 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

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

2017-08-31 Thread sohail . prodevans
Use windows fqdn name in place of IPaddress then it will work On Wednesday, August 30, 2017 at 10:21:48 PM UTC+5:30, Thijn Bukkems wrote: > > Hi all, > > Just getting started with Ansible as proof of concept but already stuck > and not sure how to make it work. I have a CentOS7 box that is not o

[ansible-project] Re: Hierarchical lookups.

2017-08-31 Thread '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] winrm send_input failed

2017-08-31 Thread sohail . prodevans
[WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback (most recent call last): File "/usr/lib/python2.7/site- packages/ansible/plugins/connection/winrm.py", line 267, in _winrm_exec self._winrm_send_input(self.protocol, self.shell_id, command_id, data, eof=is_last) File "/usr/lib/python2.7/sit

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

2017-08-31 Thread '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: Unable to do basic win_ping from CentOS7 to Windows 2012

2017-08-31 Thread Thijn Bukkems
Thanks guys, I changed to fqdn shortly after that original post. Strangely enough now only getting access denied with 1 machine even though 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:2

[ansible-project] Simple ansible script Error

2017-08-31 Thread Konrad Kosewski
I have errors Could You help me :D - hosts: "{{ variable_hosts | default('all') }}" remote_user: ansible become: yes tasks: - include_vars: users.yml - name: Make sure we have a {{ item.groupname }} group group: name:{{item.groupname}} with_items: '{{groups}}'

Re: [ansible-project] do post_tasks execute when a role fails?

2017-08-31 Thread ssbarnea
Sorry to revive this old thread but I (and many others) got the same problem which seems not to be addressed yet. My original post was at https://stackoverflow.com/questions/45983636/how-to-always-run-some-ansible-roles-after-previous-failures If you you wrote is still true (ansible 2.3.x), it

Re: [ansible-project] Simple ansible script Error

2017-08-31 Thread Kai Stian Olstad
On torsdag 31. august 2017 16.17.06 CEST Konrad Kosewski wrote: > I have errors Could You help me :D > > > - hosts: "{{ variable_hosts | default('all') }}" > remote_user: ansible > become: yes > tasks: > - include_vars: users.yml > - name: Make sure we have a {{ item.groupname }} gr

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

2017-08-31 Thread Adam Shantz
Thanks to everyone for the feedback. This was all very useful! -Adam On Tuesday, August 29, 2017 at 8:44:12 AM UTC-4, Dick Davies wrote: > > This is currently an opinion argument, and you need to turn it into a > numbers argument. It's the only way to get past egos. > > If a team deliver wha

[ansible-project] Blockinfile - how to delete text

2017-08-31 Thread Anfield
I have this text file and I was trying to delete some text that I had just added. Not sure how I would go about deleting 1) The entire text tree and the wrappers #BEGIN ANSIBLE MANAGED BLOCK 2) Just deleting the text tree Can anyone explain? Thanks The delete functionality is not functioning a

[ansible-project] Questions: variables and includes

2017-08-31 Thread John Harmon
I have the following scenario, and I just want to see if I understand correctly what is happening (hopefully after posting this my alignment doesn't get all messed up): main.yml < Gathers some variables... has some includes based on those variables /

Re: [ansible-project] Blockinfile - how to delete text

2017-08-31 Thread Kai Stian Olstad
On torsdag 31. august 2017 18.24.14 CEST Anfield wrote: > textfile - > > giraffe > This is my text to add > Noo > penguin > robot > > #BEGIN ANSIBLE MANAGED BLOCK > tree > #BEGIN ANSIBLE MANAGED BLOCK > > > Tried the following playbook and it just deleted the last wrapper > > Playb

[ansible-project] Re: Questions: variables and includes

2017-08-31 Thread John Harmon
I think I answered my last question assuming things execute as I stated above. I just include the common.yml at the bottom of the main.yml and it will be executed after true|false.yml Correct me if I am wrong. -- You received this message because you are subscribed to the Google Groups

[ansible-project] Re: winrm send_input failed

2017-08-31 Thread '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 'J Hawkesworth' via Ansible Project
What are you trying that produces the access denied message? On Thursday, August 31, 2017 at 11:20:25 AM UTC+1, Thijn Bukkems wrote: > > Thanks guys, I changed to fqdn shortly after that original post. Strangely > enough now only getting access denied with 1 machine even though the winrm > set

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

2017-08-31 Thread '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: powershell version upgrade on windows server 2008 R2

2017-08-31 Thread Jordan Borean
The example you gave to install .net 4.5 is an MSU file that is installed with Windows update. There is no easy way to install update files but I've been able to install .net 4.5 using the offline installer that is packages as an exe. The link for it is here https://www.microsoft.com/en-au/down

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

2017-08-31 Thread Jordan Borean
There is an IIS extension that can be used when IIS is intercepting the WinRM traffice https://technet.microsoft.com/en-us/library/dd759166(v=ws.11).aspx. I've never had to deal with this situation before so can't help much further sorry. -- You received this message because you are subscribe

[ansible-project] Re: How to install Window packages that install into the user's home profile

2017-08-31 Thread Jordan Borean
That installer sounds like the way to go. The latest devel branch has made some changes with become so it works with NTLM and Kerberos authentication but going that route probably isn't recommended as you would need to know the credentials for all the accounts you want to install slack on. --

[ansible-project] InsecureRequestWarning: Unverified HTTPS

2017-08-31 Thread barfingcat11
Despite setting cert validation as ignore and false, I still get the warning message. Any ideas? thanks Windows OS: Windows10 64bit 1703 Linux Controller: RHEL 7.4 # group_vars/windows.yml ansible_user: Administrator ansible_password: ansible_connection: winrm ansible_winrm_server_cer

[ansible-project] Need Python API 2.0 fully explained documents

2017-08-31 Thread Manish Chaturvedi
Hi Team, I am new for Ansible. I don't want to execute YAML file. My requirement is to implement all necessary ansible keywods(like hosts,vars,tasks) in my python scripts to install any software on remote server. Regards, Manish -- You received this message because you are subscribed to the G

Re: [ansible-project] Simple ansible script Error

2017-08-31 Thread Konrad Kosewski
Thank You very much, but i still have problems with my first project: - hosts: "{{ variable_hosts | default('all') }}" remote_user: ansible become: yes tasks: - include_vars: users.yml - name: Make sure we have a group existing group: name: "{{item.groupname}}"