[ansible-project] Re: Failed to find required executable mysql

2015-11-28 Thread Dan Vaida
try to output the PATH var. looks like Ansible is using one that doesn't have mysql in it. On Wednesday, 20 May 2015 17:56:42 UTC+2, Albert Mikaelyan wrote: > > Hey guys, > > All I'm trying to do, is import a schema in case a database does not exist > yet > > ansible --version > ansible 1.9.1

[ansible-project] Re: Whitespace in Value for INI_FILE

2015-11-28 Thread Dan Vaida
Try this: - name: Create 'config.ini' to include necessary values ini_file: > dest=./testconfig.ini section="{{ item.section }}" option="{{ item.option }}" value="{{ item.value }}" with_items: - { section: 'General', option: 'test1', value: 'value2' } -

[ansible-project] Re: skipping: no hosts matched

2015-07-21 Thread Dan Vaida
How old is your cache? Do you also have AWS CLI installed? If so, are the credentials consistent with the boto credentials/env vars? Any customizations made to the ec2.ini file? Can you post the playbook? Can you add *--list-hosts* to your command and post the output here? What about running

[ansible-project] Re: Recovering from failure in handlers

2015-07-21 Thread Dan Vaida
you can try *ignore_errors: yes *in your handler. On Thursday, 7 May 2015 16:25:05 UTC+2, Shawn Ferry wrote: I've recently experienced the case where a handler has failed stopping the remaining handler execution in a playbook. Once the triggering change has completed subsequent playbook

Re: [ansible-project] getting values from returned data (elasticache endpoint)

2015-07-20 Thread Dan Vaida
FWIW, this might come in handy if you're using ElastiCache: https://github.com/ansible/ansible/pull/11261 My pal decided that this might ease our work and boy he was right :) On Tuesday, 5 May 2015 01:34:39 UTC+2, DenMat Gone wrote: On Tuesday, May 5, 2015 at 6:32:21 AM UTC+10, Brian Coca

Re: [ansible-project] retrieving endpoint from data in the elasticache module

2015-07-20 Thread Dan Vaida
see here: https://groups.google.com/d/msg/ansible-project/qJ2UNWuaIJk/-S0GyDfTbPoJ On Tuesday, 5 May 2015 02:12:31 UTC+2, DenMat Gone wrote: Thanks Matt, You're correct. On Tuesday, May 5, 2015 at 12:19:16 AM UTC+10, Matt Martz wrote: Case matters when accessing keys. Instead of

[ansible-project] Re: Log the actual playbook contents?

2015-06-19 Thread Dan Vaida
Hi Mark, One of the talks that were at our first Ansible meetups here in Berlin was about this very topic more or less. The guys were using an Ansible callback plugin to save the playbook run output in Elasticsearch. I'm not sure if they managed to opensource their work yet but here's another

[ansible-project] Re: Set fact for another group in playbook

2015-06-19 Thread Dan Vaida
Use Ansible's dynamic inventory and access the hostname like so: {{ hostvars[groups['rds_instance_name_goes_here][0]].ec2__address }} Make sure the instance is set to publicly available and the security group around it allows such connections. On Sunday, 26 April 2015 11:56:22 UTC+2, Sergei

[ansible-project] Re: with_inventory_hostnames and Ansible Vault

2015-06-19 Thread Dan Vaida
I think you would have a better shot at an answer if you'd ask here: https://groups.google.com/forum/#!forum/ansible-devel On Tuesday, 28 April 2015 22:52:30 UTC+2, kly...@squarespace.com wrote: I am trying to use the with_inventory_hostnames lookup plugin, but it keeps failing with the

Re: [ansible-project] Re: print template variable

2015-05-17 Thread Dan Vaida
If I recall correctly, the --diff flag might come in handy in your case. -- 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] Re: lineinfile when two lines are the same

2015-03-29 Thread Dan Vaida
Would it be acceptable to template that config file? Perhaps save that chunk only, in a templated file that would be later on included. On Sunday, 29 March 2015 06:34:20 UTC+2, Vince Skahan wrote: I'm installing a piece of software that requires me to edit a user=xyz line into a monolithic

[ansible-project] Re: conditionally running tasks

2015-03-28 Thread Dan Vaida
Hi Vince, Jonathan's approach is also valid. Just replace include with include_vars and it will work. The group_by approach is pretty neat as it doesn't produce the pesky skipping entries in the run output. A useful read on precedence:

[ansible-project] Re: Do not restart service if it was just started?

2015-03-28 Thread Dan Vaida
The template module ensures idempotence. So, if there is no diff between the files and the templates, the task should not return changed, thus not invoking the handler. However, sometimes things may change on the server (i.e. permissions, ownership) because of various reasons. For that, you can

[ansible-project] Re: rsync file permissions

2015-03-28 Thread Dan Vaida
try to set owner=no group=no in the synchronize task. The uid gid from your host are not reflected on your target system. Also, you could condense like: file: path=/var/www/html/munki_repo/{{ item }} state=directory owner=munki group=munki recurse=yes with_items: - catalogs - icons On

[ansible-project] Re: Ansible --diff --check only display changes

2015-03-28 Thread Dan Vaida
Unfortunately, some modules don't support --diff and --check. Yes, I believe a callback plugin would be the best way to do this. Not aware of anything like that so far, but I've seen people pushing the output to Elasticsearch, APIs, XLS files and other crazy things :) One of the plugins that I

[ansible-project] Re: On the same server, how to run a role twice with different arguments

2015-03-28 Thread Dan Vaida
Obvious for some, helpful for others, a more condensed version could look like: --- - name: SomePlaybook hosts: yourgroup roles: - { role: yourrole, install_path: [ '/opt/install1', '/opt/install2' ] } On Tuesday, 24 March 2015 00:03:22 UTC+1, Olivier Lauret wrote: Thank you

[ansible-project] Re: How access variable from one playbook in the other playbook?

2015-03-25 Thread Dan Vaida
Variable referencing in variable files is not something supported. Try referencing the var like this (in the task): hostvars[groups['db'][0]].db_address That is for general, cross-groups vars sharing. But for what you need, you could use hostvars['db'].ansible_eth2.ipv4.address and forget about

[ansible-project] Re: How to create a variable with value based on some condition?

2015-03-25 Thread Dan Vaida
There are some ways to go around this. One would be to have two tasks which would use the when condition to find the distro version and install the relevant package. If this is too much overhead, depending on your roles, you could use two tasks with set_fact and work your way up from there in

[ansible-project] Re: Ansible read after write file in playbooks

2015-03-25 Thread Dan Vaida
I'd register the data in a variable and use it during the playbook run. You can save it to a file during the playbook run as well. On Monday, 16 March 2015 18:08:04 UTC+1, Rahul Mehrotra wrote: Hi Everyone, I am working on a project using Ansible which requires me to write some data to a

Re: [ansible-project] Re: linode_module not working

2015-03-23 Thread Dan Vaida
, Dan Vaida vaid...@gmail.com javascript: wrote: You're missing indentation. Take a look at the examples on the module page. Here's a good explanation: http://yaml.org/spec/current.html#id2519916 On Wednesday, 18 March 2015 19:38:02 UTC+1, Michael Bushey wrote: I'm attempting

[ansible-project] Re: linode_module not working

2015-03-22 Thread Dan Vaida
You're missing indentation. Take a look at the examples on the module page. Here's a good explanation: http://yaml.org/spec/current.html#id2519916 On Wednesday, 18 March 2015 19:38:02 UTC+1, Michael Bushey wrote: I'm attempting to use the first example on page:

[ansible-project] Re: yet another question about loops

2015-03-21 Thread Dan Vaida
There are various ways you could go about doing this. Here's one of them. users.yml --- - hosts: all sudo: yes tasks: - name: add users user: name={{ item.key }} comment={{ item.value.comment }} when: inventory_hostname in groups.{{ item.value.hosts|join(',') }}

[ansible-project] Re: registered variables and ec2 with_items on private and public subnet

2015-03-14 Thread Dan Vaida
I came across this kind of randomness myself: https://groups.google.com/forum/#!topic/ansible-project/Xy3kt0Mr8YY You can set a fact with a sorted list and use it in your next tasks to have predictability. On Wednesday, 11 March 2015 14:48:41 UTC+1, Arbab Nazar wrote: Hi, Below is the

[ansible-project] Re: How do I run ansible command on non-win/lin host ?

2015-03-07 Thread Dan Vaida
It depends on the SSH implementation on such devices. This is a fairly common situation with network devices, etc. which most of the times come with a minimalistic SSH. I remembered a thread that was quite good at detailing some gotchas in these use cases of Ansible. I am linking to Mark's

[ansible-project] Re: dumping host_vars - how do I filter out sensitive data?

2015-03-06 Thread Dan Vaida
I don't think there's a quick solution for this. I believe you'd need to write your own filter plugin: http://docs.ansible.com/developing_plugins.html#filter-plugins On Thursday, 5 March 2015 16:23:58 UTC+1, Larry Fast wrote: I'm using the following jinja2 code to dump my hostvars for

Re: [ansible-project] Re: ec2_vpc default gw not working?

2015-02-28 Thread Dan Vaida
suggesting that True/False values wouldn't work, hence you get no error. Hope this helps, Dan. On Saturday, 28 February 2015 12:52:13 UTC+1, Pablo Escobar wrote: 2015-02-26 10:41 GMT+01:00 Dan Vaida vaid...@gmail.com javascript:: So you're saying that after running that the IGW

[ansible-project] Re: version 1.9: wait_for suck in wait until timeout, it cannot wake up after the host can be accessed by ssh

2015-02-27 Thread Dan Vaida
Can you post the output when running with -? On Friday, 27 February 2015 09:57:41 UTC+1, nobody wrote: sorry, it does not seem able to detect the host back after the reboot, any workaround or alternative module to wait reboot? On Friday, February 27, 2015 at 7:56:12 PM UTC+11, nobody

Re: [ansible-project] Ansible when creating an RDS instance: AttributeError: 'dict' object has no attribute 'split'

2015-02-26 Thread Dan Vaida
Try this instead: vpc_security_groups: {{ sg_mysql.group_id }} On Thursday, 26 February 2015 17:40:41 UTC+1, Rahul Mehrotra wrote: I am not able to figure out which specific vars is bad... Is there a problem of file locking ??? Because there is a sg_mysql.yml file being called before

[ansible-project] Re: version 0.9: wait_for suck in wait until timeout, it cannot wake up after the host can be accessed by ssh

2015-02-26 Thread Dan Vaida
Unless there's some other problem in the mix, this is enough to work: local_action: wait_for state=started host={{ inventory_hostname }} port=22 On Thursday, 26 February 2015 12:41:31 UTC+1, Yariv Graf wrote: Hi, Try: - name: wait for SSH local_action: wait_for port=22 host={{

[ansible-project] Re: ec2_vpc default gw not working?

2015-02-26 Thread Dan Vaida
So you're saying that after running that the IGW is not associated with your subnet(s)? Also, can you confirm that the routing tables have the correct subnets associations? On Tuesday, 24 February 2015 21:37:04 UTC+1, Pablo Escobar wrote: Hi, I have been doing some tests to deploy a ec2 vpc

[ansible-project] Re: Review of the upcoming Vagrant Ansible Local Provisioner

2015-02-23 Thread Dan Vaida
I salute the initiative and effort. FWIW, I've been using Vagrant with the normal Ansible provisioner quite successfully for about a year now. Never felt the need of having something like ansible_local provisioner. Was briefly looking at a few arguments behind this and one was going about

[ansible-project] Re: multi-platform role support: setting vars according to OS

2015-02-21 Thread Dan Vaida
Using that approach, the more platforms your hosts will sport, the more skipping you'll see in your playbook runs. I'd use the group_by module: http://docs.ansible.com/group_by_module.html and use the ansible_distribution fact as a key. Hope that helps. On Friday, 20 February 2015 20:01:39

[ansible-project] Re: ec2 parallel launch

2015-02-21 Thread Dan Vaida
What do you mean by slow? Just use *register *and in a next task you can get the IP of the launched instances by parsing *instances* from the registered variable. On Wednesday, 18 February 2015 12:46:46 UTC+1, Alexey Wasilyev wrote: Hello! Is there any way to launch multiple different vm's

Re: [ansible-project] ec2 parallel launch

2015-02-21 Thread Dan Vaida
from instance, launched with wait=no? On Sat, Feb 21, 2015 at 10:10 PM, Dan Vaida vaida@gmail.com wrote: Hmm… There must be something else happening there. I’m launching 5 instances using the count parameter in about 30s. I must say, there are some gotchas while using the cloud modules

[ansible-project] Re: error in module docs

2015-02-21 Thread Dan Vaida
Not to intrude, but I think you will have more luck in here: https://groups.google.com/forum/#!forum/ansible-devel On Saturday, 21 February 2015 01:43:36 UTC+1, pixel fairy wrote: forgot a few things. this is on os x 10.8, using ansible checked out from github. $ uname -a Darwin

Re: [ansible-project] ec2 parallel launch

2015-02-21 Thread Dan Vaida
instances with wait=yes - they start one by one, ~1 instance per minute. I need to launch 10 instances, so it tooks 10 minutes. Can you explain your idea with register with few lines of code? On Saturday, February 21, 2015 at 3:11:31 PM UTC+3, Dan Vaida wrote: What do you mean by slow

[ansible-project] Re: Create an ec2 instance failed with ec2: error: unrecognized arguments

2015-02-21 Thread Dan Vaida
For spinning up instances in AWS you don't need to tell ansible to use the dynamic inventory script. That is something you might want to use later on. Try unsetting that environment variable. Also, when running the playbook, you are telling it to use the inventory file */etc/ansible/hosts. *Mind

[ansible-project] Re: group_var not visible in role?

2015-02-21 Thread Dan Vaida
I think your other thread to which I replied is related to this as well. Perhaps this example would be more helpful: https://github.com/danvaida/Ansible-Berlin-Meetup/blob/master/ansible-intro-examples/ghost.yml On Friday, 20 February 2015 23:16:37 UTC+1, Nusenu wrote: Hi, I'm having the

[ansible-project] Re: ec2_vol create dynamic number

2015-02-20 Thread Dan Vaida
Although not the nicest way to do it, I recon the with_sequence could come in handy: http://docs.ansible.com/playbooks_loops.html#looping-over-integer-sequences On Wednesday, 18 February 2015 18:07:21 UTC+1, Mark Olliver wrote: Hi, How can I extend the following code to allow me to specify

[ansible-project] Re: AttributeError: 'NoneType' object has no attribute 'group'

2015-02-20 Thread Dan Vaida
Just checked your example and it worked nicely. What ansible version do you have? On Thursday, 19 February 2015 10:50:38 UTC+1, shoq...@gmail.com wrote: Hi, I use Ansible to manage my servers. One of my hosts can't be managed by Ansible, I get an error but he's configured like some other

Re: [ansible-project] ec2 group module, support for icmp protocol

2015-02-16 Thread Dan Vaida
:03:29 PM UTC+1, Dan Vaida wrote: I guess you misunderstood how ICMP works. Try this: - proto: icmp from_port: -1 to_port: -1 On Monday, 16 February 2015 12:06:50 UTC+1, Markus Klems wrote: Hi, I tried the solution as follows but it does not work for me

Re: [ansible-project] ec2 group module, support for icmp protocol

2015-02-16 Thread Dan Vaida
I guess you misunderstood how ICMP works. Try this: - proto: icmp from_port: -1 to_port: -1 On Monday, 16 February 2015 12:06:50 UTC+1, Markus Klems wrote: Hi, I tried the solution as follows but it does not work for me: - proto: icmp from_port: 0

[ansible-project] Re: Problem with resource_tags

2015-02-09 Thread Dan Vaida
Try this: - name: Create a VPC local_action: module: ec2_vpc state: present cidr_block: 10.0.0.0/16 resource_tags: { Environment: Development } subnets: - cidr: 10.0.0.0/24 az: us-east-1a resource_tags: { Environment:Development, Name : Public Subnet }

Re: [ansible-project] template error while templating string: unexpected char u'\\' at 127

2015-02-08 Thread Dan Vaida
Have you tried the replace module? Would it be feasible for you to template that file? On Sunday, 8 February 2015 14:19:10 UTC+1, cdwer...@gmail.com wrote: On Sunday, February 8, 2015 at 9:26:30 PM UTC+11, Giovanni Tirloni wrote: On Fri, 06 Feb 2015 18:38 -0800, cdwer...@gmail.com wrote:

[ansible-project] Re: ec2_tag does not take AWS credential keys from environment variable

2015-02-03 Thread Dan Vaida
Yeah... and if I'm not mistaking the Issue should be created here: https://github.com/ansible/ansible-modules-core On Tuesday, 3 February 2015 16:48:20 UTC+1, Pradeep Bhadani wrote: It seems that there is already an open bug : https://github.com/ansible/ansible/issues/9984 On Tuesday, 3

[ansible-project] Re: dumping all variables to a file for a reproducible run

2015-02-02 Thread Dan Vaida
I would try to go by including variables from a file with --extra-vars @some_file.json : http://docs.ansible.com/playbooks_variables.html#passing-variables-on-the-command-line Then you wouldn't need to worry about dumping playbook runtime variables from different nesting layers. You would

[ansible-project] Re: Pulling out the output of a playbook called with in another playbook

2015-01-26 Thread Dan Vaida
I would use register. Take a look at it here: http://docs.ansible.com/playbooks_conditionals.html#register-variables On Monday, 26 January 2015 11:23:47 UTC+1, Fazal-e-Rehman Khan wrote: Dear All, Is there any way of pulling out the output of an ansible-playbook called by command module in

Re: [ansible-project] Different SSH keys for each host.

2015-01-21 Thread Dan Vaida
I don't believe it's possible to have that per host, via Ansible. But you could set it up in your ssh config. There were a few other threads in this mailing list about this topic. One would be: https://groups.google.com/d/msg/ansible-project/8p3XWlo83ho/Q1SflaZ9dyAJ On Wednesday, 21 January

[ansible-project] Re: Task performs work despite conditional

2015-01-17 Thread Dan Vaida
Try with_file: {{ lookup('file', 'path/goes/here' ) }} On Saturday, 17 January 2015 17:04:47 UTC+1, James Morgan wrote: Hi, I have the following task - name: Create ec2 key pair using local key when: ec2_key_material is defined ec2_key: name: {{ ec2_key_name }} region: {{

Re: [ansible-project] Re: Task performs work despite conditional

2015-01-17 Thread Dan Vaida
If you read the documentation page of this module careful enough, you will see that, in fact, the “{{ item }}” comes from the with_file, not from your vars. That is the material :) On Jan 17, 2015, at 6:13 PM, James Morgan jamesdmor...@gmail.com wrote: Hi, That gives me the following

Re: [ansible-project] Re: Add EC2 security group - only if it not already exists

2015-01-15 Thread Dan Vaida
As Nicolas mentioned, you will get an error when you are trying to create the security group through Ansible and that security group already exists and was created manually/by other tool. If you already created the SG with Ansible and want to update it through Ansible, the task is going to report

Re: [ansible-project] Re: Variables in when statement

2015-01-14 Thread Dan Vaida
Hi, I got what you said. However, I must repeat myself: passing tags to the include task will tag all tasks in the included file, it will NOT call ONLY the tasks that have that specific tag. On 14 January 2015 at 16:35, Wojciech Korzenny wkorze...@gmail.com wrote: Cheers Dan for your answer.

[ansible-project] Re: Iterate over inventory group

2015-01-14 Thread Dan Vaida
for the second, 02am for the third, etc... Le mardi 13 janvier 2015 20:47:22 UTC+1, Dan Vaida a écrit : to iterate over a hosts group you need with_items: groups['mysql'] instead of with_dict On Tuesday, 13 January 2015 09:41:07 UTC+1, Laurent Goussard wrote: Hello, I try to setup a cron task using

[ansible-project] Re: Variables in when statement

2015-01-13 Thread Dan Vaida
The inclusion of tagged tasks doesn't work like you're expecting in your example. That will simply tag all tasks in the included file. It won't include the tasks that are tagged like that. You want something like: cat hosts [localhost] 127.0.0.1 cat playbook.yml --- - hosts: localhost

Re: [ansible-project] ec2 elb set subnets from vpc return value

2015-01-13 Thread Dan Vaida
Try with csds_vpc.subnets[0].id On Monday, 12 January 2015 01:05:22 UTC+1, Stefan Nietert wrote: When doing this I get: One or more undefined variables: 'item' is undefined It did work for you? On Thursday, September 25, 2014 at 4:34:25 AM UTC+2, Steven Ringo wrote: Hi, Try this:

[ansible-project] Re: Creating and distributing ssh keys

2015-01-13 Thread Dan Vaida
+1, Mark Maas wrote: On Sunday, January 11, 2015 at 12:02:10 PM UTC+1, Dan Vaida wrote: as I see it, based on your input, you have two problems: 1. you're creating the users and generating unique keys on each of the target hosts Correct, and that's what I'm trying to get. 2. you're

[ansible-project] Re: Iterate over inventory group

2015-01-13 Thread Dan Vaida
to iterate over a hosts group you need with_items: groups['mysql'] instead of with_dict On Tuesday, 13 January 2015 09:41:07 UTC+1, Laurent Goussard wrote: Hello, I try to setup a cron task using ansible (indeed) on my db slave pool. This cron task is supposed to stop the replication

[ansible-project] Re: Creating and Naming a Cluster of EC2 Servers Using Ansible

2015-01-10 Thread Dan Vaida
I'm doing this by registering the results of the ec2 provisioning task and then cycle through the hosts in a subsequent task for creating the dns records. On Monday, 29 December 2014 17:09:03 UTC+1, Navid Paya wrote: Hi I'm trying to automate creating and destroying our staging environment.

Re: [ansible-project] Re: Creating and Naming a Cluster of EC2 Servers Using Ansible

2015-01-10 Thread Dan Vaida
Hope you can get some inspiration from here: https://github.com/danvaida/Atlassian-Stash-Ansible/blob/master/ec2.yml On Saturday, 10 January 2015 15:40:36 UTC+1, Dan Vaida wrote: On the run now but will share this later. Btw, are you really missing the task of allocating the EIPs

[ansible-project] Re: Ignore error if --extra-vars is not given

2015-01-10 Thread Dan Vaida
If I got your question right, you should be able to use http://docs.ansible.com/playbooks_roles.html#role-default-variables On Monday, 29 December 2014 06:02:05 UTC+1, Fazal-e-Rehman Khan wrote: Dear All, Is there a way to ignore errors if extra-vars are not given at the command line. In

[ansible-project] Re: Provisioning a NAT via ec2_vpc

2015-01-10 Thread Dan Vaida
*subnets. Yes, that's right. the ec2_vpc module doesn't do NAT related things. you'll have to launch another EC2 instance for that. take a look here: https://github.com/dfederlein/ansible-aws/blob/master/vpc/ec2_vpc.yml it requires having the aws cli tools set up on your local host. On Monday,

Re: [ansible-project] Ad-Hoc Works; Playbook Works. Wait... No it doesn't.

2015-01-10 Thread Dan Vaida
FWIW, the template module already knows where to look for the template files: templates/ Same concept is true for other modules like copy which looks for the files in the files/ folder. Now, if you are willing to sacrifice the name of the task and make it a little bit more broad, you could use

[ansible-project] Re: stopping daemons before apt-get remove?

2015-01-05 Thread Dan Vaida
I'd construct a list var with the packages names and pass it to two tasks: first one would stop and disable the services and the second one would remove the packages. Some packages are stopping the daemons as part of the uninstall/purge, some don't. You could also do a 'dpkg-query -L

[ansible-project] Re: Ansible Jumphost + MFA

2015-01-04 Thread Dan Vaida
This sounds like what I had to do about 2 years ago to get to PCI-DSS level SAQ D :) Back then, I simply used the scratch codes to go through. Your idea is more elegant, though. Thanks for sharing! On Friday, 12 December 2014 22:53:51 UTC+1, Nico K. wrote: In case someone wonders, I solved

[ansible-project] Re: Wildcard in group of hosts

2015-01-04 Thread Dan Vaida
Have a look at: http://docs.ansible.com/intro_patterns.html#patterns On Monday, 15 December 2014 16:13:18 UTC+1, Guillaume Subiron wrote: Hi, I manage multiple clients, and my servers are named using the following pattern: - foo-db01 - foo-www01 - bar-db01 - bar-mail01 - … I

[ansible-project] Re: template source file not getting from closest role

2015-01-04 Thread Dan Vaida
What is the role dependency in your case? Depending on how your roles are written+called this can be expected (i.e. the file gets templated by role B and then overwritten by A). Share your code if you need more help. On Thursday, 18 December 2014 06:46:38 UTC+1, Steve Kieu wrote: Hi All, I

[ansible-project] Re: template failure on a rather odd looking file (for apache+logstash)

2015-01-03 Thread Dan Vaida
Can you show the contents of templates/etc/httpd/conf/httpd.conf.j2? Seems you're cat'ing the file directly on the target host. BTW, when using the template module you don't need to specify 'templates/' in the src. Same for the copy module with the 'files/'), etc. On Friday, 5 December 2014

[ansible-project] Re: Escaping special characters inside variable?

2015-01-03 Thread Dan Vaida
When you say you're sure, is that because you tried 'debug: var=result'? Furthermore, are you doing something else with Postgres' port in your iptables rule? If not, simply remove the first task and then in the second task, remove everything before '-p\ tcp...' from the regexp and you should

[ansible-project] Re: 127.0.0.1 and localhost in synchronize module

2015-01-03 Thread Dan Vaida
Here's what I do to gain some other benefits: - I let Vagrant dynamically generate the hosts file that is later used by Ansible. - the Vagrant boxes use a different subnet thus not conflicting with the corner case described above. On Wednesday, 13 August 2014 16:59:52 UTC+2, Jeppe Toustrup

[ansible-project] Re: Retrieving vpc_subnet_id by resource tags

2014-12-29 Thread Dan Vaida
Hi Lorin, It looks like your question is similar to mine: https://groups.google.com/d/msg/ansible-project/Xy3kt0Mr8YY/eB6TqMN0Y3EJ Didn't had the time to explore potential fixes yet though... Perhaps you have some updates from your side. Cheers, Dan. On Friday, 14 November 2014 04:47:03

Re: [ansible-project] rds module sets Postgres to listen on port 3306 if not specified

2014-12-05 Thread Dan Vaida
not sure if I can tackle this as well any time soon. On 4 December 2014 at 21:47, James Cammarata jcammar...@ansible.com wrote: Hi Dan, could you please open an issue on GitHub in the ansible/ansible-modules-core for this? Thanks! On Thu, Dec 4, 2014 at 2:22 PM, Dan Vaida vaida@gmail.com

Re: [ansible-project] Creating a RDS subnet group using with_items + registered vpc variable

2014-12-04 Thread Dan Vaida
It's quite frustrating that the 'rds_subnet_group' produces too few debug info: TASK: debug var=rds_sg_creation --- \ ^__^ \ (oo)\___ (__)\ )\/\ ||w | || || ok: [localhost]

[ansible-project] rds module sets Postgres to listen on port 3306 if not specified

2014-12-04 Thread Dan Vaida
Ansible version is 1.9 -- 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

[ansible-project] Re: launching a batch of EC2s at once (to benefit from placement group), each EC2 with its own SG

2014-12-02 Thread Dan Vaida
11:20:33 UTC+1, Dan Vaida wrote: A possible approach that I will try today is: 1. create the VPC 2. create the security groups with their custom settings within the VPC *and a dummy one* 3. launch the WHOLE batch of EC2s at once, *in the dummy SG* *4. have some subsequent tasks moving random

[ansible-project] should ec2_group module have the description as required?

2014-12-02 Thread Dan Vaida
Hello everyone, I'm just trying to do some cleaning up as part of my playbooks and one task should go around and remove dummy security group(s). Because of this case, I don't see the utility of the 'description' parameter as being mandatory. One step further, I'd rather see the module support

[ansible-project] Re: deploying with ansible

2014-11-30 Thread Dan Vaida
, 2014 at 8:27 AM, Dan Vaida vaid...@gmail.com wrote: That's right. But I was referring to another thing. Basically, I'm trying to use their deployment role as a whole, to perform certain operations only on certain hosts, while leaving all the hosts/groups, listed in the the main

Re: [ansible-project] recursively create symlinks with relative paths

2014-11-26 Thread Dan Vaida
- file: src=... state=absent with_items: disable_sites On Tue, Aug 5, 2014 at 1:22 PM, Dan Vaida vaid...@gmail.com javascript: wrote: Hello, I also know some non-ansible ways of doing this, but I am interested to see if it can be done entirely in Ansible. Thanks. On Aug 5, 2014

[ansible-project] Re: launching a batch of EC2s at once (to benefit from placement group), each EC2 with its own SG

2014-11-26 Thread Dan Vaida
specs) in different SGs.* *5. play around with the EC2s based on their SG membership* On Tuesday, 25 November 2014 18:55:58 UTC+1, Dan Vaida wrote: Hello all, Was just curious how to accomplish this. Right now I am launching all instances at once, so I am maximizing my chances to have all

Re: [ansible-project] Allocating a private IP for an EC2 instance fails

2014-11-26 Thread Dan Vaida
13, 2014 at 5:59 AM, Dan Vaida vaid...@gmail.com javascript: wrote: Hello all, I am creating a VPC with two subnets, a security group and trying to use those for launching an EC2 with a private IP address from one of the freshly created subnets. The problem seems

[ansible-project] launching a batch of EC2s at once (to benefit from placement group), each EC2 with its own SG

2014-11-25 Thread Dan Vaida
Hello all, Was just curious how to accomplish this. Right now I am launching all instances at once, so I am maximizing my chances to have all the EC2s as close as possible. As AWS and common sense advises, it's desirable to have it like so, any subsequent EC2 launch targeting the same

[ansible-project] Re: ec2 module returning One or more undefined variables: 'item' is undefined

2014-11-14 Thread Dan Vaida
Can you post your playbook(s)? On Tuesday, 30 September 2014 18:03:52 UTC+2, Andy Raj wrote: Hello Fellow ansible users, I am new to ansible, using version 1.7.2 on Mac OSx. I am trying to launch aws instances and install our code on them as part of an automated deployment process. I am

[ansible-project] Re: Allocating a private IP for an EC2 instance fails

2014-11-13 Thread Dan Vaida
workaround as it will work only once because of the subsequent runs (lack of a Subnet in the VPC module *deletes* the Subnet if it exists and not used). On Thursday, 13 November 2014 11:59:30 UTC+1, Dan Vaida wrote: Hello all, I am creating a VPC with two subnets, a security group and trying to use

[ansible-project] collectively querying/combining results of the setup and ec2_facts modules

2014-11-11 Thread Dan Vaida
Greetings everyone! For a given reason, I need to handle some Route53 records for my EC2's EIPs. The instances are part of the [all] group in my hosts file. Obviously, the 'setup' module is not aware of EIPs. But the ec2_facts module is. Right now, I'm trying to wrap my head around this

[ansible-project] Re: Generate hostlist.conf for Munin

2014-11-11 Thread Dan Vaida
I think the problem could be caused by the delegate_to Have you tried running the playbook without it? i.e. let the Munin master node to generate the conf file dynamically by being the one that connects to each Munin node to fill in the template. On Friday, 26 September 2014 13:52:13 UTC+2,

Re: [ansible-project] Noob Question: Automating Playbook Execution

2014-11-09 Thread Dan Vaida
I think you might find the answer here: https://groups.google.com/forum/#!topic/ansible-project/wzG5BMC7h_w On Saturday, 20 September 2014 22:14:58 UTC+2, Naween Ghimire wrote: I am currently trying to run integrate ansible runs through jenkins. If i use the --extra-vars option of ansible in

Re: [ansible-project] Request to improve RDS module to use boto rds2

2014-08-27 Thread Dan Vaida
Ah-ha! This might very well be the cause for my issues: https://github.com/ansible/ansible/issues/7958 https://github.com/ansible/ansible/issues/7952 On Monday, 25 August 2014 03:41:26 UTC+2, Will Thames wrote: Digging up an old thread (as I came across

[ansible-project] Re: Parentheses in lineinfile line argument

2014-08-27 Thread Dan Vaida
May I suggest the following way of doing it: - name: mounting shares mount: name={{ item.name }} src={{ item.src }} fstype=nfs opts={{ item.opts }} state=mounted with_items: - { name: '/root/nfs',src: 'hostname:/ExportName',opts: 'defaults' } [...] tags: nfs The mount

Re: [ansible-project] Symbolic file modes now supported in relevant modules

2014-08-27 Thread Dan Vaida
Would be curious to see how would this handle demoting/downgrading permissions with the above presented syntax. Something like u=-x perhaps(?) On Wednesday, 27 August 2014 06:15:00 UTC+2, James Cammarata wrote: Sticky bits and setuid/setgid all work as expected currently: o+t (sticky bit)

Re: [ansible-project] Request to improve RDS module to use boto rds2

2014-08-27 Thread Dan Vaida
touched some lines at all (mostly the module declaration). I am reusing a lot of the existing logic. Will On 27 Aug 2014, at 19:33, Dan Vaida vaida@gmail.com wrote: Ah-ha! This might very well be the cause for my issues: https://github.com/ansible/ansible/issues/7958; https://github.com

[ansible-project] Re: Manipulating EC2 instance storage

2014-08-22 Thread Dan Vaida
4:09:01 PM UTC-4, Dan Vaida wrote: Hello again, I managed to resize the root device by adjusting the volumes parameter like so: volumes: - device_name: /dev/sda volume_size: 20 device_type: gp2 Hint was found here: New SSD-Backed Elastic Block Storage http

[ansible-project] Re: Created an elasticache via Ansible - Get an Error Use of cache security groups is not permitted in this API version for your account

2014-08-18 Thread Dan Vaida
For what it's worth, I get a different type of error message when I try to run something similar with Redis. https://github.com/ansible/ansible/issues/7986 On Saturday, 16 August 2014 02:03:11 UTC+2, Shih Oon Liong wrote: I was trying to provision a new memcached server via ansible - name:

Re: [ansible-project] deploying with ansible

2014-08-14 Thread Dan Vaida
Hello, Again, a very BIG thank you for your efforts on the deploy module. I would like to share my suggestion, perhaps as an idea to generate a future pull request: With capistrano, it is possible to run some of the tasks only on specific hosts. Any plans for such a feature? Problem is that in

Re: [ansible-project] deploying with ansible

2014-08-14 Thread Dan Vaida
? This has been a feature in Ansible since day 1. - hosts: hostnames - hosts: otherhostnames Etc On Thu, Aug 14, 2014 at 7:42 AM, Dan Vaida vaid...@gmail.com javascript: wrote: Hello, Again, a very BIG thank you for your efforts on the deploy module. I would like to share my suggestion

[ansible-project] Re: Remove packages

2014-08-07 Thread Dan Vaida
Hello, This works just fine for me: - name: uninstall apache-related packages apt: pkg={{ item }} state=absent purge=yes force=yes with_items: - apache2* sudo: yes On Wednesday, 6 August 2014 10:19:51 UTC+2, Laer Cius wrote: Hi, Is there a way, other that with

[ansible-project] recursively create symlinks with relative paths

2014-08-05 Thread Dan Vaida
Hello guys, I am trying to get my head around parsing a folder for its files and creating symlinks for those files found (depth 0) and place them in another directory. Example: parse sites-available/ and create symlinks in sites-enabled/ with relative paths. I know one can just use the

Re: [ansible-project] recursively create symlinks with relative paths

2014-08-05 Thread Dan Vaida
. It might be able to help. On 08/05/2014 12:05 PM, Dan Vaida wrote: Hello guys, I am trying to get my head around parsing a folder for its files and creating symlinks for those files found (depth 0) and place them in another directory. Example: parse sites-available/ and create

[ansible-project] Re: pass variable from ec2_eip to route53

2014-06-23 Thread Dan Vaida
records matchig our stores] ** fatal: [localhost] = One or more undefined variables: 'list object' has no attribute 'public_ip' On Thursday, 19 June 2014 18:29:17 UTC+2, Dan Vaida wrote: Could it be something as easy as (route53.yml) ... - name: getting showing all

Re: [ansible-project] Need assist with syntax for EC2 assignment of Elastic IP Address

2014-06-23 Thread Dan Vaida
Hi Mark. This is the typical outcome of AWS' flow. When you assign an EIP to an instance, you can forget about the public dns and public ip entries. they are updated according to the EIP. As a tip, I am registering the output of the ec2_eip module and use that instead of querying the ec2

[ansible-project] Re: Iterating through a list of names to create EC2 instances

2014-06-23 Thread Dan Vaida
Hello, What about adding an EIP to the instance(s)? Because that changes the game completely making the registered ec2 instances info outdated (at least the IP-related one). How about cycling through Route53 with those EIPs? Has anyone done that successfully? Don't want to hijack this

[ansible-project] pass variable from ec2_eip to route53

2014-06-19 Thread Dan Vaida
Hello everyone! Since the 'include' doesn't work anymore with 'with_items', I am trying to do the following: ... - name: add EIP to the instance local_action: ec2_eip in_vpc=yes instance_id={{ item.id }} region={{ region }} with_items: ec2.instances register: eip - name: output the IP

  1   2   >