Re: [ansible-project] Ubuntu Controller with Windows Host

2014-08-21 Thread Paul Durivage
You said you're getting a connection refused, so check the firewall and winrm settings on the Windows machine. There's an example script ( https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1) that takes care of WinRM making sure the box allows remote

Re: [ansible-project] docker module

2014-07-07 Thread Paul Durivage
Docker images in private repos should have be accessed by the private repo's FQDN, for example: docker.example.com/myimage:tag When pulling by this image name, it's implied that the registry is at docker.example.com and is accessible to the Docker host. It looks like the Docker module makes

Re: [ansible-project] frequent ssh drops due to Connection timed out during banner exchange

2014-07-01 Thread Paul Durivage
sysadmins to adjust that setting. also no reason not to use -W other than 'old school' pattern. switched to it (though i doubt it's an issue) On Wednesday, 25 June 2014 16:50:02 UTC-5, Paul Durivage wrote: How many parallel connections are you proxying through proxyhost? My team encounter

Re: [ansible-project] frequent ssh drops due to Connection timed out during banner exchange

2014-06-25 Thread Paul Durivage
How many parallel connections are you proxying through proxyhost? My team encounter a similar situation where the ssh_config directive MaxStartups was too low, and the ssh connection timeout value was being exceeded connecting to the proxy server. At any rate, check your proxy's MaxStartups, and

Re: [ansible-project] Moving a docker instance between 2 hosts

2014-06-16 Thread Paul Durivage
IMHO, the most exciting system out there for running Docker applications is CoreOS, a Linux distribution that is essentially just Linux + systemd + Docker + fleetd + etcd. There guys really have something interesting going. I have every intention of writing some modules that incorporate etcd

Re: [ansible-project] Moving a docker instance between 2 hosts

2014-06-16 Thread Paul Durivage
laurent.pe...@gmail.com wrote: Le lundi 16 juin 2014, Paul Durivage paulduriv...@gmail.com a écrit : IMHO, the most exciting system out there for running Docker applications is CoreOS, a Linux distribution that is essentially just Linux + systemd + Docker + fleetd + etcd. There guys really

Re: [ansible-project] Dynamic Inventory does not work: it gets interpreted as .ini

2014-06-11 Thread Paul Durivage
chmod +x host.py Ansible uses the executable flag to determine whether or not a file is a .ini or script. On Wed, Jun 11, 2014 at 11:21 AM, Pierre Masci mas...@gmail.com wrote: Hi, I'm trying to get the simplest *Dynamic Inventory* to work, but it doesn't work because *Ansible interprets

Re: [ansible-project] Re: mysql_db state=import only once

2014-06-11 Thread Paul Durivage
Hi Andrew, Determining how a task should be treated as changed is can be controlled using the changed_when directive. See the documentation: http://docs.ansible.com/playbooks_error_handling.html#overriding-the-changed-result -name: check if DB exists shell: mysql -u user -p password -h host

Re: [ansible-project] mysql_db state=import only once

2014-06-11 Thread Paul Durivage
-- but if it just sounds useful -- I'd suggest dragging your feet a bit :) On Wed, Jun 11, 2014 at 3:33 PM, Paul Durivage paulduriv...@gmail.com javascript:_e(%7B%7D,'cvml','paulduriv...@gmail.com'); wrote: Hi Andrew, Determining how a task should be treated as changed is can

Re: [ansible-project] Best practice for recording Ansible provisioning runs

2014-06-04 Thread Paul Durivage
Hi Craig, I think what you're looking for is callback plugins, but you could probably also use a notification module as well. There are several in Github as examples. The callback plugin could, for example, record something to a file, or to a database, or merely make an API call to some custom

Re: [ansible-project] Overriding value of 'hosts' playbook variable

2014-05-12 Thread Paul Durivage
I don't think what you want to do is override a value at runtime, but rather *create* a new group dynamically at runtime. Make a new group for hosts that meet some arbitrary criteria. See the group_byhttp://docs.ansible.com/group_by_module.htmlmodule -- I think you'll find what you're looking

Re: [ansible-project] question about the docker module

2014-04-17 Thread Paul Durivage
, poking around and had some questions. I'm EDT. On Wednesday, April 16, 2014 7:41:36 PM UTC-4, Paul Durivage wrote: I'll venture a guess as to what is happening here, but I don't know for sure. I guess I could look at the source. ;) I think what's happening here is that with_sequence

Re: [ansible-project] question about the docker module

2014-04-17 Thread Paul Durivage
I was running with - and noticed this. On Wednesday, April 16, 2014 7:41:36 PM UTC-4, Paul Durivage wrote: I'll venture a guess as to what is happening here, but I don't know for sure. I guess I could look at the source. ;) I think what's happening here is that with_sequence

Re: [ansible-project] question about the docker module

2014-04-16 Thread Paul Durivage
I'll venture a guess as to what is happening here, but I don't know for sure. I guess I could look at the source. ;) I think what's happening here is that with_sequence is actually invoking a new module build/upload/run for every item in the with_sequence, and thereby overwriting the

Re: [ansible-project] Re: How to retrieve facts about host B inside a playbook which run for host A

2014-04-16 Thread Paul Durivage
Well, what is the value of host? It's a variable -- is it defined? Does it have a sane value? If you're looking for the value of the current host, you can reference 'ansible_fqdn' directly: {{ ansible_fqdn }}. Otherwise, make sure that host is defined and holds the value it's supposed to with

Re: [ansible-project] Ansible pattern for API-based config management

2014-04-10 Thread Paul Durivage
The type of work you're looking to do is best handled by writing a Cloudera module. I don't want to imagine how one might wrap a REST API in a playbook -- that does not sound fun or reasonable. :) On Wed, Apr 9, 2014 at 2:11 PM, Salman Haq shaq@audaxhealth.com wrote: I am exploring

Re: [ansible-project] Single when for multiple tasks

2014-04-10 Thread Paul Durivage
You're looking for parameterized roles. Put the tasks in a role, call the role conditionally when the criteria is met. http://docs.ansible.com/playbooks_conditionals.html#applying-when-to-roles-and-includes On Thu, Apr 10, 2014 at 4:38 AM, Stephan S. binaryx...@gmail.com wrote: Hello. I

Re: [ansible-project] Run command on 1 server from group A, then run another command on 1 from group B, in loop

2014-04-10 Thread Paul Durivage
I don't have any examples for you, but Ansible is definitely the right tool for this kind of orchestration. I'm sure someone here can provide some samples. You'll want to write a playbook that enumerates these steps. Use the serial directive in your play so that only one server is touched at

Re: [ansible-project] Multiple actions in task

2014-04-07 Thread Paul Durivage
Hi James, The first doesn't fail with the multiple actions specified message because you're defining a dictionary (aka a hash, or associative array) and your second declaration overwrites the first. Split this into two separate tasks. - name: Install JCE when: jce_install == true copy:

Re: [ansible-project] Any way to make a task serial (or set mutex so only 1 thread run it at a time)?

2014-04-06 Thread Paul Durivage
Correct, a task does not allow the keyword serial to be defined on it. There's no need to define an entirely new playbook, but you will have to declare a new play. On Fri, Apr 4, 2014 at 12:39 PM, Khaled Janania khaled.jana...@gmail.comwrote: The documentation doesn't really answer the

Re: [ansible-project] Correct way to install EPEL rpms?

2014-04-06 Thread Paul Durivage
It says it could't resolve mirrorlist.centos.org, so you have a DNS problem -- *at least* a DNS problem. Because this is CentOS, I'd verify that the primary public interface (probably eth0) is enabled at boot and out from under network-manager control, particularly if you're running it as a

Re: [ansible-project] Help with Idempotent lineinfile regex

2014-04-06 Thread Paul Durivage
A better, more reliable approach would be to create a template sshd_config file (or just a regular, non-templated file) that is placed on nodes via the copy http://docs.ansible.com/copy_module.html or templatehttp://docs.ansible.com/template_module.htmlmodule. -- Forwarded message

Re: [ansible-project] What is the best way to run a playbook after provisioning?

2014-04-03 Thread Paul Durivage
Hi Michael, I think the way you'd want to do this is to provision your machines, then use the add_hosts (or the group_by) module to dynamically create groups of servers based on variable data . Then, create playbooks that target each group. So, for example, you create a series of web servers,

Re: [ansible-project] provisioning attempts on VPS and VirtualBox (vagrant) Ubuntu distros leads to different results

2014-04-01 Thread Paul Durivage
I think this is a side effect of the many package managers out there, and unfortunately, is the nature of the beast. Your VPS has chosen to image a version of Ubuntu that has fewer packages installed than your Vagrant VM. This error you're seeing with python-apt should be resolved in the next

Re: [ansible-project] iterate over disk devices

2014-03-31 Thread Paul Durivage
Hi Filip, You'll find that calling the split method on the string works. See this Gist: https://gist.github.com/angstwad/9893480 12345678910 --- - name: Test split hosts: localhost gather_facts: false vars: - facter_blockdevices: sda,sdb,sdc,sdd,sde,sdf tasks: - name: Let's

Re: [ansible-project] iterate over disk devices

2014-03-31 Thread Paul Durivage
, Paul Durivage wrote: Hi Filip, You'll find that calling the split method on the string works. See this Gist: https://gist.github.com/angstwad/9893480 12345678910 --- - name: Test split hosts: localhost gather_facts: false vars: - facter_blockdevices: sda,sdb,sdc,sdd,sde

Re: [ansible-project] Using docker_containers return value in a different role

2014-03-26 Thread Paul Durivage
I think what you want to use is the set_fact module to set variables from your provisioning roles that you later recall when provisioning your LBs. http://docs.ansible.com/set_fact_module.html On Tue, Mar 25, 2014 at 4:58 AM, mitchellgay...@gmail.com wrote: Hi All, I am running a role

Re: [ansible-project] Managing groups of dynamic hosts

2014-03-25 Thread Paul Durivage
So, I don't think I can exactly answer your question but I think I can get you in the right direction. So if you were using cloud instead of Vagrant, I'd tell you to use the dynamic inventory scripts. For example, the rax.py dynamic inventory plugin groups hosts both logically and dynamically

Re: [ansible-project] Conditionally execute some tasks on dev hosts only

2014-03-25 Thread Paul Durivage
I think setting a variable is one straight forward way to go about solving the problem, conditionally running tasks if the variable is set. See this: http://docs.ansible.com/playbooks_conditionals.html#applying-when-to-roles-and-includes Another way is to create a group of devel servers in

Re: [ansible-project] Re: Running ansible on local Linux desktop hangs on Gathering Facts

2014-03-21 Thread Paul Durivage
Generally this is related to Ansible somehow waiting for standard input, most commonly for a sudo or su password. I should note that I make this mistake *all the time* . I'd check to make sure that you haven't set sudo: yes or su: yes somewhere in the playbooks that you're running. If you have,

Re: [ansible-project] Can ansible retry to skip all previous successful roles?

2014-02-28 Thread Paul Durivage
The --start-at-task argument will allow you to choose the task to start at. Alternatively, tags would also achieve what you're looking for if you tagged the tasks or plays you want to run. http://docs.ansible.com/playbooks_tags.html On Friday, February 28, 2014, linbo liao llbg...@gmail.com

Re: [ansible-project] Ansible Galaxy roles - distro - arch 64

2014-02-26 Thread Paul Durivage
If you so choose, you could add a task to the role to ensure the system is a 64-bit system. - name: Ensure system is x86_64 fail: msg=Docker requires a 64bit system architecture when: ansible_architecture != 'x86_64' See the fail module: http://docs.ansible.com/fail_module.html On Wed,

Re: [ansible-project] volumes parameter in ec2 module

2014-02-18 Thread Paul Durivage
Hi Fred, In your first example, you* did not quote your variables in the play*: tasks: - name: create instance ec2: key_name={{ keypair }} image={{ image }} instance_type={{ instance_type }} vpc_subnet_id={{ subnet }} user_data='{shortname:{{ hostname }}, hostname:{{ hostname }}.{{

Re: [ansible-project] common roles on ansible galaxy

2014-02-11 Thread Paul Durivage
I'd argue that having a common role would be the approach to take, with follow-on roles having a dependency on the common role. For ease of maintenance, that's the way to go. I don't think in-depth standards for Galaxy roles has been discussed yet, at least not that I've heard (and not on this

Re: [ansible-project] common roles on ansible galaxy

2014-02-11 Thread Paul Durivage
I'd argue that having a common role would be the approach to take, with follow-on roles having a dependency on the common role. For ease of maintenance, that's the way to go. I don't think in-depth standards for Galaxy roles has been discussed yet, at least not that I've heard (and not on this

Re: [ansible-project] Get AttributeError: Values instance has no attribute 'su' on ansible == 3260e69

2014-02-06 Thread Paul Durivage
Hi Rinat, Looks like ansible-playbook is importing an older, unpatched version of the base_parser. Running from devel with su, I'm not having this problem. Attempt to fetch the latest version of the library and try again. 09:18 $ ansible-playbook --su --ask-su-pass -vv mine-local/test-su.yml -i

Re: [ansible-project] roles with pre_tasks and post_task

2014-01-30 Thread Paul Durivage
Hi Adam, I suggest taking this to the developer list for further discussion. Features and ideas are regularly discussed there with the Ansible team. https://groups.google.com/forum/#!forum/ansible-devel On Wed, Jan 29, 2014 at 5:50 PM, Adam Heath a...@brainfood.com wrote: I have a patch

Re: [ansible-project] Re: ansible now supports su as an alternative to sudo

2014-01-24 Thread Paul Durivage
Hi Adam, Thanks for reporting this. I submitted a PR this morning based on your issue. https://github.com/ansible/ansible/pull/5751 On Friday, January 24, 2014 11:24:23 AM UTC-6, Adam Heath wrote: The following playbook doesn't do what I think it should. The su on the task stays as