Re: [ansible-project] Re: ansible 2.2.1.0 does not evaluate variable lazily

2017-02-23 Thread Steven Truong
: ansible_distribution_major_version == '6' - include: base_centos7.yml when: ansible_distribution_major_version == '7' On Thursday, February 23, 2017 at 1:02:48 PM UTC-8, Steven Truong wrote: > > Thanks. Brian > > On Thursday, February 23, 2017 at 11:54:15 AM UTC-8, Bria

Re: [ansible-project] Re: ansible 2.2.1.0 does not evaluate variable lazily

2017-02-23 Thread Steven Truong
Thanks. Brian On Thursday, February 23, 2017 at 11:54:15 AM UTC-8, Brian Coca wrote: > > it does evaluate variables lazily, the problem is that play includes > run at compile time, so the variable is needed before the fact > gathering happens. > > > -- > Brian Coca > -- You

[ansible-project] Re: ansible 2.2.1.0 does not evaluate variable lazily

2017-02-23 Thread Steven Truong
got a different error: ERROR! Invalid role definition: None On Thursday, February 23, 2017 at 11:39:31 AM UTC-8, Steven Truong wrote: > > Hi all, > > These are what I am trying: > > base-ng.yml: > --- > - name: Gathering the local facts from tags > hosts: all >

[ansible-project] ansible 2.2.1.0 does not evaluate variable lazily

2017-02-23 Thread Steven Truong
Hi all, These are what I am trying: base-ng.yml: --- - name: Gathering the local facts from tags hosts: all gather_facts: yes roles: - facts - include: "base_centos{{ ansible_distribution_major_version }}.yml" - base_centos7.yml: --- - hosts: all gather_facts: no

[ansible-project] Re: Ansible in the docker container?

2016-11-22 Thread Steven Truong
I did try to reduce the size of Ansible and it is not worth it. I could only reduce around 4 MBs off the total size of the container. On Monday, November 7, 2016 at 5:18:34 PM UTC-8, Steven Truong wrote: > > Hi all, > > Am I being too picky here or just being naive in the ways I

Re: [ansible-project] Ansible in the docker container?

2016-11-07 Thread Steven Truong
, November 7, 2016 at 5:20:02 PM UTC-8, Greg DeKoenigsberg wrote: > > You might want to take a look at Ansible Container: > > https://github.com/ansible/ansible-container > > On Mon, Nov 7, 2016 at 8:18 PM, Steven Truong <djatl...@gmail.com > > wrote: > > Hi all, &

[ansible-project] Ansible in the docker container?

2016-11-07 Thread Steven Truong
Hi all, Am I being too picky here or just being naive in the ways I approach my works with Docker? There are times when I build a Docker image and then when I run the container with some environment variables then my start/entry point scripts still have to replace some config files some

[ansible-project] Yum install latest should take into consideration of release numbers

2016-11-07 Thread Steven Truong
Hi all, I have a situation where I have to resort to using the shell instead of yum module: [root@qa-s1-sm1 ansible]# ansible localhost -c local -m yum -a "name=myrpm-db1.5.1 state=latest enablerepo=repo-Snapshots disablerepo=*" localhost | success >> { "changed": false, "msg": "",

[ansible-project] ec2_group does not honor region or ec2_url parameter

2015-07-10 Thread Steven Truong
Hi all, I am using Ansible 1.9.2 and when I was in /usr/local/lib/python2.7/dist-packages/ansible/modules/core/cloud/amazon and grep for region or ec2_url I did not see any real mention of either these in the codes. grep 'ec2_url\|region' ec2_group.py region: - the EC2 region to use

[ansible-project] Possible feature requrest: start execution at play number in a playbook

2015-06-08 Thread Steven Truong
Hi all, Please excuse for my ignorance if there is a clean way to do the following: hosts [sm] host1 [sw] host2 myplaybook.yml --- - hosts: all roles: - common - hosts: sm roles: - role1 - role2 - hosts: sw roles: - role1 - role3 Assume that I

Re: [ansible-project] Possible feature requrest: start execution at play number in a playbook

2015-06-08 Thread Steven Truong
or an include). On Mon, Jun 8, 2015 at 5:11 PM, Steven Truong djatl...@gmail.com javascript: wrote: The problem here is that role1 is the first role for play #2 and play #3 but I want to start with play #3 and I do not want to edit or comment my playbook. On Monday, June 8, 2015

Re: [ansible-project] Possible feature requrest: start execution at play number in a playbook

2015-06-08 Thread Steven Truong
. On Mon, Jun 8, 2015 at 5:43 PM, Steven Truong djatl...@gmail.com javascript: wrote: Hi Brian, Please excuse me if I am wrong but the problem with using the same ordering and role name in plays is that unless you can provide a scope such as play#.task_name then how do you

Re: [ansible-project] Possible feature requrest: start execution at play number in a playbook

2015-06-08 Thread Steven Truong
The problem here is that role1 is the first role for play #2 and play #3 but I want to start with play #3 and I do not want to edit or comment my playbook. On Monday, June 8, 2015 at 2:05:58 PM UTC-7, Brian Coca wrote: We already have something, not play, but task based --start-at-task,

Re: [ansible-project] Notify handler only one in the same role

2015-05-28 Thread Steven Truong
Note: these tasks are in the same role. On Thursday, May 28, 2015 at 6:05:35 PM UTC-7, Steven Truong wrote: Hi Matt, Here are some tasks that call the same notify and it happened that these files might got changed during the same run. - name: creates hadoop .sh config files template

Re: [ansible-project] Notify handler only one in the same role

2015-05-28 Thread Steven Truong
to this situation. Thank you very much, Steven. On Thursday, May 28, 2015 at 5:10:03 PM UTC-7, Matt Martz wrote: I think you are going to need to show an example of the playbook/role and the output of this happening. On Thursday, May 28, 2015, Steven Truong djatl...@gmail.com javascript: wrote: Hi all

[ansible-project] Notify handler only one in the same role

2015-05-28 Thread Steven Truong
Hi all, I am using ansible 1.9.1 and in the same role I have a couple of notify to the same service to be restarted. Apparently, ansible tries to restart 3-4 times for each notify and that is undesirable. I could do without notify and create register for each task and then at the end I

[ansible-project] Re: Populating an EC2 Security Group rules (using ec2_group modules) with IPs (Pingdom probe servers) gathered dynamically at playbook runtime

2015-03-23 Thread Steven Truong
Thanks for the tips. I tried this and this worked but to only some extents. What do I meant by that and here are the steps that you can repeat to see the potential issue of this ec2_group module. 1. I started out with a vars yml file that has about 9 different IP addresses/32 ---

[ansible-project] Somebody ranted about Ansible using Jinja and YAML.

2014-11-26 Thread Steven Truong
Hi all, I am a fan of Ansible and I just do not see the validity in his complaints. http://thefsb.tumblr.com/post/94644144890/ansible-reminds-me-of-phps-salad-days RTM and follow the best practices and you should be fine. I have used Ansible for almost 3 years and thanks God I do not miss

[ansible-project] Re: Gathering facts just hung to infinity for my AWS hosts

2014-10-10 Thread Steven Truong
. By they way, in our Ansible community, do we have a tool to capture the environments (ansible facts might do) to provide information for troubleshooting. Steven. On Tuesday, October 7, 2014 11:55:12 AM UTC-7, Steven Truong wrote: Hi, I have a mixed or Amazon Linux and CentOS 6.5 on AWS but I

[ansible-project] Re: Gathering facts just hung to infinity for my AWS hosts

2014-10-10 Thread Steven Truong
. On Tuesday, October 7, 2014 11:55:12 AM UTC-7, Steven Truong wrote: Hi, I have a mixed or Amazon Linux and CentOS 6.5 on AWS but I just recently have had this problem. Running the setup scripts directly worked but Ansible gathering facts just hung. # pwd /home/adsymp/.ansible # su

Re: [ansible-project] Gathering facts just hung to infinity for my AWS hosts

2014-10-08 Thread Steven Truong
on and see what may be hung that way? My bet is it could be something mount-related. On Tue, Oct 7, 2014 at 1:55 PM, Steven Truong djatl...@gmail.com javascript: wrote: Hi, I have a mixed or Amazon Linux and CentOS 6.5 on AWS but I just recently have had this problem. Running the setup

[ansible-project] Gathering facts just hung to infinity for my AWS hosts

2014-10-07 Thread Steven Truong
Hi, I have a mixed or Amazon Linux and CentOS 6.5 on AWS but I just recently have had this problem. Running the setup scripts directly worked but Ansible gathering facts just hung. # pwd /home/adsymp/.ansible # su root -c /bin/sh -c 'echo SUDO-SUCCESS-dhyqcckwxzuthyzxqniggbjvfxvuewha;

Re: [ansible-project] ec2_facts hung

2014-09-09 Thread Steven Truong
). On Mon, Sep 8, 2014 at 8:35 PM, Steven Truong djatl...@gmail.com javascript: wrote: Hi all, The subject is misleading but I would like to get some helps on how to troubleshoot this or figure out what can be done. I have about 70 instances with tag kafkaproducer=yes and I want to do

[ansible-project] Info: ec2_lb with access_key/secret_key specified but could not perform elasticloadbalancing:DescribeLoadBalancers

2014-09-09 Thread Steven Truong
Hi all, I have a play book that just simply go and add instances to my ELB but apparently the user's keys specified were not authorized to do the DescribeLoadBalancers. This user has a policy attached to it that allows to have full access to this ELB. Task: - name: Instance re-register

[ansible-project] ec2_facts hung

2014-09-08 Thread Steven Truong
Hi all, The subject is misleading but I would like to get some helps on how to troubleshoot this or figure out what can be done. I have about 70 instances with tag kafkaproducer=yes and I want to do rolling updates to them but my playbook went nowhere with ec2_facts. I ran the module

[ansible-project] Do-until seems not to work with delegate

2014-08-29 Thread Steven Truong
Hi all, I have this task: - name: wait for http port 80 return ok for 1 minutes shell: /usr/local/bin/check_health /health 80 {{ inventory_hostname }} delegate_to: {{ item }} with_items: groups.sc2_docker_lb register: output until: output.stdout.find(Ready to go) != -1

Re: [ansible-project] Would it be nice to have bittorrent as a way to copy files around?

2014-02-03 Thread Steven Truong
it's a pair of Galaxy roles? On Mon, Feb 3, 2014 at 6:27 PM, Steven Truong djatlan...@gmail.comwrote: Hi all, Included is a link to a talk that described using Fabric and bittorrent. If we could have this feature, Ansible will rule the world. http://in.pycon.org/2010/talks/63-deployment

[ansible-project] Re: Accessing variables of other hosts does not work (for me) on 1.4

2013-12-02 Thread Steven Truong
%} So for some strange reasons, ansible_default_ipv4 , ansible_eth0 are not available. Steven. On Monday, December 2, 2013 11:48:04 AM UTC-8, Steven Truong wrote: Hi all, Using the info from the document, I tried this but this totally does not work. I tried a few different varibles

[ansible-project] Please point me to the right docs for Ansible templates

2013-11-26 Thread Steven Truong
Hi all, Please forgive my ignorance if somebody already asked this and there are already places somewhere that can help me with my issues. 1. I would love to know all the things that I can do in templates like the for loops for host in groups_names and the likes. 2. Please separate the docs