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

2016-03-07 Thread Deepa Yr
Were you able to resolve installation of exe files on windows ? On Wednesday, June 17, 2015 at 10:51:12 PM UTC+5:30, priya.n...@gmail.com wrote: > > Hi, > > I am trying to write a playbook which will install windows software(exe > files) on windows client machine from the control machine

[ansible-project] Re: Unzip on windows is giving You cannot call a method on a null-valued expression

2016-03-07 Thread Deepa Yr
Its resolved now. There are four slash () after C: . Once that is changed it ran fine. Thanks On Monday, March 7, 2016 at 7:31:28 PM UTC+5:30, Deepa Yr wrote: > > - > name: "Unpack license into Client install" > win_unzip: > dest: "{{ install_path }}\\" > src: "{{

[ansible-project] Re: Unzip on windows is giving You cannot call a method on a null-valued expression

2016-03-07 Thread Deepa Yr
Yes install_base_path exists and I can see it is getting replaced with correct value C:Bundles.zip On Monday, March 7, 2016 at 7:59:30 PM UTC+5:30, J Hawkesworth wrote: > > Does install_base_path exist? > > On Monday, 7 March 2016 14:01:28 UTC, Deepa Yr wrote: >> >> - >> name: "Unpack

[ansible-project] Re: Problem using nxos_command module

2016-03-07 Thread Roger Gomez
On Sunday, March 6, 2016 at 10:43:54 PM UTC-5, pspr...@ansible.com wrote: > > HI Roger, > > Two questions: > > 1) Are you able to browse to http://leaf-switch:80/ins > (assuming you have nxapi sandbox configured)? > Yes, I'm able to browse and make REST API calls.

Re: [ansible-project] installation failure on rhel 7.1: failed dependency: python-jinja2

2016-03-07 Thread Shili Yang
Thanks very much for looking into this and your suggestion, Johannes. I've tried the following, but it didn't help: -bash-4.2# yum install epel-release Loaded plugins: rhnplugin This system is receiving updates from RHN Classic or Red Hat Satellite. localrepo

Re: [ansible-project] installation failure on rhel 7.1: failed dependency: python-jinja2

2016-03-07 Thread Johannes Kastl
Am 07.03.16 schrieb Shili Yang: > Hi, > > I am trying to install Ansible on a RHEL 7.1 VM, and hitting the (last) > outstanding dependency: > > -bash-4.2# rpm -Uvh ./rpm-build/ansible-*.noarch.rpm > error: Failed dependencies: > python-jinja2 is needed by >

Re: [ansible-project] adhoc command to check all installed packets and their versions

2016-03-07 Thread Johannes Kastl
Am 07.03.16 schrieb Dimitar Ivanov: > locally I'm using "yum list installed > packs.txt" Why not use that call? ansible -m command -a "yum list installed" (I tested locally with -a "rpm -qa", which worked) Johannes -- You received this message because you are subscribed to the Google

[ansible-project] Re: Problem using nxos_command module

2016-03-07 Thread Roger Gomez
Thank you for helping me with this issue. I have responded inside your previous email. On Sunday, March 6, 2016 at 10:43:54 PM UTC-5, pspr...@ansible.com wrote: > > HI Roger, > > Two questions: > > 1) Are you able to browse to http://leaf-switch:80/ins >

Re: [ansible-project] Need help with conditionals and a dict (?) or variable...

2016-03-07 Thread Johannes Kastl
Hi Brian, Am 07.03.16 schrieb Brian Coca: >> - name: This runs if there is something ssh_users >> copy: >> src='...' >> dest='...' >> with_items: "{{ ssh_users|default([1]) }}" >> when: ssh_users is defined >> >> > > ​remove the when: it executes PER item, in the

Re: [ansible-project] Need help with conditionals and a dict (?) or variable...

2016-03-07 Thread Brian Coca
> > > > - name: This runs if there is something ssh_users > copy: > src='...' > dest='...' > with_items: "{{ ssh_users|default([1]) }}" > when: ssh_users is defined > > ​remove the when: it executes PER item, in the default you are forcing 1 item and then skipping

Re: [ansible-project] Is there a cache of some sort in vsphere_guest (or possibly pysphere)?

2016-03-07 Thread Brian Coca
ansible does not cache task nor task parameters. On Sat, Mar 5, 2016 at 1:34 PM, Anthony Cheng wrote: > The reason I am asking is because I made some modification in my playbook > /w vsphere_guest module; specifically the host and datastore location but I > find

Re: [ansible-project] Group variables conditional based on OS distribution release

2016-03-07 Thread Johannes Kastl
Hi Darren, Am 07.03.16 schrieb Darren S.: > I'm still finding myself stumped on this. See my answer below. > On Mon, Feb 29, 2016 at 10:29 PM, Brian Coca wrote: >> >> yes, you need to gather facts before that variable is available, you might >> want to use |default filter

Re: [ansible-project] Ansible forces me break PEP8 when writing modules

2016-03-07 Thread Toshio Kuratomi
On Mon, Mar 7, 2016 at 12:02 AM, wrote: >> 2nd it is not a real import and is already confusing > > I know it's not a real import but ansible made it look like a real import so > coding styles should apply. > Like you I really hate wildcard imports. They make static

[ansible-project] Re: How to copy a file from control machine to the host where task is running

2016-03-07 Thread Dan Lang
Besides the copy module, there is the synchronize module for syncing many files in a directory, http://docs.ansible.com/ansible/synchronize_module.html. Feel free to review each of the modules that help with managing files, http://docs.ansible.com/ansible/list_of_files_modules.html On

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-07 Thread Akash John
Hi Hawkesworth, Thanks for your quick response. Please find the responses below, What is the exact error message you are seeing? *ansible hostname.mydomain.com -m win_ping -vv* * ESTABLISH WINRM CONNECTION FOR USER: on PORT 5986 TO hostname.mydomain.com * * WINRM CONNECT:

[ansible-project] Ansilbe option --list-tasks does not list any tasks

2016-03-07 Thread Phonthip Namkaew
Hi After an Ansible update from 1.9.2 to 2.0.1.0 the following command (--list-tasks) does not list any tasks anymore: foo:/data/ansible> ansible-playbook -i inventory playbooks/playbook-s12-oracle-directory.yml --list-tasks playbook: playbooks/playbook-s12-oracle-directory.yml play #1

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-07 Thread 'J Hawkesworth' via Ansible Project
What is the exact error message you are seeing? Also try running ansible with -v or -vv to see connection debugging information. Here are some more suggestions: 1/ In Powershell, running as Administrator, run winrm get winrm/config on a machine that can't be connected to, and compare the

[ansible-project] Re: Delegate_to register when

2016-03-07 Thread Steve Irvine
Hi All, I found this link: https://docs.ansible.com/ansible/playbooks_loops.html#using-register-with-a-loop Which suggests that once register is run with a loop the output goes into a structure called results. I tried: artisan_current.results[item].stat.exists ? Still no go. On Monday,

[ansible-project] Re: How to copy a file from control machine to the host where task is running

2016-03-07 Thread 'J Hawkesworth' via Ansible Project
Try the copy module: http://docs.ansible.com/ansible/copy_module.html On Monday, 7 March 2016 05:20:10 UTC, Deepa Yr wrote: > > Any help on this ? > > > On Thursday, March 3, 2016 at 3:04:12 PM UTC+5:30, Deepa Yr wrote: >> >> I have few files in control machine ie host1. >> My playbook/tasks are

[ansible-project] Re: Connecting to Azure Win Servers

2016-03-07 Thread 'J Hawkesworth' via Ansible Project
Hmm, looks like it is trying to make an SSH connection, rather than a WinRM connection Port 22 is the giveaway there - should be 5985 or 5986 for winrm. I suggest checking your inventory/group vars to make sure you have ansible_connection: winrm set in your inventory or group vars for this

[ansible-project] Connecting to Azure Win Servers

2016-03-07 Thread Mark Matthews
Hi I have setup some Windows servers is Azure, and now want to run some playbooks to those servers. I am getting the following error though (see attached). 10.85.50.8 | FAILED! => { "failed": true, "msg": "ERROR! ssl: 500 WinRMTransport. [Errno 104] Connection reset by

[ansible-project] Re: Unzip on windows is giving You cannot call a method on a null-valued expression

2016-03-07 Thread 'J Hawkesworth' via Ansible Project
Does install_base_path exist? On Monday, 7 March 2016 14:01:28 UTC, Deepa Yr wrote: > > - > name: "Unpack license into Client install" > win_unzip: > dest: "{{ install_path }}\\" > src: "{{ install_base_path }}\\Bundles.zip" > > Path {{ install_path }}\\ already exists. > > When

[ansible-project] Unzip on windows is giving You cannot call a method on a null-valued expression

2016-03-07 Thread Deepa Yr
- name: "Unpack license into Client install" win_unzip: dest: "{{ install_path }}\\" src: "{{ install_base_path }}\\Bundles.zip" Path {{ install_path }}\\ already exists. When above code is executed, getting this error fatal: []: FAILED! => {"changed": false, "failed": true,

[ansible-project] ec2_vpc_route_table not working with NAT gateways

2016-03-07 Thread Dean Mills
Having troubles trying to setup the route tables in a VPC with a NAT gateway as the target. - name: Create Private B route tables ec2_vpc_route_table: vpc_id: '{{ vpc_id }}' region: '{{ vpc_region }}' subnets: - '{{ vpc_subnet_private_b }}' routes: -

[ansible-project] Is there a cache of some sort in vsphere_guest (or possibly pysphere)?

2016-03-07 Thread Anthony Cheng
The reason I am asking is because I made some modification in my playbook /w vsphere_guest module; specifically the host and datastore location but I find that when I run the playbook it is still using the previous host and datastore setting. -- You received this message because you are

[ansible-project] adhoc command to check all installed packets and their versions

2016-03-07 Thread Dimitar Ivanov
Hi all, I'm wondering how to check all installed packets and their versions in the box I can send ansible all -i /path-to-the-hosts/hosts -a "rpm -q glibc" but how to check all installed packets locally I'm using "yum list installed > packs.txt" thanks in advance Best Regards -- You received

[ansible-project] installation failure on rhel 7.1: failed dependency: python-jinja2

2016-03-07 Thread Shili Yang
Hi, I am trying to install Ansible on a RHEL 7.1 VM, and hitting the (last) outstanding dependency: -bash-4.2# rpm -Uvh ./rpm-build/ansible-*.noarch.rpm error: Failed dependencies: python-jinja2 is needed by ansible-2.0.0.2-0.git201601142217.7de237c.stable2001.el7.noarch I've tried

[ansible-project] Delegate_to register when

2016-03-07 Thread Steve Irvine
Hi Everyone, Quick question, I have a play where I put a laravel queue system in maintenance mode before running updates against it's consumers. I'd like to check for the existence of a file with stat on the queue manager, run it if it exists (it might not be there if this is the first run

[ansible-project] Re: Ansible ping working in some of the servers and not working in some of the list.

2016-03-07 Thread Akash John
Hi Hawkesworth, What version of windows and service pack is on the hosts that won't respond to ping? *Windows server 2012 R2 Standard, *but all other responding hosts are having same operating system version. Are you using the win_ping module? win_ping will connect using the wirnm port,

[ansible-project] set_fact/include/role vars precedence

2016-03-07 Thread Takeshi Yaegashi
Hi, I'm confused with variable precedence of Ansible 2.0 documented in http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable . Suppose I have playbooks and roles as follows: hosts (inventory): [default] localhost x=1

Re: [ansible-project] Ansible forces me break PEP8 when writing modules

2016-03-07 Thread dbarrosop
> having the import at the bottom is but that can be considered again as 'not a violation' That's not the issue I am trying to solve with that PR. > 2nd it is not a real import and is already confusing I know it's not a real import but ansible made it look like a real import so coding styles