Re: [ansible-project] How to make use of Ansible Tower Rest API

2017-08-27 Thread benno joy
This list is for ansible core , i think there is a seperate support channel for tower. for executing jobs this doc might help http://docs.ansible.com/ansible-tower/latest/html/towerapi/index.html for adding hosts to inventory , i think you should utilize the dynamic inventory script for vmware so

Re: [ansible-project] issues with task not working

2017-08-27 Thread benno joy
would be helpful if you could run the playbook in verbose "-vvv" and paste an output so we know what is not working and why it is not working. On Sun, Aug 27, 2017 at 10:50 AM, Frank Dias wrote: > why does this not work? > > this is my play; > - name: install PG HA > hosts: dbs6 >

Re: [ansible-project] Setting Variables Conditionally

2017-08-07 Thread benno joy
some ways to do this would be using filters (clean way) set_fact: myvar: "{{ (ansible_os_family == 'RedHat') | ternary(100,200) }}" or same thing via jinja conditionals {{ 100 if ansible_os_family == 'RedHat' else 200 }} with some 'or's {{ 100 if ansible_os_family == 'RedHat'

Re: [ansible-project] Re: Not able to ping windows machine through Ansible (winrm using credential option as CredSSP is being used)

2017-08-03 Thread benno joy
Seems like it is using https 5986 and you have specified 5985 , maybe because there is a ':' in your variable ansible_port:=5985, is this a typo ? and make sure the variables are applied to the task/play On Fri, Aug 4, 2017 at 1:02 PM, Soniya panwar wrote: > Thanks for the reply, > i applied a

Re: [ansible-project] Re: playbook fails testing connection from loadbalancer (nginix) to 2 backend webhosts (apache2)

2017-07-24 Thread benno joy
from what i see {{ item.item }} would expand to 'AnsibleWeb' when the content actually has "ip-172-31-24-83!" hence it fails. so i think the condition would be when: "'Hello, from sunny {{hostvars[item.item][ansible_hostname]}}!' not in item.content" you might need a play to collect facts from the

Re: [ansible-project] Working with hostvars across hosts of dynamic inventory

2015-08-27 Thread benno joy
can you please try hostvars['127.0.0.1'] On Thu, Aug 27, 2015 at 8:03 PM, Joseph Djomeda wrote: > Hello Benno, > > I am using ansible 1.9.2 > > Thanks > > On Thu, Aug 27, 2015 at 2:31 PM benno joy wrote: > >> just checked the code, registered vari

Re: [ansible-project] Working with hostvars across hosts of dynamic inventory

2015-08-27 Thread benno joy
just checked the code, registered variable shoudl also persist across plays.. please do let us know the verison of ansible and i can check. - Benno On Thu, Aug 27, 2015 at 7:43 PM, benno joy wrote: > Hi Joseph, > > which version of ansible are you on ? > > - Benno > > &

Re: [ansible-project] Working with hostvars across hosts of dynamic inventory

2015-08-27 Thread benno joy
gt; Best Regards, > > On Thu, Aug 27, 2015 at 10:07 AM benno joy wrote: > >> Hi, >> >> A registered variable persists only during the play, so maybe you could >> make them facts which persists across plays as below >> >> - set_fact: >> >>

Re: [ansible-project] Unable to install software on Windows with v1.9.2 or v2

2015-08-27 Thread benno joy
Hi Matt, If you create the a directory name "library" in the same level as your playbook and copy the win_choclotey.py and chocolatey.ps1 files from https://github.com/ansible/ansible-modules-extras/tree/devel/windows, the playbook run should pick up the new version of the module. - Benno On Th

Re: [ansible-project] Working with hostvars across hosts of dynamic inventory

2015-08-27 Thread benno joy
Hi, A registered variable persists only during the play, so maybe you could make them facts which persists across plays as below - set_fact: registered_var: "{{ registered_var }}" and then it shoudl be available via hostvars['localhost'] - Benno On Thu, Aug 27, 2015 at 2:36 PM, Jo

Re: [ansible-project] How to authorise an EC2 instance for S3 access

2015-06-19 Thread benno joy
All playbooks are run on my laptop >- A playbook aws-start.yml first creates the EC2 instance. It >operates on the localhost >- A playbook provision.yml then attempts to connect to the S3 bucket. >It operates on the EC2 instance > > Andrew > > On Friday, 19 J

Re: [ansible-project] How to authorise an EC2 instance for S3 access

2015-06-19 Thread benno joy
# Do not use the system installed Python when running locally >> ansible_python_interpreter: python >> >> The exact set of packages is: >> >> Jinja2==2.7.3 >> MarkupSafe==0.23 >> PyYAML==3.11 >> ansible==1.9.1 >> boto==2.38.0 >> ecdsa==0.1

Re: [ansible-project] How to authorise an EC2 instance for S3 access

2015-06-18 Thread benno joy
Hi Andrew, instance profiles do work without any issues, from the error msg: Failed to connect to S3: 'module' object has no attribute 'connect_to_region' seems like boto is not installed properly, how did you install boto ? can you please try reinstalling boto and check. - Benno On Fri, Jun 1

Re: [ansible-project] Support to AWS scheduled autoscale policy?

2015-06-18 Thread benno joy
Hi Seems like the support for scheduled scaling policy is not yet available, maybe you could raise a feature request in github - Benno On Thu, Jun 18, 2015 at 11:05 PM, Sisso wrote: > Hello guys. > > I am unable to find if ansible aws module have support to define a > scheduled scaling policy

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

2015-06-17 Thread benno joy
Hi, Did yo try using the win_copy module to copy across the package and installing it via win_msi module or your own script to install it issued via the script module. On Wed, Jun 17, 2015 at 10:23 PM, wrote: > Hi, > > I am trying to write a playbook which will install windows software(exe >

Re: [ansible-project] Remote job suspended ,How can i handle it ? Please help. thanks a lot

2015-06-16 Thread benno joy
Hi, The most usual cases would be that the remote system is prompting for some user input, are you using the yum module or yum directly in the commandline ? maybe if you are using sudo it is prompting for password or if using yum directly it is asking for confirmation if shell module is executed r

Re: [ansible-project] Unable to resolve variables from group_vars

2015-06-16 Thread benno joy
Hi, The group variables are checked in group_vars/ file so if you create a file group_vars/webservers and place your variables it should appear. same for services, - Benno On Tue, Jun 16, 2015 at 3:45 PM, Srinivas wrote: > Hello All, > > Here is my set-up. > >- development >- invent

Re: [ansible-project] Ansible Tower Deployment

2015-06-15 Thread benno joy
from the error it seems like an issue in playbook formatting, does the playbook work from commandline ? also tower related queries can be posted in support.ansible.com On Mon, Jun 15, 2015 at 12:16 PM, Raw A wrote: > Hello, > > Am using Ansible Tower and after complete installation of Ansible

Re: [ansible-project] Selecting subelements from variable

2015-06-15 Thread benno joy
can you please try " vpc_subnets | map(attribute='cidr')| list On Sun, Jun 14, 2015 at 2:42 PM, Viktor Szathmáry wrote: > Hi, > > Let's say I have a variable structure like this: > > vpc_subnets: > - cidr: *"172.22.1.0/24 "* > az: "us-east-1a" > - cidr: *"172.22.

Re: [ansible-project] help on dynamic with_dict xxxx.results[0].stat.exists == false

2015-06-11 Thread benno joy
Hi, i think this can be solved if you can make you ssl_certs a list of dicts and use with_indexed_list http://docs.ansible.com/playbooks_loops.html#id22 On Thu, Jun 11, 2015 at 3:39 PM, JohnP wrote: > Hi Group, > > I am trying to establish a logic on a creating web server self signed > certi

Re: [ansible-project] Getting a handle of ec2-instances

2015-06-10 Thread benno joy
Hi, Hope these links help. http://docs.ansible.com/guide_aws.html https://github.com/ansible/ansible-examples/blob/master/language_features/eucalyptus-ec2.yml On Wed, Jun 10, 2015 at 12:38 PM, Yasser Hussain < yasserhussain1...@gmail.com> wrote: > I have provisioned an amazon instance using

Re: [ansible-project] ansible devel can't connect with ssh

2015-06-09 Thread benno joy
Hi, The latest devel is V2 version of ansible, and it seems like a bug, would you mind raising a bug in github. - Benno On Wed, Jun 10, 2015 at 9:34 AM, Michael Legleux wrote: > I don't know how much more basic to make this. > I have an ansible-test directory structured like this: > > ansible

Re: [ansible-project] ERROR: win_file is not a legal parameter in an Ansible task or handler

2015-06-09 Thread benno joy
Hi, How did you install ansible, if it is a checkout did you --recursive to add the submodules ? seems like ansible is not able to see the modules in the modules path. On Wed, Jun 10, 2015 at 9:28 AM, Slim Slam wrote: > Running Ansible v1.9.1 under MacOSX 10.10.3 > > Trying to use Ansible to

Re: [ansible-project] Re: parameterize include question / possible bug

2015-06-09 Thread benno joy
also vars_files shouldnt have precendce over vars in an include, are you testing this in v2 ? can you please checkout the latest devel version and check. On Wed, Jun 10, 2015 at 8:45 AM, Giovanni Tirloni wrote: > I think you are missing a "- " before those includes. > > - name: blah > hosts

Re: [ansible-project] CloudFormation - how to debug where the issue is

2015-06-09 Thread benno joy
can you please try with -vvv three v's / the module does return the events returned by aws, can you check in the aws console if there were any errors in the operation . and also what version if ansible are you using, On Tue, Jun 9, 2015 at 9:58 PM, wrote: > Hi All, > > While running a playbook

Re: [ansible-project] Weird issue with ec2_eip module

2015-06-08 Thread benno joy
you have *var="{{ ec_asg_info.instances }}"* *and in with_items: ec2_asg_info shouldnt it be : e**c_asg_info* On Tue, Jun 9, 2015 at 9:08 AM, Igor Cicimov wrote: > Hi all, > > I'm creating an ASG in my playbook from which I launch the following > instances: > > TASK: [create auto scaling gro

Re: [ansible-project] ec2_asg Missing required arguments for autoscaling group create/update: launch_config_name

2015-06-08 Thread benno joy
Hi, It seems like it is a documentation bug, the min_size, max_size and lc_config_name are required paramters, there is a feature request to add default values to min_size and max_size , could you please raise a bug report for this in github. - Benno On Tue, Jun 9, 2015 at 6:31 AM, Igor Cicimo

Re: [ansible-project] Re: Trying to create ansible playbook to reboot servers and getting an error

2015-06-08 Thread benno joy
try this: - name: Restart server shell: " sleep 3; shutdown -r now" async: 1 poll: 0 ignore_errors: true On Mon, Jun 8, 2015 at 1:14 PM, Konstantin Šuvakin < konstantin.suva...@gmail.com> wrote: > Thank you Mikhail, working on Debian 8 too ( same issue with reboot - > pla

Re: [ansible-project] Using host groups in a playbook

2015-06-05 Thread benno joy
try {{ ":,".join(groups['database']) + ':' }} On Sat, Jun 6, 2015 at 8:06 AM, István Szukács wrote: > Hi everybody, > > I was wondering what is the most idiomatic way of doing the following: > > --- > - name: Install > hosts: 'webservers' > remote_user: 'centos' > roles: >

Re: [ansible-project] ec2_group fails if security group already exists

2015-06-05 Thread benno joy
added a pr which migh fix this https://github.com/ansible/ansible-modules-core/pull/1472 , maybe you can give it a try. On Fri, Jun 5, 2015 at 6:20 AM, Gonzalo Fernandez wrote: > Hi > > I am having the following problem > > If I try to run the following Sec_Rule it works ok, but if I re-run it

Re: [ansible-project] Access all the sub-elements in a yaml map

2015-06-04 Thread benno joy
i think what you need is with_dict: object and use it via item.key and item.value On Fri, Jun 5, 2015 at 11:32 AM, Naween Ghimire wrote: > Hi I have been trying to access all the sub-elements available in a map > but i am unable to do so: > > Here's my usecase: > > A yaml map is defined as foll

Re: [ansible-project] Launch ec2 instances in multiple availability zones in single play

2015-06-04 Thread benno joy
wouldn't ec2_asg do that automatically for you ? On Fri, Jun 5, 2015 at 10:35 AM, Igor Cicimov < ig...@encompasscorporation.com> wrote: > Hi all, > > I've been looking for the best way to achieve what is mentioned in the > title of the message but haven't found any. At least not one that will >

Re: [ansible-project] How to handle dynamic inventories with playbooks

2015-06-04 Thread benno joy
you could just have - hosts: all and call the playbook via --limit stagec-webs, or let your script read a parameter from a file or environement variable which specifies the environment you want the inventory to be generated and only generate the inventory for that specific environment. - Benno O

Re: [ansible-project] rds_param_group task not accepting correct values

2015-06-04 Thread benno joy
can you please update to latest version of both and see if that helps. On Thu, Jun 4, 2015 at 10:31 PM, Chanaka Samarajeewa wrote: > Hello Benno, > > We are using Boto version 2.34.0 and Ansible version 1.8.4. > > Thanks > > On Wed, Jun 3, 2015 at 8:28 PM, benno joy wrote:

Re: [ansible-project] Re: elasticache module doesn't work

2015-06-04 Thread benno joy
i think this commit 64a2077787904f144f77839660071f35f25d181f fixes your issue, where the code is changed to connect to the exact region for the vpc connection. earlier the vpc connection woudl be to region where your account might not have rights to vpc's for now i think you can create a directory

Re: [ansible-project] WinRM configuration script error

2015-06-04 Thread benno joy
not sure here but are you using the latest version of the configure script ? https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 also is the winrm server running on port 5985 5986, iirc On Thu, Jun 4, 2015 at 4:06 PM, Rene Metery wrote: > Hi, > > I

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread benno joy
, June 4, 2015 at 10:38:22 AM UTC+5:30, benno joy wrote: >> >> >> >> try setting 'sudo_exe=/bin/bash in ansible.cfg or export >> ANSIBLE_SUDO_EXE=/bin/bash >> in your cli and then running the playbook, >> >> usually /bin/sh is link to /bin/bash

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread benno joy
try setting 'sudo_exe=/bin/bash in ansible.cfg or export ANSIBLE_SUDO_EXE=/bin/bash in your cli and then running the playbook, usually /bin/sh is link to /bin/bash in centos/rhel systems. - Benno -- You received this message because you are subscribed to the Google Groups "Ansible Project" gro

Re: [ansible-project] rds_param_group task not accepting correct values

2015-06-03 Thread benno joy
Hi, Seems like a boto issue, can you please let us know which version of boto you are using and the ansible version, if not on the latest boto version then can you try updating to the latest and see if that helps. - Benno On Thu, Jun 4, 2015 at 4:57 AM, Chanaka Samarajeewa wrote: > > Hello,

Re: [ansible-project] ec2_vol is not mounting the filesystem

2015-06-03 Thread benno joy
Hi, Curretly the ec2_vol module only supoprts creating a new volume and attaching it to an instance. It doesnt partition them and mount them. probably you should use modules like 'lvg,lvol,filesystem and mount" to get the other things in place. On Wed, Jun 3, 2015 at 6:51 PM, Igal Dahan wrote

Re: [ansible-project] Get shell environment variables on target after going thru a bastion

2015-06-02 Thread benno joy
if gather_facts are run on the target server, the hash {{ ansible_env }} should have some environment variables. also the ansible ssh connection doesnt invoke a login shell so .bashrc scripts wouldnt not be run . if you use sudo and set -i flag in sudo_flags in ansible.cfg a login shell would be in

Re: [ansible-project] wait_for, ssh config, & SOCKs

2015-06-02 Thread benno joy
Hi Chris, wait_for doesnt not use ssh/config files and will uses tcp connection to test if port 22 is open for connection and hence tries to lookup the ip via dns. maybe you could try the below to test if ssh has come up or not. local_action: shell ssh "{{item['private_dns_name'] }}" echo hello

Re: [ansible-project] Get Ansible Job ID inside playbook

2015-05-29 Thread benno joy
Hi Ivo, For future tower queries can you please post it at 'support.ansible.com' as this list is for core ansible. following are variables exposed by tower to an ansible playbook. {"tower_job_template_name", "tower_job_id", "tower_user_id", "tower_job_template_id", "tower_user_name", "tower_job_l

Re: [ansible-project] How do you parameterize ansible_eth* facts and use it?

2015-05-28 Thread benno joy
lybook in gist and let us know the version of ansible you are using. - Benno On Fri, May 29, 2015 at 12:15 PM, t goto wrote: > Hello, benno joy. > > Thanks for understanding my poor English. > Basic concept of my_int_* is to parameterize ethernet interface in > template and pl

Re: [ansible-project] How do you parameterize ansible_eth* facts and use it?

2015-05-28 Thread benno joy
if i understand correctly, you are setting my_int_if: eth1 and then setting my_int_ip: "{{ ansible_eth1.ipv4.address }}" which is always hardcoded to eth1. i think what you would want is in group_vars/all my_int_if: eth1 and reference it in template and other places via: bind-address={{ hostvar

Re: [ansible-project] Ansible get variable output

2015-05-28 Thread benno joy
Hi, iirc value for register are not passed via the templating engine, maybe this should work to get the username and thier associate password. - name: Generate a random password per user shell: /usr/bin/openssl passwd -1 -in /dev/urandom | head -1 with_dict: users register: foo

Re: [ansible-project] cannot get win_template to work

2015-05-28 Thread benno joy
Hi Jake, Seems like the win_template module was readded 6 days back , are you testing this in the latest devel branch ? - Benno On Thu, May 28, 2015 at 1:07 PM, Jake Dupuy wrote: > someone please help me out. I cannot get win_template or win_copy to work. > I'm able to do a simple ipconfig t

Re: [ansible-project] Re: Can't get the group_id value from register in ec2_group on creation

2015-05-27 Thread benno joy
Hi Igor, - debug: msg="group_id -- {{ group_sg.group_id }}" should work, can you please try - debug: var=group_sg and see what are the keys that you are getting. Also for question 2. there were a few fixes added to filter groups in the same vpc, can you please try the latest devel branch, - Be

Re: [ansible-project] Re: Amazon VPC Peering Module ?

2015-05-25 Thread benno joy
HI Chris, There is a pending PR for this, https://github.com/ansible/ansible-modules-core/pull/367 can you give it a shot, - Benno On Mon, May 25, 2015 at 1:24 PM, wrote: > Hey everyone, > > Did anything happen on this? Just got a need to do some vpc peering and > wondered what the state of

Re: [ansible-project] Re: Auto-incrementing Integer Assignment to hostnames

2015-05-24 Thread benno joy
one way to do this would be: - ec2: key_name: mykey instance_type: t2.micro image: ami-123456 wait: yes group: webserver exact_count: 1 count_tags: Name: "{{ 'dev-web-' + item }}" instance_tags: Name: "{{ 'dev-web-' + item }}" vpc_subnet_i

Re: [ansible-project] Re: Environment variables seen with gather_facts but not seen in playbooks

2015-05-19 Thread benno joy
in your ansible.cfg have you set tried setting "sudo_flags=-H -i" ? this would make the sudo invoke a login shell - Benno On Wed, May 20, 2015 at 11:02 AM, Adrian Paraschiv < adrian.paraschiv.mob...@gmail.com> wrote: > I have modified ~/.bashrc for root and ansible user to include : alias > su

Re: [ansible-project] Re: Remove a rule from AWS EC2 Security group using Ansible

2015-05-18 Thread benno joy
Seems to work fine in the devel branch, could you please give it a try On Tue, May 19, 2015 at 8:42 AM, Barry Kaplan wrote: > I think removing the global rule is broken: > > https://groups.google.com/forum/#!topic/ansible-project/9FiCbvUR_Cs > > -- > You received this message because you are sub

Re: [ansible-project] specifying ansible_ssh_pass in group vars makes playbook hang

2015-05-18 Thread benno joy
nt is with and connection "ssh" caused it to hang > > > On Monday, May 18, 2015, benno joy wrote: > >> Hi Ritesh, >> >> Both key and pasaword should work fine with both connection types (ssh, >> paramiko), since paramiko works fine, i would guess s

Re: [ansible-project] Re: specifying ansible_ssh_pass in group vars makes playbook hang

2015-05-18 Thread benno joy
Hi Ritesh, Both key and pasaword should work fine with both connection types (ssh, paramiko), since paramiko works fine, i would guess some ssh config might be causing the issue, can you change you connection type back to ssh and run the playbook - and attach an output, also the version of ans

Re: [ansible-project] Enable Kerberos Authentication for WinRM and Powershell exection on Windows Hosts

2014-07-30 Thread benno joy
Hi Ian, I just submitted a PR for this functionality " https://github.com/ansible/ansible/pull/8345"; , maybe you can have a look and provide some feedbacks. or maybe you have a better way of implementation if so please feel free to replace it. Thanks, Benno On Wed, Jul 30, 2014 at 10:30 PM,

Re: [ansible-project] ec2_elb_lb module fails with trivial example

2014-04-04 Thread benno joy
Can you try passing "region: foo" as a parameter and see if that helps. On Fri, Apr 4, 2014 at 8:57 PM, i iordanov wrote: > Hi Michael, > > I just built Ansible from the latest devel branch and I'm still seeing > the same error. I don't quite understand whether I need to patch the > devel bra

Re: [ansible-project] Failed to access license information. GET returned status: 401

2014-02-26 Thread benno joy
Hi David, Could you please send across awx/tower related issue to supp...@ansibleworks.com as this list is mainly for ansible core . Regards, Benno On Wed, Feb 26, 2014 at 11:50 AM, David Chin wrote: > Hi guys, > > I keep on getting these messages when logging in to AWX (Ansible Tower). > *Fa

Re: [ansible-project] with_items/iterations over dictionary for a sysctl task.

2014-02-18 Thread benno joy
Hi Walid, Can you try : - sysctl: name={{ item[0] }} value= {{ item[1] }} with_items: pana_sys_ctl|dictsort Regards, Benno On Wed, Feb 19, 2014 at 11:24 AM, Walid wrote: > Hi Michael, > > but in this case the key name is not a static, they key is the sysctl > parameter, would it be

Re: [ansible-project] What does the [0] mean in when: inventory_hostname == groups['mongo_servers'][0] ?

2013-12-01 Thread benno joy
Hi David, That means the first host in the group "mongo_Servers". [0] notion means the first element in a list. similarly [1] means the second element in a list. Regards, Benno On Sun, Dec 1, 2013 at 12:20 PM, David Coronel wrote: > I saw this in the ansible-examples / openshift / openshift

Re: [ansible-project] stuck on creating an EC2 playbook using dynamic inventory

2013-11-20 Thread benno joy
HI Sandeep, Here's an example where a complete openshift stack is provisioned and deployed in ec2 as well as removed by ansible playbooks. Hope this helps. https://github.com/ansible/ansible-examples/tree/master/openshift have a look at ec2.yml and ec2_remove.yml. Regards, Benno On Wed, Nov 2