Re: [ansible-project] fatal: [XXXX]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell.

2017-08-18 Thread Sunil6057
hi Sorry Error and play-book is as below --- - hosts: testleafs gather_facts: no connection: local tasks: - set_fact: provider: host: "{{ inventory_hostname }}" username: sg0219622 password: Sunven!2 - name: RUN ' SHOW VERSION '

Re: [ansible-project] Syntax Issues for When Conditional

2017-08-18 Thread Mark Huang
That did the trick! Thank you! On Friday, August 18, 2017 at 3:03:23 PM UTC-5, Kai Stian Olstad wrote: > > On 17. aug. 2017 17:18, Mark Huang wrote: > > What is the proper syntax for trying to do something like this? It works > > fine but it gives me a warning that says not to use templating

[ansible-project] vmware_guest - Nested datacenter issue

2017-08-18 Thread BG Sony
Hello. I am unable to deploy from template when the datacenter is inside a folder. I am getting the error "msg": "No folder matched the path: /Chicago Data Center/datacenter1/app" i.e. /Folder/datacenter/folder /Chicago Data Center/datacenter1/app The path to the app folder via govc looks

Re: [ansible-project] How to call roles & specify tags for those roles

2017-08-18 Thread Kai Stian Olstad
On 17. aug. 2017 03:17, Anfield wrote: Trying to run an example from the ansible docs, and it seems to always run both the tagged portions of the playbook... Am I missing how calling a role with tags is supposed to be used? Ansible docs -

Re: [ansible-project] how to retain stdout formatting when using adhoc commands (shell module)

2017-08-18 Thread Kai Stian Olstad
On 17. aug. 2017 20:32, je...@redhat.com wrote: Hey -- when running adhoc commands (using shell module), the stdout returned from target systems is stripped of formatting. Is there a standard way to retain the formatting? What formatting are you missing? I get this: $ ansible localhost -a

Re: [ansible-project] Syntax Issues for When Conditional

2017-08-18 Thread Kai Stian Olstad
On 17. aug. 2017 17:18, Mark Huang wrote: What is the proper syntax for trying to do something like this? It works fine but it gives me a warning that says not to use templating delimiters. when: "{{ customer }}.aws_cloud_formation_state == 'present'" I have tried just doing when:

Re: [ansible-project] jenkins_configure_proxy role missing in Ansible

2017-08-18 Thread Kai Stian Olstad
On 17. aug. 2017 14:52, Maciej Gawinecki wrote: I have Ansible 2.4.0. I am trying to configure Jenkins proxy based on [Ansible Jenkins DevOps Roles documentation][1]: ERROR! role definitions must contain a role name The error appears to have been in

Re: [ansible-project] why handers sub topic is not indented same like tasks or vars

2017-08-18 Thread Kai Stian Olstad
On 16. aug. 2017 20:03, Sameer Modak wrote: How understand and practice correct way of yml or indentation, so confusing - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version > here no extra spaces

Re: [ansible-project] Re: Use variables from host_vars and if not existent fall back to role vars

2017-08-18 Thread Kai Stian Olstad
On 16. aug. 2017 11:22, Frieder Heugel wrote: Hi guys Sorry to spam the mailing list. It seems that my previous assumption was wrong and I can indeed use python in defaults. If I understand it correctly the issue was that when I have a hierarchical variable in defaults that gets overwritten by

Re: [ansible-project] fatal: [XXXX]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell.

2017-08-18 Thread Kai Stian Olstad
On 16. aug. 2017 04:24, Sunil6057 wrote: i tried --- - hosts: testleafs gather_facts: no connection: local tasks: - name: return show commands output nxos_command: commands: - show version - show running-config host: "{{

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

2017-08-18 Thread Amitha K T
Thank you for a quick reply! We don't have access to tower as of now. So we will have to choose between flansible and Jenkins. 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 >

Re: [ansible-project] why debug is considered as task and needs - while other can run under single -name

2017-08-18 Thread Dick Visser
'debug' isn't considered a task, it actually IS one. So you'd have to indent it as such. It's not some property or a parameter of another task, it's a real task on its own. Dick On Fri, 18 Aug 2017 at 17:28, Sameer Modak wrote: > When i execute below code it does

Re: [ansible-project] suggest me the steps for clearing the hadoop YARN Cache using Ansible

2017-08-18 Thread bibhu patnaik
Thank you so much Dick Thanks and Regards Bibhu On Friday, August 18, 2017 at 4:38:09 AM UTC+5:30, Dick Visser wrote: > > Hi > > Suggestion is to use the service module for step 1 and 4. Find the > documentation here: > http://docs.ansible.com/ansible/latest/service_module.html Other steps >

[ansible-project] why debug is considered as task and needs - while other can run under single -name

2017-08-18 Thread Sameer Modak
When i execute below code it does not run it give error. hosts: all tasks: - name: "show version" setup: filter="*version" - name: "status of service" shell: "/usr/sbin/service auditd status" - name: "register demo" shell: cat /etc/redhat-release register: release

[ansible-project] Re: disable unnecessary output on ansible server console

2017-08-18 Thread Sameer Modak
No its all commented [root@hackerdev 6.2]# grep callback /etc/ansible/ansible.cfg # change the default callback #stdout_callback = skippy # enable additional callbacks #callback_whitelist = timer, mail #callback_plugins = /usr/share/ansible/plugins/callback # by default callbacks are not

[ansible-project] Re: How to call roles & specify tags for those roles

2017-08-18 Thread Anfield
If I remove the tag from the role and leave it on the task, then it will run both tasks? Both tasks are tagged -- 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

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

2017-08-18 Thread Mike Klebolt
Hi Aleksander, Try adding no_proxy= to your ~/.bashrc and reload it. If you will be working with many windows servers in the future, a more permanent solution that worked for me is the following... 1. Locate transport.py that comes with pywinrm 2. modify the following line session.trust_env

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

2017-08-18 Thread Mike Klebolt
I could be wrong here but I believe this is related to variable precedence. Ansible thinks that it has to use winrm to connect to the localhost since extra vars always wins. Try moving all of the connection details to either host_vars/10.x.x.x or group_vars/windows.yml.

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

2017-08-18 Thread Aleksander Lipka
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# echo $https_proxy https://161.90.234.10:8080 W dniu piątek, 18 sierpnia 2017 15:29:19 UTC+2 użytkownik J Hawkesworth napisał:

Re: [ansible-project] Examples of Ansible automated supporting and remediation

2017-08-18 Thread Dick Visser
That's a very broad question. Can you be more specific? On 16 August 2017 at 21:30, Connor Pinkney wrote: > Hello, > > Is there any examples of Ansible being used for automated supporting and > remediation > > Thank you. > > -- > You received this message because you are

[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: 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

[ansible-project] Trigger ansible through powershell

2017-08-18 Thread Amitha K T
Hello, I'm trying to find a way to trigger an ansible playbook for a windows machine using an external system or script, for example, powershell or python. Is this possible? Can anyone tell me the list of ways to trigger ansible externally. Kindly help. Regards Amitha K T -- You received

[ansible-project] YAML loop is giving me error: unable to open shell // NX_OS and IOS modules

2017-08-18 Thread erotski
Hi there, I am building a virtual lab to test Ansible network modules against, Cisco Nexus and IOS devices. I am running ansible with version 2.3.2 on Ubuntu server 16.04.3 root@ubuntu:/etc/ansible# ansible --version ansible 2.3.2.0 config file = /etc/ansible/ansible.cfg configured module

[ansible-project] Re: suggest me the steps for clearing the hadoop YARN Cache using Ansible

2017-08-18 Thread Soniya panwar
Hello bibhu patnaik , you can use this Ansible playbook to execute your tasks. - name: service hadoop-mapreduce-historyserver stop service: name: hadoop-mapreduce-historyserver state: stopped - name: service hadoop-yarn-resourcemanager stop service: name:

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

2017-08-18 Thread Aleksander Lipka
I know port shouldn't be y, I just assumed in the example that it's y. Anyway I added ansible_winrm_server_cert_validation: ignore and ansible_winrm_transport: ntlm and still didn't work. However I tried the second port you mentioned: 5985 (I use 5986 as default) and the playbook stopped at

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

2017-08-18 Thread Aleksander Lipka
I know port shouldn't be y, I just assumed in the example that it's y. Anyway I added ansible_winrm_server_cert_validation: ignore and ansible_winrm_transport: ntlm and still didn't work. However I tried the second port you mentioned: 5985 (I use 5986 as default) and the playbook stopped at