Re: [ansible-project] Error with jinja2 templating for a conditional

2018-09-18 Thread Matt Martz
You cannot use a variable as the name of the var to be registered. It must
be an explicit static string.

See the following info on the structure of registered data when using a
loop:

https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#using-register-with-a-loop


On Tue, Sep 18, 2018 at 4:59 PM Chris  wrote:

> Hello,
>
> Will someone please help me understand why this is not work?
>
> Thanks!
>
> ---
> - hosts: all
>   become: yes
>   become_method: sudo
>   become_user: root
>
>   vars:
>
> stat_files:
>   - name: stat_var
> stat_path: "/etc/resolv.conf"
>
>   tasks:
> - name: "Verify file copy destination"
>   stat:
> path: "{{ item.stat_path }}"
>   register: "{{ item.name }}"
>   with_items:
> - "{{ stat_files }}"
> - debug:
> var: "Found it!"
>   when: stat_var.stat.exists
>
>
> 
>
>
> k: [hostname] => (item={u'stat_path': u'/etc/resolv.conf', u'name':
> u'stat_var'}) => {
> "changed": false,
> "item": {
> "name": "stat_var",
> "stat_path": "/etc/resolv.conf"
> },
> "stat": {
> "atime": 1537249786.7223341,
> "attr_flags": "",
> "attributes": [],
> "block_size": 4096,
> "blocks": 8,
> "charset": "us-ascii",
> "checksum": "2f01daec7b7a510f0b791c94ee345845f211be18",
> "ctime": 1536990466.4755569,
> "dev": 64768,
> "device_type": 0,
> "executable": false,
> "exists": true,
>
>
> 
>
> MSG:
>
> The conditional check 'stat_var.stat.exists' failed. The error was: error
> while evaluating conditional (stat_var.stat.exists): 'stat_var' is undefined
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/42e82cf6-54e1-41c2-9743-4fa493149bee%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Matt Martz
@sivel
sivel.net

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v8KHKThMg1PfkB9%3D6t6EZQ5MdzA0nrOePbyQYzh-JqyrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Error with jinja2 templating for a conditional

2018-09-18 Thread Chris
Hello,

Will someone please help me understand why this is not work?

Thanks!

---
- hosts: all
  become: yes
  become_method: sudo
  become_user: root

  vars:

stat_files:
  - name: stat_var
stat_path: "/etc/resolv.conf"

  tasks:
- name: "Verify file copy destination"
  stat:
path: "{{ item.stat_path }}"
  register: "{{ item.name }}"
  with_items:
- "{{ stat_files }}"
- debug:
var: "Found it!"
  when: stat_var.stat.exists




k: [hostname] => (item={u'stat_path': u'/etc/resolv.conf', u'name': 
u'stat_var'}) => {
"changed": false,
"item": {
"name": "stat_var",
"stat_path": "/etc/resolv.conf"
},
"stat": {
"atime": 1537249786.7223341,
"attr_flags": "",
"attributes": [],
"block_size": 4096,
"blocks": 8,
"charset": "us-ascii",
"checksum": "2f01daec7b7a510f0b791c94ee345845f211be18",
"ctime": 1536990466.4755569,
"dev": 64768,
"device_type": 0,
"executable": false,
"exists": true,



MSG:

The conditional check 'stat_var.stat.exists' failed. The error was: error 
while evaluating conditional (stat_var.stat.exists): 'stat_var' is undefined

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/42e82cf6-54e1-41c2-9743-4fa493149bee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible Jinja Template Comparison

2018-09-18 Thread Krishna N
Hi Jason,
Thanks for replying. That's definitely another way of doing it. However,
this is what I am trying.

1. Get the ntp server config from "sh run".
2. Store that to a list
3. Jinja template generates the required config. I am passing the
ntp_server IPs via -e (extra variables).
4. Add the config from 3, compare 3 and 4 and remove the rest.

# tasks file for ansible-ios-ntp
---
- name: Current Edge servers before
ios_command:
commands:
- sh run | include ntp server
register: runconfser

- debug:
var: runconfser

# NTP SECTION - START

- name: Set NTP servers
ios_config:
src: ntprequired.j2
notify: Save Config

- name: Remove the rest NTP Servers
with_items: "{{ runconfser.stdout_lines[0] }}"
when: (item not in {src: 'ntprequired.j2'} and (item!=""))
ios_config:
lines:
- "no {{ item }}"




On Tue, Sep 18, 2018 at 3:22 AM Jonathon Woods  wrote:

> I’m not sure how to make it work how you have laid out. But I would do the
> check in the jinja template anyway. Get your current ntp lines. In the
> jinja template run.
>
> {% for ntp_server in ntp_config_get %}
> {% if ntp_line not in ntp_servers %}
> no ntp server {{ ntp_server }}
> {% ending %}
> {% for ntp_srv in ntp_servers %}
> ntp server {{ ntp_srv }}
> {% endfor %}
>
> If you got the whole line of current ntp servers, you’ll have to parse the
> ips with regex, I’m certain I’ve done something very similar to this
> before. Let me know if you still have issues after trying this.
>
>
>
> On Mon, Sep 17, 2018 at 5:40 PM Krishna N  wrote:
>
>> Greetings!
>>
>> How to compare when items are not in jinja template loop?
>>
>> with_items: "{{ runconfser.stdout_lines[0] }}"
>> when: (item not in {src: 'ntprequired.j2'} and (item!=""))
>> ios_config:
>>   lines:
>> - "no {{ item }}"
>>
>> I am using roles.
>>
>> */templates/ntprequired.j2*:
>>
>> {% for ntp_srv in ntp_servers %}
>> ntp server {{ ntp_srv }}
>> {% endfor %}
>>
>>
>> --
>> 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...@googlegroups.com.
>> To post to this group, send email to ansible-project@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/1d64f07a-6be8-483f-8dd7-343ea7ab73dd%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Jonathon Woods
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/7kKzc8j7cks/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAB1Ty_fgx1XtbOC3KU636AsPYcWTdGK4jbfatp8gj_dwJHhzCg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJQ1BoZna2fKirk8_nJWH5AA4-Xw1%2BEQUiwvbYqvWNY61pHFKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] VNC server not running correctly with Ansible

2018-09-18 Thread swinickitom
When I start a VNC server instance with an Ansible script, the instance of 
the vncserver just a blank (all black) screen. It shouldn't be an issue 
with vnc server as I can ssh into the server and start a vnc session myself 
and it works fine. Any suggestions?

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8f92569e-4ff9-4d17-b358-e0387caef69e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] for getting the prompts in between of 2 tasks in a single playbook.

2018-09-18 Thread Brian Coca
The pause module allows you to do this.
https://docs.ansible.com/ansible/latest/modules/pause_module.html



-- 
--
Brian Coca

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7fr%2BsubPz8nh4%3DnNM3M7zkNMFcxAdkNKCwCgrzjFuNU0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] run_once + delegate_to: localhost + conditional

2018-09-18 Thread Brian Coca
The issue is that you are making the test on the 'current' host, but
that is not mandated, you can use the data from any/all the hosts and
use a 'select' filter to create a list of hosts that pass that test ..
so if  select(,,,)|length > 1 you have an 'any' host matching
condition.




-- 
--
Brian Coca

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7f2sNzdJKRfGVxifZYwC8BcLHXZNg9o0oFKMSLcGEcpug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] edit aix stanza files

2018-09-18 Thread christian . tremel
hmm...tried out lineinfile, replace and template but was not successfull? 
any other creative ideas? i looked at the ini_file module source, and it 
seems this is very similar to the aix stanza format. unfortunately i am at 
war with regex, and this particular code is full of it. 

On Wednesday, August 22, 2018 at 3:06:56 PM UTC+2, Jonathan Lozada De La 
Matta wrote:
>
> you can try lineinfile or use j2 templates
>
> On Wed, Aug 22, 2018 at 6:29 AM > wrote:
>
>> hi all,
>>
>> any way to edit so called "stanza files" in aix? i read about the 
>> blockinfile module but this seems not to be the best way to do it, since it 
>> depends on markers which will break aix configs.
>>
>> example of such stanza files:
>>
>> srvproxy:
>> admin = false
>> umask = 2
>> login = false
>> rlogin = false
>>
>> usw:
>> shells = /bin/sh,/bin/bsh,/bin/csh,/bin/ksh,/bin/tsh,/bin/ksh93,
>> /usr/bin/sh,/usr/bin/bsh,/usr/bin/csh,/usr/bin/ksh,/usr/bin/tsh,/usr/bin/
>> ksh93,/usr/bin/rksh,/usr/bin/rksh93,/usr/sbin/uucp/uucico,/usr/sbin/
>> sliplogin,/usr/sbin/snappd,/bin/false,/usr/bin/bash
>> maxlogins = 32767
>> logintimeout = 60
>> auth_type = STD_AUTH
>> pwd_algorithm = sshaitsv
>>
>>
>> for example i want to adress the "srcproxy:" and add or delete 
>> "pwd_algorithm 
>> = sshaitsv", or add new items "somestanza:". any ideas?
>>
>> wbr 
>>
>> chris
>>
>> -- 
>> 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-proje...@googlegroups.com .
>> To post to this group, send email to ansible...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/ec00d38a-4549-40df-bced-b0c6239fac4f%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>
> Jonathan lozada de la matta
>
> AUTOMATION CONSULTANT - AUTOMATION PRACTICE
>
> Red Hat Consulting Services 
>
> jloz...@redhat.com 
>
>
>  
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e5e53092-8088-4e3e-a330-9df11013c4d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] s3_ modules for DELL EMC ECS

2018-09-18 Thread Allen Sanabria
Have you tried passing the *s3_url*: 

On Tue, Sep 18, 2018 at 9:51 AM, Martyn Kempster 
wrote:

> Is it possible to use any of the s3_ and ecs_ modules for EMC ECS? ECS
> uses the standard s3 API and has the same parameters such as AWS Secret
> Keys and Access Keys.
>
> I've tried using the s3_bucket module but I get 'Couldn't connect to AWS:
> Invalid endpoint:' when trying to point to my ECS instance.
>
> Does anyone have any knowledge on using Ansible to manage EMC ECS?
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/51eee42b-c82e-4a6d-9ef2-5545264a3d34%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAH2deCY5SozmNuD1e3t_eR77fq1%3DLkTCkx5RR%2BP_53jSbWna%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] s3_ modules for DELL EMC ECS

2018-09-18 Thread Martyn Kempster
Is it possible to use any of the s3_ and ecs_ modules for EMC ECS? ECS uses 
the standard s3 API and has the same parameters such as AWS Secret Keys and 
Access Keys.

I've tried using the s3_bucket module but I get 'Couldn't connect to AWS: 
Invalid endpoint:' when trying to point to my ECS instance.

Does anyone have any knowledge on using Ansible to manage EMC ECS?

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/51eee42b-c82e-4a6d-9ef2-5545264a3d34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Connection plugin with user configuration coming from a variable

2018-09-18 Thread Brian Coca
I'm not sure if i'm understanding correctly, in any case, any plugin
can use the built in configuration, it does not only apply to shipped
Ansible plugins.
https://docs.ansible.com/ansible/devel/dev_guide/developing_plugins.html#plugin-configuration-documentation-standards

Currently, connection plugins are only given the data they require, so
unless you declare the variable via the configuration system, you
won't get the variable.




-- 
--
Brian Coca

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7cj9_5M3_hVzLrE7wEW9jcviqFfBrVL6AmL%2BH4F9anFfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible Jinja Template Comparison

2018-09-18 Thread Jonathon Woods
I’m not sure how to make it work how you have laid out. But I would do the
check in the jinja template anyway. Get your current ntp lines. In the
jinja template run.

{% for ntp_server in ntp_config_get %}
{% if ntp_line not in ntp_servers %}
no ntp server {{ ntp_server }}
{% ending %}
{% for ntp_srv in ntp_servers %}
ntp server {{ ntp_srv }}
{% endfor %}

If you got the whole line of current ntp servers, you’ll have to parse the
ips with regex, I’m certain I’ve done something very similar to this
before. Let me know if you still have issues after trying this.



On Mon, Sep 17, 2018 at 5:40 PM Krishna N  wrote:

> Greetings!
>
> How to compare when items are not in jinja template loop?
>
> with_items: "{{ runconfser.stdout_lines[0] }}"
> when: (item not in {src: 'ntprequired.j2'} and (item!=""))
> ios_config:
>   lines:
> - "no {{ item }}"
>
> I am using roles.
>
> */templates/ntprequired.j2*:
>
> {% for ntp_srv in ntp_servers %}
> ntp server {{ ntp_srv }}
> {% endfor %}
>
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1d64f07a-6be8-483f-8dd7-343ea7ab73dd%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Jonathon Woods

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAB1Ty_fgx1XtbOC3KU636AsPYcWTdGK4jbfatp8gj_dwJHhzCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Unable to create alb with Ansible

2018-09-18 Thread Subrat Mahapatra
Hi There,

I am able to get the list of subnets for a VPC ID or tag name with the help 
of set_fact.
While using the subnets (Subnet Output of set_fact) to create an ALB I am 
getting error as "load balancer cannot be attached to multiple subnets in 
the same availability zone"

Here is the playbook

   - name: Getting facts about subnet and VPC from an Instance with Tags
ec2_instance_facts:
  filters:
"tag:Name": AWX
  region: eu-west-1
register: output

  - name: displaying output
debug: var=output.instances.0.vpc_id

  - name: Querying subnets from the vpc id
ec2_vpc_subnet_facts:
  filters:
vpc-id: "{{ output.instances.0.vpc_id }}"
  region: eu-west-1
register: subnetoutput

  - name : displaying subnet zone
set_fact:
  subnetzone: "{{ subnetoutput.subnets | 
map(attribute='availability_zone') | list }}"
register: subnetzoneout

  - name: displaying subnet id
set_fact:
  subnetid: "{{ subnetoutput.subnets | map(attribute='subnet_id') | 
list }}"
register: subnetidout

  - name: displaying subnetoutput
set_fact:
  hostlist: "{{ subnetoutput.subnets | 
map(attribute='availability_zone') | list }}"
register: subout

 - name: Creating Target Group
elb_target_group:
  region: eu-west-1
  name: DemoTargetGroup
  protocol: https
  port: 443
  vpc_id: "{{ output.instances.0.vpc_id }}"
  health_check_path: /
  successful_response_codes: "{{response_codes}}"
  state: present
register: tgoutput

  - name: Creating ALB
elb_application_lb:
  name: DemoALB-new
  region: eu-west-1
  security_groups:
 - sg-02a1426d

  scheme: internet-facing
  #zones: "{{ subout.ansible_facts.hostlist }}"
  subnets: "{{ subnetidout.ansible_facts.subnetid }}"
   # - "{{ subnetidout.ansible_facts.subnetid.0 }}"
   # - "{{ subnetidout.ansible_facts.subnetid.1 }}"


Red marked not working but green  working, I want to set the subnet-ID as 
dynamic not static 

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/da1aa0d5-4d30-49b6-a80e-592aa0064085%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Connection plugin with user configuration coming from a variable

2018-09-18 Thread Peter Horvath
Based on my understanding, options are done at the Ansible level, e.g. 
parameters for the default ssh transport are configured in the Playbook 
context [1], so I do not think I could just add further configuration 
options (say "foobar") for my own transport, because apparently those 
things come from the Ansible runtime. That's why I tried using a variable. 
If this is not correct, please explain in a bit more details how/where 
should I add the option registrations.

I am wondering if it would be possible to follow the same approach as used 
in set_fact [2] task (where variables should be usable in the expressions). 
Based on what I see, I believe I would need to get access to the "templar" 
used within my connection plugin: would that be possible somehow?

Thanks,
Peter


[1] 
https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/play_context.py
[2] 
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/set_fact.py

2018. szeptember 17., hétfő 21:41:48 UTC+2 időpontban Brian Coca a 
következőt írta:
>
> A variable is a variable, by the time the plugin gets it the origin is 
> not discernible. So using the current pulgin config system you just 
> need to either add an option that uses that variable as a config 
> source or if you are using it for an existing option, add it there. 
>
>
> myoption: 
>  description: ... 
>  vars: 
>   - name: myvariable 
>
>
>
> -- 
> -- 
> Brian Coca 
>

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/eb62c80a-b63c-45b0-848b-f48dc89863e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Not able to connect windows server due to the Error "module_stderr": "An error occurred while creating the pipeline.\r\n"," while trying with win_ping

2018-09-18 Thread Usha Rani
Hi Jordan,

Executed with -v..please check the below output:

$ ansible win_prod -i /tmp/winhosts.yml -m win_ping -k -v
 [WARNING] Ansible is in a world writable directory (/tmp), ignoring it as 
an ansible.cfg source.
ansible 2.6.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/uyerra/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.4 (default, Jul 10 2018, 11:29:28) [GCC 4.4.7 
20120313 (Red Hat 4.4.7-16)]
Using /etc/ansible/ansible.cfg as config file
SSH password:
setting up inventory plugins
Parsed /tmp/winhosts.yml inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from 
/usr/local/lib/python3.6/site-packages/ansible/plugins/callback/minimal.py
Loading callback plugin profile_tasks of type aggregate, v2.0 from 
/usr/local/lib/python3.6/site-packages/ansible/plugins/callback/profile_tasks.py
META: ran handlers
Tuesday 18 September 2018  09:50:30 +0200 (0:00:00.053)   0:00:00.053 
*
Using module file 
/usr/local/lib/python3.6/site-packages/ansible/modules/windows/win_ping.ps1
 ESTABLISH WINRM CONNECTION FOR USER: u...@xxx.com on PORT 
5986 TO abcd.xxx.com
checking if winrm_host abcd.xxx.com is an IPv6 address
 WINRM CONNECT: transport=ntlm 
endpoint=https://abcd.xxx.com:5986/wsman
 WINRM OPEN SHELL: 6C0BD575-66ED-4E41-A232-740078229E47
EXEC (via pipeline wrapper)
 WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', 
'-ExecutionPolicy', 'Unrestricted', '-']
 WINRM RESULT ''
 WINRM CLOSE SHELL: 6C0BD575-66ED-4E41-A232-740078229E47
abcd.xxx.com | FAILED! => {
"changed": false,
"module_stderr": "An error occurred while creating the pipeline.\r\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 1
}
Tuesday 18 September 2018  09:50:32 +0200 (0:00:01.632)   0:00:01.685 
*
===
win_ping 

On Tuesday, September 18, 2018 at 2:01:54 AM UTC+5:30, Jordan Borean wrote:
>
> Can you run with `-v` as that will show more info on the connection 
> process that can help identify your issue.
>

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/942b2aac-f8f2-4445-9bcb-d3e29a877098%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Help need with regards to Netscaler playbook

2018-09-18 Thread Balaji
Hello All,

Do anyone know how to disable just a service group on netscaler using 
playbook.

Thanks,

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9310a97f-6ba3-4265-b254-d65fe3ed1702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Trying Oracle database download to windows server 2012

2018-09-18 Thread Isha G
Can you please paste the task that you used?

On Tue, Sep 18, 2018 at 2:07 AM Jordan Borean  wrote:

> You can store the download on your own web server and use win_get_url from
> there. The trouble isn't that Ansible is failing but that Oracle is hiding
> the actual download behind a license agreement. I've had success with
> adding the cookie value to the win_get_url header so Oracle presents you
> the actual installer rather than just a web page.
>
> Thanks
>
> Jordan
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/fbb54773-f7ad-43ef-8a78-b28f8e8b1bc6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKvY8Fv1S-Dh6Npzbuc0upFq892BZ_otF6FwfhGspBAaJUFkHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.