[ansible-project] Re: recommended indent style for tasks

2018-05-04 Thread Varun Chopra
This is: But later on, in the "Basics" header there's an alternate style, where each task item is indented a shift-width deeper then the "task:" keyword. On Tuesday, May 1, 2018 at 5:07:09 PM UTC+5:30, Josef Fortier wrote: > > I'm modifying an EOL vim ansible plugin for my own use and am

[ansible-project] Re: Molecule/testinfra

2018-04-27 Thread Varun Chopra
You wouldn't. You're supposed to test things before you deploy them. On Thursday, April 26, 2018 at 11:40:10 PM UTC+5:30, Chris Short wrote: > > Is anyone using molecule/testinfra to test real infrastructure (verifying > things ansible has managed)? The unit testing of playbooks is awesome but

[ansible-project] Re: win_disk_facts - get size and size remaining

2018-05-10 Thread Varun Chopra
This is pretty much why I was in favor of a separate module for volumes. I'd encountered the same issues but I ended up making my own module for it. You can take a look at this if it suits your fancy: https://github.com/chopraaa/win_volume_facts/ It's kinda shit tbh but hey, it does the job.

[ansible-project] Creating multiple dest files using templates.

2018-04-26 Thread Varun Chopra
I'm trying to parse a csv using the template module: host1,fqdn1,... host2,fqdn2,... {% for item in csvfile.split("\n") %} {% if loop.index != 0 %} {% set list = item.split(",") %} [col1] name: '{{ list[0] | trim() }}' label: '{{ list[11] | trim() }}' [options] followup = yes {% endif

[ansible-project] Re: Using 2 ansible versions

2018-05-01 Thread Varun Chopra
Thanks man. Wasn't sure if i should run ansible from source or install it in the virtualenv using pip. On Tuesday, May 1, 2018 at 3:59:36 PM UTC+5:30, Varun Chopra wrote: > > Hi, > > I'm trying to install Ansible 2.3 on a server with 2.5 already present. > > I built and in

[ansible-project] Using 2 ansible versions

2018-05-01 Thread Varun Chopra
Hi, I'm trying to install Ansible 2.3 on a server with 2.5 already present. I built and installed virtualenv and download ansible 2.3 and initiated a virtualenv using source ./hacking/env-setup Will this new installation hinder with the 2.5 install in any way? How long does the virtualenv

[ansible-project] Item name in task name.

2018-01-29 Thread Varun Chopra
Hi, I'm trying to display the item name in the name of the task but it doesn't work as intended. Here's part of my play: tasks: - name: Installing {{ item }} yum: name: "{{ item }}" state: latest with_items: - httpd - firewalld This is what I

[ansible-project] assert and fail. When to use what?

2018-02-01 Thread Varun Chopra
Hi, I've been working on a playbook that asserts prerequisites required for a mssql installation and I'm not entirely confident with what I've come up with. https://gist.githubusercontent.com/chopraaa/1b74480a7b286ee91dd855ae670104f1/raw/660b758b4e82e0b68e6fe73946d005cfcac9/mssql.yml What

[ansible-project] Re: Item name in task name.

2018-02-01 Thread Varun Chopra
Yeah, you're right! Thanks! On Thursday, February 1, 2018 at 3:56:32 AM UTC+5:30, Malcolm Hussain-Gambles wrote: > > I don't think you can do that, as the item isn't defined when it prints > the name section. I also seem to remember that certain modules,like yum > will process the list in one

[ansible-project] Re: Item name in task name.

2018-02-01 Thread Varun Chopra
latest > with_items: > - httpd > - firewalld > > > On Monday, January 29, 2018 at 11:02:58 AM UTC-5, Varun Chopra wrote: >> >> Hi, >> >> I'm trying to display the item name in the name of the task but it >> doesn't work

[ansible-project] Re: ansible conditions

2018-02-04 Thread Varun Chopra
Hi Sudhir, You're barely making sense and it doesn't help when you don't provide any code. Nobody can help you if they don't understand you. -- Varun On Thursday, February 1, 2018 at 9:11:08 PM UTC+5:30, Sudhir Kumar wrote: > > Hi, > > Below snippet sometimes working and sometimes failing.

[ansible-project] Re: ssh connection doesn't work

2018-02-04 Thread Varun Chopra
You need to have Python installed on the managed host. On Sunday, February 4, 2018 at 6:22:54 PM UTC+5:30, jonatha...@clearsys.re wrote: > > Hi everybody, > > I have some problems to use ansible. > > > I use ansible version 2.4.3.0 i > > I testing just one host with IP and port (I have port

[ansible-project] Re: requests-credssp and credentials encryprion at first hop.

2018-01-30 Thread Varun Chopra
There was a recent post on Reddit about this... Here it is: https://www.reddit.com/r/PowerShell/comments/7qra9r/double_hop_solvers_and_resourcebased_kerberos/ CredSSP isn't really the best way to go about this. And I think this post should go on Git as Ansible needs a better way to cover

Re: [ansible-project] Re: [Windows] Install visual studio

2018-01-28 Thread Varun Chopra
Yes, and? -- 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

Re: [ansible-project] Re: [Windows] Install visual studio

2018-01-28 Thread Varun Chopra
That's not how become works. You can set become: yes at the task and play level, not module level. -- 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] service module fails to start nginx usig a docker connection

2018-01-28 Thread Varun Chopra
Run both using - and post the outputs here. -- 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

[ansible-project] How to display ansible_host in console output even if an alias is defined at inventory level

2018-01-28 Thread Varun Chopra
I think it's best to reserve ansible_host as the IP address as that remains constant. You can declare friendly names first that way: jboss_1 ansible_host=10.0.0.10 Going by your method, your inventory will require a lot of upkeep because if the hostname changes, the inventory will break. --

[ansible-project] Using 2 inventories. Can someone explain what I'm doing wrong?

2018-02-13 Thread Varun Chopra
So I plan to use a static and a dynamic inventory (gce) and this is what my play folder looks like: . ├── ansible.cfg ├── credentials.json ├── gce_vars │ ├── auth │ └── test_servers ├── group_vars │ └── all ├── hosts.yml ├── inventory │ ├── gce.ini │ ├── gce.py │ └── hosts.yml └──

[ansible-project] Re: Using 2 inventories. Can someone explain what I'm doing wrong?

2018-02-13 Thread Varun Chopra
Thanks. I read your post and realized what I did wrong. /workspace was my working directory and workstation's my hostname. Mixed up the two. :l On Tuesday, February 13, 2018 at 11:08:42 PM UTC+5:30, Vyacheslav wrote: > > > > Missing (or not readable) key file: '/workstation/gcloud/ >

[ansible-project] Re: win_part and win_volume.

2018-02-20 Thread Varun Chopra
Yeah, I agree it wouldn't make sense to put it into a single module. Guess I'll keep an eye on that PR. Thanks. On Tuesday, February 20, 2018 at 1:29:52 PM UTC+5:30, Jordan Borean wrote: > > There are no module right now that can do that for Windows. There was a PR > to add a module that did

[ansible-project] win_part and win_volume.

2018-02-19 Thread Varun Chopra
Is there a plan to implement modules for cmdlets like *-Partition, *-Volume? Or I guess they're already there and I'm missing something. o_O -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

[ansible-project] Re: Dynamic Inventory using Google Cloud Platform

2018-02-20 Thread Varun Chopra
> > 'Invalid authorization response, please check your credentials and time > drift.' > On Tuesday, February 20, 2018 at 4:21:21 PM UTC+5:30, Chrisy wrote: > > We are trying to configure Google compute engine resources using dynamic > inventory in ANSIBLE > > We are getting the below error

[ansible-project] Re: Is it possible to associate a host to a variable?

2018-02-18 Thread Varun Chopra
You can declare variables for individual hosts in tower as well. On Friday, February 16, 2018 at 10:49:41 AM UTC+5:30, Edson D'Agostini wrote: > > Greetings, > > Would you please let me know if there is a way of associating a host with > a variable. In other words, > > I have in one test

Re: [ansible-project] Installed documentation

2018-02-18 Thread Varun Chopra
How's the day to day user supposed to know this? :/ On Saturday, February 17, 2018 at 3:51:09 AM UTC+5:30, Brian Coca wrote: > > FYI, ansible-doc does more than modules, it now documents other > plugins also, i.e ansible-doc -t lookup nested > > > -- > -- > Brian Coca > -- You

[ansible-project] Re: Security acess to a machine via Ansible

2018-02-24 Thread Varun Chopra
You can use Ansible Vault or go with Tower. It has support for teams. On Thursday, February 22, 2018 at 5:42:24 PM UTC+5:30, Oscar Pinto wrote: > > How can I ensure that a user that is used to play the playbooks does not have > ssh access in any other way > > -- You received this message

[ansible-project] Re: Transfer execute and delete script python via playbook

2018-08-02 Thread Varun Chopra
Hi Vince, script will delete your script on it's own after executing it, similar to other modules. https://github.com/ansible/ansible/blob/0461620b2ddc7e8c0bf00bf8b7b95edd3a4c109c/lib/ansible/plugins/action/script.py#L144 On Thursday, August 2, 2018 at 1:51:05 PM UTC+5:30, Vincent Descargues

[ansible-project] Re: Ansible Disk Usage and Disk Space Full Alert generation Script.

2018-03-12 Thread Varun Chopra
You can use it as a role and loop over it: - name: Disk role. include_role: name: disk_role vars: mount_point: "{{ item }}" with_items: - "/dev" - "/backup" On Monday, March 12, 2018 at 12:15:33 PM UTC+5:30, Kiran Shrimali wrote: > > --- > -

[ansible-project] Re: Ansible Disk Usage and Disk Space Full Alert generation Script.

2018-03-12 Thread Varun Chopra
Don't mind the messed up indent... On Monday, March 12, 2018 at 1:50:23 PM UTC+5:30, Varun Chopra wrote: > > You can use it as a role and loop over it: > > - name: Disk role. > include_role: > name: disk_role > vars: > mount_point: "{{

Re: [ansible-project] Ansible Disk Usage and Disk Space Full Alert generation Script.

2018-03-12 Thread Varun Chopra
This thread is filled with red flags, and im not even talking about the fact that he's using ansible for monitoring On Monday, March 12, 2018 at 2:27:05 PM UTC+5:30, Jean-Yves LENHOF wrote: > > > > Le 08/03/2018 à 05:43, Kiran Shrimali a écrit : > > Hi, > > I am tryig to write an Ansible

[ansible-project] Re: New Ansible setup architecture

2018-03-12 Thread Varun Chopra
I'd like to know the point of running ansible in containers. I'm sort of new to this. Would be great if you could help out. On Monday, March 5, 2018 at 6:01:16 PM UTC+5:30, DevOpsUnleashed wrote: > > I am tasked with setting up Ansible in my team. > > In another team, we setup Ansible in a

Re: [ansible-project] Is there any Ansible master / Slave concept.

2018-03-13 Thread Varun Chopra
http://lmgtfy.com/?q=ansible+tower On Monday, March 12, 2018 at 9:52:34 PM UTC+5:30, rrak...@gmail.com wrote: > > Thanks for teh information @Brian, Can you point any link to over for > Tower/AWX you just mentioned. > > On Monday, March 12, 2018 at 9:48:08 PM UTC+5:30, Brian Coca wrote: >> >>

[ansible-project] Re: need help to install Visual studio code on linux machine through Ansible

2018-04-12 Thread Varun Chopra
Your question is more suited for https://github.com/mhalano/ansible-role-visual-studio-code/issues On Wednesday, April 11, 2018 at 4:23:22 PM UTC+5:30, Vishal Mane wrote: > > I took a role to install vs code from github. now trying to run the role, > it gets executes successfully, but vs code

[ansible-project] yum throws error if you give it a mix of sources

2018-03-17 Thread Varun Chopra
This works: - name: "Enable repos" yum: name: "{{ item }}" state: present with_items: - https: //fedorapeople.org/groups/katello/releases/yum/3.4/katello/el7/x86_64/katello-repos-latest.rpm - https:

[ansible-project] Re: How do I access the cpu %usage in this example? I'm getting an error no matter what I try.

2018-03-05 Thread Varun Chopra
You can access the first element using result.ansible_facts.napalm_environment.cpu[0].%usage or so. On Monday, March 5, 2018 at 1:17:28 PM UTC+5:30, Marcos Georgopoulos wrote: > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Re: Ansilbe tower install fail

2018-03-05 Thread Varun Chopra
There's no point in making changes to the playbook(s). It's probably an issue with your inventory. On Sunday, March 4, 2018 at 3:47:58 AM UTC+5:30, Abhishek Reddy wrote: > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

[ansible-project] Re: Dynamic Inventory using Google Cloud Platform

2018-03-05 Thread Varun Chopra
ved. Can you please give us a > sample playbook to install these applications(like apache, python, etc..) > in the VM running in the GCP from ansible > > Thank You > > On Monday, February 26, 2018 at 4:41:43 PM UTC+5:30, Varun Chopra wrote: >> >> Keep gce.ini and gce.p

[ansible-project] Re: Firewall Rules Check with Ansible

2018-02-26 Thread Varun Chopra
Yes, the playbook looks up hosts in the inventory file. On Monday, February 26, 2018 at 3:23:29 AM UTC+5:30, marcalfa1 wrote: > > I tried your example and getting the following result. Is an inventory > file needed since all the hosts being defined in the playbook? > > > [WARNING]: Could not

[ansible-project] Re: Playbooks In Subdirectories #12862

2018-02-26 Thread Varun Chopra
> I feel like most people run their Ansible scripts from the Ansible root directory and mentally treat that as the directory that Ansible should be searching for vars/roles/inventory/etc, _especially_ since the `ansible.cfg` is located there. Your last two years must've been bloody awful. On

[ansible-project] Re: Dynamic Inventory using Google Cloud Platform

2018-02-26 Thread Varun Chopra
Keep gce.ini and gce.py in your inventory, make sure gce.ini has values for gce_service_account_email_address, gce_service_account_pem_file_path and gce_project_id. After that, gce.py --list-hosts should work. On Monday, February 26, 2018 at 11:30:51 AM UTC+5:30, Chrisy wrote: > > -wall of

[ansible-project] Re: open command line installer by playbook

2018-10-13 Thread Varun Chopra
If you can do it through a shell script, you can use the same script in Ansible. On Saturday, October 13, 2018 at 2:57:57 PM UTC+5:30, aakanks...@webdunia.net wrote: > > Hello, > > I have software, where I need to run ./install.bin command as a output it > open a command line installer to

[ansible-project] Re: "/bin/sh: 1: powershell: not found\n"

2018-11-10 Thread Varun Chopra
You're defining localhost under the win hostgroup and setting its connection to local. I think you should look up Ansible guides first. I dont mean any offense. On Saturday, November 10, 2018 at 6:42:12 PM UTC+5:30, Akshay Kaushik wrote: > > > > On Saturday, October 27, 2018 at 6:14:04 PM

Re: [ansible-project] Oracle 12C hangs with while doing unattended installation

2018-09-23 Thread Varun Chopra
tried it locally and manually and it works every time. I just > created a couple of new Windows servers and installing it with ansible > hangs again so it does not seem to be a cleanup issue. > > On Sunday, September 23, 2018, Varun Chopra >

Re: [ansible-project] Oracle 12C hangs with while doing unattended installation

2018-09-23 Thread Varun Chopra
Can you install it remotely via invoke-command? -- 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

Re: [ansible-project] Oracle 12C hangs with while doing unattended installation

2018-09-23 Thread Varun Chopra
m to work. Should I try through remote power shell ? > > On Sunday, September 23, 2018, Varun Chopra > wrote: > >> That wasn't my question though. >> >> If you can run it remotely from another windows vm you should be able to >> see where it breaks side-by-s

[ansible-project] Re: Want to change the installatin path using win_package

2019-01-20 Thread Varun Chopra
Also might wanna add /q On Sunday, January 20, 2019 at 10:42:43 PM UTC+5:30, Varun Chopra wrote: > > - name: installation of the package in D drive > win_package: > path: \\Network\\path\\rabbitmq.exe > arguments: INSTALLDIR="D:\Program Files" > > shoul

[ansible-project] Re: Want to change the installatin path using win_package

2019-01-20 Thread Varun Chopra
- name: installation of the package in D drive win_package: path: \\Network\\path\\rabbitmq.exe arguments: INSTALLDIR="D:\Program Files" should work. Please post the verbose output here. (use -) On Sunday, January 20, 2019 at 7:48:55 PM UTC+5:30, shya...@gmail.com wrote: > > Hi,

[ansible-project] Re: ssh transport and windows

2019-04-06 Thread Varun Chopra
SSH is not supported on Windows. On Saturday, April 6, 2019 at 1:44:27 PM UTC+5:30, sergey@gmail.com wrote: > > Hello. > > I am aware of the support for SSH in Windows 2019 and Windows 10. > I installed the OpenSSH in Windows 8.1 and tried to enter it. All is well. > But if you turn on ssh