[ansible-project] Re: Variables with quotes

2018-04-15 Thread Larry Smith
plitting each type of permission > into its own variable. I think a combined string with too many quotes > caused some parsing issues. > > Regards, > Shaun > > On Saturday, 14 April 2018 15:05:09 UTC+10, Larry Smith wrote: >> >> Try to use the Ansible rabbitmq_user m

[ansible-project] Re: Variables with quotes

2018-04-13 Thread Larry Smith
Try to use the Ansible rabbitmq_user module as this will be much easier to accomplish your needs. http://docs.ansible.com/ansible/latest/modules/rabbitmq_user_module.html On Friday, April 13, 2018 at 9:48:15 AM UTC-4, Shaun Lim wrote: > > Hi all, > > I'm new to Ansible and am trying to use some

[ansible-project] Re: ansible with elastic search with Jinja2 Template

2018-04-13 Thread Larry Smith
You can use: node.name: {{ansible_hostname}} Which will use the hostname defined on the remote host. Or you can use: node.name:{{inventory_hostname}} Which will use the inventory hostname defined in your Ansible inventory. For reference:

[ansible-project] Re: Architecture of a complex ansible project

2018-04-05 Thread Larry Smith
Here is an example of a complex project for reference https://github.com/mrlesmithjr/ansible-vsphere-management When developing a complex project you should keep everything modular (roles, inventory, group_vars, host_vars, and etc.).

Re: [ansible-project] Automate VM creation with Ansible (VMware, Bind, Zabbix)

2018-04-05 Thread Larry Smith
You can define the IP address of a VM being created from the template at the time of creation and then you can dynamically create an inventory group during the play execution that you can use for further processing. Or you can use a template to create additional inventory items based on VM

[ansible-project] Re: Install Docker on Windows Server 2016 using win_shell module

2018-01-19 Thread Larry Smith
rogram Files\\Docker\\metadata.json" > register: dockerinstall > > - name: Reboot server if Docker package requires it > win_reboot: > when: dockerinstall.changed > > Might help somebody out. > > fredag 19. januar 2018 07.10.24 UTC+1 skrev Larry Smith følg

[ansible-project] Re: Install Docker on Windows Server 2016 using win_shell module

2018-01-18 Thread Larry Smith
Not sure if this will help you or not but you might be able to get some ideas from my Ansible role for Windows Docker installation. https://github.com/mrlesmithjr/ansible-windows-docker On Monday, July 17, 2017 at 5:51:06 PM UTC-4, Pasquale Carlo Maiorano Picone wrote: > > *ISSUE TYPE* > -

[ansible-project] Re: Array in Ansible

2017-12-09 Thread Larry Smith
Another way you could be as below: --- - hosts: localhost connection: local gather_facts: false vars: tests: test1: name: A age: 12 gender: M test2: name: K age: 10 gender: F tasks: - debug: msg="{{ item }} name={{

[ansible-project] Re: Array in Ansible

2017-12-09 Thread Larry Smith
Based on your example if you change the playbook similarily to below: --- - hosts: localhost connection: local gather_facts: false vars: tests: test1: name: A age: 12 gender: M test2: name: K age: 10 gender: F tasks: -

Re: [ansible-project] Re: directory is exists or not

2017-12-07 Thread Larry Smith
gt; > > Regards, > Bhautik > > On Thu, Dec 7, 2017 at 9:53 PM, Larry Smith <mrles...@gmail.com > > wrote: > >> change: >> msg:"Path exists and is a directory" >> >> to: >> msg: "Path exists and is a directory" >&g

[ansible-project] Re: directory is exists or not

2017-12-07 Thread Larry Smith
change: msg:"Path exists and is a directory" to: msg: "Path exists and is a directory" Missing space... On Thursday, December 7, 2017 at 9:56:34 AM UTC-5, Bhautik K wrote: > > Looking for solution. I have write below yml for *if directory is exists > or not* but getting below error. Could you

[ansible-project] Re: In v2.4.x.x how can I include host groups in one inventory file to another? If so how?

2017-12-06 Thread Larry Smith
Cool. No worries. However, I would be interested in hearing your use case. Always interesting to hear others perspective on how to use inventory, group vars, and host vars. On Wednesday, December 6, 2017 at 4:16:07 AM UTC-5, ZillaYT wrote: > > Definitely a single inventory file is NOT what I

[ansible-project] Re: In v2.4.x.x how can I include host groups in one inventory file to another? If so how?

2017-12-05 Thread Larry Smith
Why not just create one inventory like below? /inventory/hosts.inv [bb-gerrit-cluster:children] bb-cluster1 gerrit-cluster1 [bb-cluster1] www.bb-loc1.domain.com www.bb-loc2.domain.com [gerritt-cluster1] www.gerritt-loc1.domain.com www.gerritt-loc2.comain.com [jira-cluster1]

Re: [ansible-project] Re: How to create a big inventpry file in ansible

2017-12-04 Thread Larry Smith
ssh_host=10.48.21.56 host_fqdn=orion-RHEL-08 > orion-RHEL-09ansible_ssh_host=10.48.21.57 host_fqdn=orion-RHEL-09 > > regards > parwinder > > > On Sat, Dec 2, 2017 at 10:56 AM, Larry Smith <mrles...@gmail.com > > wrote: > >> Not sure if you figu

[ansible-project] Re: How to create a big inventpry file in ansible

2017-12-01 Thread Larry Smith
Not sure if you figured this out yet or not. But thought I would share with you how I was able to do this and it works really well. I do not use the CSV lookup as it didn't seem to work how I needed it to (or I just couldn't make it work) so I just used the file lookup.

[ansible-project] Re: with_items... in groups[item.hostgroups]

2017-07-13 Thread Larry Smith
Can you post your error(s) you are getting? Also assuming that your with_items: "{{ users }}" is defined in users.yml? Such as, users.yml ``` users: - fullname: Full Name Here1 username: sshusernamehere1 userkey: ../files/ssh-keys/sshusernamehere1/authorized_keys access:

[ansible-project] Re: how to add a user to docker group if docker group is there?

2017-07-13 Thread Larry Smith
This may be of some help for you. https://github.com/mrlesmithjr/ansible-docker/blob/master/tasks/users.yml Basically this should work for you as a playbook. --- - hosts: docker_hosts vars: docker_users: - 'vagrant' tasks: - name: users | adding docker users (for use without

[ansible-project] Re: Install Jenkins server inside Vagrant box using ansible

2017-06-22 Thread Larry Smith
I do not have specific documentation on doing the step by step installation as requested. However, I have put together a usable Jenkins installation provisioned with Ansible within a Vagrant Virtualbox environment. Would be good to learn how it is put together but maybe not. Thought I would go

[ansible-project] Re: when statements should not include jinja2 templating delimiters

2017-05-23 Thread Larry Smith
Dave, You could easily just rewrite as below and it should solve your issue. when: > not ansible_check_mode and (zerotier_status != "OK" or zerotier_name != inventory_hostname) On Tuesday, May 23, 2017 at 7:20:20 AM UTC-4, Dave Cottlehuber wrote: > > I'm getting a benign warning

Re: [ansible-project] set_fact variable not working in template

2017-05-05 Thread Larry Smith
Have you tried with your conditional in your template as: {% if include_path %} some steps {% else %} some steps {% endif %} Or add a debug prior to template for: - debug: var=include_path My guess would be you will see include_path as True rather than true. On Friday, May 5, 2017 at 1:46:26

[ansible-project] Re: how to insert Ansible inventory out put (i.e kernel info) into database ?

2017-04-01 Thread Larry Smith
This may be of some use to you. https://github.com/mrlesmithjr/ansible-inventory On Wednesday, March 29, 2017 at 10:59:53 AM UTC-4, F wrote: > > Hi All, > I am very new to Ansible, currently i am trying to evaluate ansible. > i know by using ansible inventory command i can get all information

[ansible-project] Re: Very confused Vagrant/Ansible

2016-06-06 Thread Larry Smith
@Greg - Have a look at my Vagrant box templates which include using Ansible for all provisioning. May be able to get you headed down the right path. https://github.com/mrlesmithjr/vagrant-box-templates Specifically bootstrap.yml

Re: [ansible-project] Yum packages being skipped using Ansible 2.0.2.0

2016-05-03 Thread Larry Smith
issues/15211 > > On Tuesday, May 3, 2016, Larry Smith <mrles...@gmail.com > > wrote: > >> So I am seeing something rather strange when using Ansible 2.0.2.0...If I >> execute a play with the following tasks the second one is skipped. However >> if I run t

[ansible-project] Yum packages being skipped using Ansible 2.0.2.0

2016-05-03 Thread Larry Smith
So I am seeing something rather strange when using Ansible 2.0.2.0...If I execute a play with the following tasks the second one is skipped. However if I run the same play using Ansible 2.0.1.0 it runs as expected. Anyone else experienced anything similar? Thoughts? - name: installing epel

[ansible-project] Yum packages being skipped using 2.0.2.0

2016-05-03 Thread Larry Smith
So I am seeing something rather strange when using Ansible 2.0.2.0...If I execute a play with the following tasks the second one is skipped. However if I run the same play using Ansible 2.0.1.0 it runs as expected. Anyone else experienced anything similar? Thoughts? - name: installing epel

Re: [ansible-project] Re: Provisioning OpenStack with Ansible from scratch, missing modules?

2016-03-13 Thread Larry Smith
/openstack_keystone_endpoints.yml On Sun, Mar 13, 2016 at 8:57 PM, Larry Smith <mrlesmit...@gmail.com> wrote: > I did this exact same thing a few months ago but using Kilo and Ubuntu > 14.04LTS which may be of some use to you. However I did use some of the > modules which have been replaced but sh

[ansible-project] Re: Provisioning OpenStack with Ansible from scratch, missing modules?

2016-03-13 Thread Larry Smith
I did this exact same thing a few months ago but using Kilo and Ubuntu 14.04LTS which may be of some use to you. However I did use some of the modules which have been replaced but should not be too hard to make those changes. Again just sharing this as it may be of some use for you.

Re: [ansible-project] Re: Ansible 2.0 VMWare modules

2016-03-09 Thread Larry Smith
So it appears this is still an issue? Would be awesome to get this fixed in the GA release so we can proceed with testing out the modules w/out hacks. Also not assuming that every environment uses self-signed certs should have been considered initially On Saturday, March 5, 2016 at 5:06:17

Re: [ansible-project] Ansible 2.0 VMWare modules

2016-01-25 Thread Larry Smith
h. >>> > >>> > On Thursday, January 14, 2016 at 3:35:47 AM UTC-5, Marcus Franke >>> wrote: >>> >> >>> >> Hi, >>> >> >>> >> by default VMware uses a self signed certificate for the vcenter web >>> >

[ansible-project] Ansible Tower Alternative - My OpenSource Project

2016-01-19 Thread Larry Smith
All, I wanted to share and open this up for anyone who may be interested. I started working on an Ansible Tower replacement and then some 6-7 months ago. I worked on it for about 2-3 weeks and put it down and never did much more with it. I have published this to my GitHub repository for anyone

Re: [ansible-project] `run_once` used together with `when` not generating expected result

2016-01-18 Thread Larry Smith
I banged my head against this same thing months ago until it finally clicked on what was going on! On Monday, January 18, 2016 at 10:30:58 AM UTC-5, Brian Coca wrote: > > run_once limits the task to run on the 'first host' in the current > play, so the when only evaluates for that host, if that

[ansible-project] Re: Ansible 2.0 -- the "new" correct way to update??

2016-01-18 Thread Larry Smith
I ended up going down the virtualenv path for this. Covers OSX as well as Linux. I went this path in order to have the ability to switch back and forth between versions in order to test functionality between 1.9.x and 2.0

[ansible-project] Re: Bootstrapping host using ansible ?

2016-01-14 Thread Larry Smith
@Christophe - I bootstrap my hosts with a few roles in which one of those is to upload ssh keys and another one to manager users which I run prior to the SSH key role. https://github.com/mrlesmithjr/ansible-manage-ssh-keys https://github.com/mrlesmithjr/ansible-users On Thursday, January 14,

[ansible-project] Re: best practice for vagrantfile in roles?

2016-01-14 Thread Larry Smith
I have began to include a Vagrantfile to spin up some roles as well. Also starting to include a Dockerfile with some as well. Here are two examples. https://github.com/mrlesmithjr/ansible-snort https://github.com/mrlesmithjr/ansible-graylog On Monday, January 11, 2016 at 11:53:14 PM UTC-5,

[ansible-project] Setting up an Ansible Control Machine

2016-01-14 Thread Larry Smith
@All, I wanted to share a post that I published today and hope that it might be of some use to others. But also I am looking for any feedback that you may have in regards to this post. This post is actually part-1 of a series in which will be coming soon. Thanks! -- You received this message

[ansible-project] Re: Setting up an Ansible Control Machine

2016-01-14 Thread Larry Smith
Might help if I actually attached the link! http://everythingshouldbevirtual.com/ansible-setting-up-an-ansible-control-machine-part-1 On Friday, January 15, 2016 at 1:11:07 AM UTC-5, Larry Smith wrote: > > @All, > I wanted to share a post that I published today and hope that

Re: [ansible-project] Ansible 2.0 VMWare modules

2016-01-14 Thread Larry Smith
hat is possible, never used that module myself. > > Regards, > Marcus > > > Larry Smith <mrles...@gmail.com > schrieb am Mi., 13. Jan. > 2016 18:54: > >> Just getting started messing with these new 2.0 VMWare modules and seem >> to be stuck on an SSL error. Anyon

[ansible-project] Re: Manage SSh-Keys

2015-10-27 Thread Larry Smith
I am using this method here that I created a few weeks ago and it works really well for me. Maybe it will work well for you too? https://github.com/mrlesmithjr/ansible-manage-ssh-keys On Wednesday, October 21, 2015 at 9:06:45 AM UTC-4, DrDth wrote: > > Hello Ansible Community, > > I'm working

[ansible-project] Re: gluster_volume module

2015-08-12 Thread Larry Smith
Michael, Here is an example that I did some time ago using Ansible to setup GlusterFS. It may help you out. http://everythingshouldbevirtual.com/ansible-playbook-glusterfs-apache And also here is a role for GlusterFS that I put out on GitHub.

[ansible-project] Re: How do I properly escape a colon in a lineinfile string

2015-07-27 Thread Larry Smith
Colons need to be added like so insertafter=EOF line=root: unix...@example.com would be as below insertafter=EOF line=root{{ ':' }} unix...@example.com On Monday, July 27, 2015 at 2:41:28 PM UTC-4, Dave Thacker wrote: Sorry, Error message is as follows. ERROR: Syntax Error while

[ansible-project] Re: Ansible with registers using loop

2015-07-22 Thread Larry Smith
Based on what you are looking for this should do it for you. --- - hosts: all gather_facts: true remote_user: remote sudo: true tasks: - name: capture linux_os shell: {{ item }} register: linux_os with_items: - 'uname -a' - 'cat

Re: [ansible-project] vsphere_guest : setting Guest IP address

2015-05-22 Thread Larry Smith
Have a look here and see if it is of any help. I ended up creating scripts to go from phase to phase. Have a look in vm_provisioning. https://github.com/mrlesmithjr/Ansible On Friday, May 22, 2015 at 4:06:37 AM UTC-4, benjamin...@oscaro.com wrote: Both option are open. Le jeudi 21 mai

[ansible-project] Re: Build automation using ESXi, Ansible, Pysphere

2015-05-13 Thread Larry Smith
I recently just went through a similar process. I ended up deploying a TFTP server using Ansible which included the Ubuntu Netboot PXE boot image to provision new VMs. Using this method along with some shell scripts to help along the way has worked out great for me. I will also be uploading

[ansible-project] Re: Build automation using ESXi, Ansible, Pysphere

2015-05-13 Thread Larry Smith
Patel, Have you had any luck on this yet? I have gone down this path about a month or so ago. I am in the process of sharing back on the processes that I have come up with. Below is the flow. 1. Deploy TFTP server via Ansible which includes Ubuntu Netboot and configures all required services