[ansible-project] Re: WINRM CONNECTION ERROR: the specified credentials were rejected by the server

2018-10-11 Thread Jordan Borean
There are numerous scenarios that can cause an authentication problem, such as; - The credentials you are using are actually incorrect, or you haven't specified the password in Ansible correctly - The account is disabled or locked on the Windows host - If using Basic auth (you are),

[ansible-project] Re: Using ansible on Windows through ssh

2018-10-11 Thread Jordan Borean
It's still an ongoing plan but nothing concrete has come out of it yet. TBH the only benefits I see with SSH over WInRM is; - Faster file transfers - Simpler authentication with private keys The Win32-OpenSSH port is still a bit buggy so I wouldn't trust it in an environment setup right

[ansible-project] Re: Specifying WIndows systems in a mixed host environment

2018-10-11 Thread Jordan Borean
Easiest way is to create a Windows group, define the connection plugin in that group, and finally add your Windows hosts as children of that group; [windows:children] server01 server03 branch02 [windows:vars] ansible_connection=winrm You can add some more values to configure WinRM if you

Re: [ansible-project] Re: Getting error when trying to install IIS on Windows server.

2018-10-11 Thread Wouter Hummelink
Look at the add_host module to add freshly created hosts to your inventory Op vr 12 okt. 2018 06:13 schreef ameya agashe : > Ok, Got through that hurdle now next! > > Please find below update file > > - name: Create Azure VM > hosts: localhost > connection: local > tasks: > - name:

[ansible-project] Re: Getting error when trying to install IIS on Windows server.

2018-10-11 Thread ameya agashe
Ok, Got through that hurdle now next! Please find below update file - name: Create Azure VM hosts: localhost connection: local tasks: - name: Create resource group azure_rm_resourcegroup: name: rg_networking location: australiasoutheast - name: Create virtual network

[ansible-project] Getting error when trying to install IIS on Windows server.

2018-10-11 Thread ameya agashe
Hi All, I need your assistance to resolve this issue. Error details when I run in -vvv option: Using module file /opt/ansible/local/lib/python2.7/site-packages/ansible/modules/windows/win_feature.py <127.0.0.1> PUT /home/ameya/.ansible/tmp/ansible-local-1269sNJo2N/tmpn6Pzqa TO

[ansible-project] Specifying WIndows systems in a mixed host environment

2018-10-11 Thread Hunter Tom
Hello All: Please help! Problem - I have a hosts file separated out with different branches of an organization as such: [branch01] server01 server02 server03 [branch02] server04 server05 etc The problem is that if server01 and server05 are windows, how do I specify to use WinRM? I've

[ansible-project] Re: with_subelements works where loop with subelements filter fails

2018-10-11 Thread Guy Knights
Also of note: firewall6.rules doesn't exist on any of the hosts I'm running this playbook against, so it should be skipping the entire block, but it's not. On Thursday, 11 October 2018 14:14:15 UTC-7, Guy Knights wrote: > > I have the following tasks in a block, which I've modified to use the

[ansible-project] with_subelements works where loop with subelements filter fails

2018-10-11 Thread Guy Knights
I have the following tasks in a block, which I've modified to use the new 'loop' structure: - name: process ipv6 rules if they exist block: - name: create all ipv6 firewall log statements from 'firewall' variable iptables: ip_version: ipv6 comment: "{{

[ansible-project] Trying to copy script from local to remote and run

2018-10-11 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, me again! So I've got this playbook that *should* run fine but it dies at trying to copy. Now I don't know if it's because it can't find it locally having the problem copying it remotely. Here it is: cat check_for_reboot.yml --- - name: Check for reboot hosts: testserver become:

Re: [ansible-project] Re: Want to access the server information from CSV file.

2018-10-11 Thread Shyam U
Hi Bill, Thank you so much for your help. I looking for this. Thank you. On Thu, Oct 11, 2018 at 11:37 AM bill paxton < epican.ansible.mail.l...@gmail.com> wrote: > create these files, see if this gives you the idea... > > serverlist.yml -> https://pastebin.com/eFdCbP6y > serverlist.csv ->

Re: [ansible-project] Ansible nested dictionary seems to do weird stuff with identical sub-groups

2018-10-11 Thread Brian Coca
Those are not 'sub-groups' they are the same group. you are giving them a parent/child relationship but all groups are 'global' so the same name refers to the same group. Only one 'on-premise' group exists, it is a chidl of france AND germany, any hosts you assign to it at any point are always

Re: [ansible-project] Re: Want to access the server information from CSV file.

2018-10-11 Thread bill paxton
create these files, see if this gives you the idea... serverlist.yml -> https://pastebin.com/eFdCbP6y serverlist.csv -> https://pastebin.com/4JTtr2vv then play with using "when" to control task execution, like: - name: dump my_server debug: var=my_server when: my_server ==

Re: [ansible-project] Re: host-specific ansible.cfg?

2018-10-11 Thread bill paxton
> > Apologies, I guess I was confusing this with be able to control this as > shown here > https://docs.ansible.com/ansible/2.5/network/user_guide/network_best_practices_2.5.html. > > I had just assume since the 'user' can be specified per group, then the > ability control to 'ask_pass' per

Re: [ansible-project] Re: host-specific ansible.cfg?

2018-10-11 Thread Brian Coca
For settings that are 'host specific' you'll find there are existing variables that can be used, as for 'ask password' those are 'global' so they cannot be host specific. Passwords are prompted for BEFORE any host data is looked at and only once per run, not per host contacted. -- --

Re: [ansible-project] Re: Want to access the server information from CSV file.

2018-10-11 Thread Shyam U
Hi Bill, Thanks for your information. I will check it. I have tried the following, - name: msg="Match 'Li' on the first column, but return the 3rd column (columns start counting after the match)" debug: msg="The atomic mass of Lithium is {{ lookup('csvfile', 'Li file=elements.csv delimiter=,

[ansible-project] Re: host-specific ansible.cfg?

2018-10-11 Thread eric.b.hymowitz via Ansible Project
Yes, I am aware of all that. I left all of that out for the sake of brevity. However, as far as I can tell, my problem is not with variables, it is with configuration settings. If there is a variable to accomplish my task, I cannot find it. -- You received this message because you

[ansible-project] Re: host-specific ansible.cfg?

2018-10-11 Thread bill paxton
in your inventory, make sure the hosts are in the group "sudohosts" if you want any variables in the group_vars/sudohosts/ directory to be picked up. all:vars] ansible_connection=local another_var_all_servers_get=some_value [sudohosts] server1 server2 Here "sudohosts" is a subdirectory of

[ansible-project] host-specific ansible.cfg?

2018-10-11 Thread eric.b.hymowitz via Ansible Project
Greetings. Short question -- Where/how can I set configuration settings (not variables) based on the target host? Long question -- My standard ansible.cfg includes: [privilege_escalation] #become=True #become_method=sudo #become_user=root #become_ask_pass=False And these settings are good

[ansible-project] Re: Want to access the server information from CSV file.

2018-10-11 Thread bill paxton
https://github.com/joelwking/ansible-nxapi I've used the csv_to_facts for pulling in facts for network devices. works really well. Just place csv_to_facts.py in the library/ folder then: - name: import csv {{ glob_item }} csv_to_facts: src: "{{ glob_item }}" table:

[ansible-project] Using ansible on Windows through ssh

2018-10-11 Thread aaldi
I've noticed some posts from a year ago (here , and here ) about using OpenSSH on windows and avoiding WinRM. Are there any updates to this? Has this been implemented yet? -- You received this

Re: [ansible-project] How to filter data from ansible json format output for a specific element

2018-10-11 Thread abhijith . devaraju
That worked. Looks like the syntax is same as python. Thanks a lot Kai Stian Olstad for your quick response. > On Oct 11, 2018, at 02:34, Kai Stian Olstad > wrote: > >> On 11.10.2018 11:18, abhijith.devar...@gmail.com wrote: >> register: login >>- debug: >>msg: "{{

Re: [ansible-project] How to filter data from ansible json format output for a specific element

2018-10-11 Thread Kai Stian Olstad
On 11.10.2018 11:18, abhijith.devar...@gmail.com wrote: register: login - debug: msg: "{{ login.set_cookie }}" login--- This is the register name which I am using to register the api call response in step1. *Current Output for debug task:* TASK [debug]

[ansible-project] Re: Ansible 2.7 - changes to python library look-up ?

2018-10-11 Thread Andy Eff
Hey there, The exact upgrade path that I found worked was (and this is on a CentOS 7 box, but might be v similar for an Ubuntu) cd ~awx/venv/ansible . bin/activate pip install --upgrade --force-reinstall ansible[azure] First, I activate the virtualenv that Ansible Tower uses when it fires

[ansible-project] How to filter data from ansible json format output for a specific element

2018-10-11 Thread abhijith . devaraju
Hello All, I am using API call to fetch some data in json format. I would like to use/filter only part of data for my further tasks. Can someone help me out in filtering the json format for the element ? *API call response data in JSON format:* {"changed": false, "connection": "close",

[ansible-project] Ansible nested dictionary seems to do weird stuff with identical sub-groups

2018-10-11 Thread I Viridis
# inventory.yml europe: children: germany: children: on-premise: hosts: 127.0.0.1: datacenter: hosts: 127.0.0.2: france: children: on-premise: hosts: