[ansible-project] EC2 Dynamic Inventory wild cards w/ groups

2015-08-10 Thread Synaesthete
I'm having trouble defining groups that include dynamic nodes defined by EC2.py. This is specific to defining group_vars by groups that don't explicitly refer to a particular dynamic host name. For example, I have a group of dynamically-created servers that I refer to by tag. The dynamic host

[ansible-project] Project organization

2015-05-06 Thread Synaesthete
Curious how others are organizing their Ansible projects. There are a lot of possible schemes and all seem basically equivalent, but I've not been able to settle on one that really works. My units for configuration include things like nginx, mysql, deploy_user, etc. Here are the schemes I've

[ansible-project] Google Cloud dynamic inventory (gce.py) and authentication

2015-04-23 Thread Synaesthete
I think this is more of a libcloud question, but I'm starting here hoping others have encountered the same issue. I'm using the gce.py script found in the ansible repository to return a dynamic inventory of my GCE instances. When I run ./gce.py --list I get the following prompt: Please Go

[ansible-project] Re: Google Cloud dynamic inventory (gce.py) and authentication

2015-04-23 Thread Synaesthete
closely, and have no idea how to begin troubleshooting this. On Thursday, April 23, 2015 at 4:48:59 PM UTC-4, Synaesthete wrote: I think this is more of a libcloud question, but I'm starting here hoping others have encountered the same issue. I'm using the gce.py script found in the ansible

Re: [ansible-project] idea: invoke tags for roles in role definition

2014-11-28 Thread Synaesthete
TL;DR -- Expanding the use of tags to include filtering at the playbook or include level could facilitate the iterative nature of playbook and role development while also making roles on ansible-galaxy more widely applicable. I just stumbled on to this topic with the same need and it seems

[ansible-project] How to read automatic environment variables such as DO_CLIENT_ID in digtal_ocean module?

2014-08-11 Thread Synaesthete
I'm attempting to implement a deployment playbook that deploys to digital ocean. In the ansible docs on the digital_ocean module it states, Two environment variables can be used, DO_CLIENT_ID and DO_API_KEY I haven't yet written a task or playbook that uses environment variables that are

[ansible-project] lineinfile module: multiline from stdout is automatically wrapped in quotes

2014-08-02 Thread Synaesthete
Some quick background. I'm using ansible to automate setup of development environments for new projects. These are active development environments, not freshly provisioned machines, so some challenges come with the territory--in particular there are times when I would use a template to

Re: [ansible-project] Re: lineinfile module: multiline from stdout is automatically wrapped in quotes

2014-08-02 Thread Synaesthete
I checked and on a debug message do not see single-quotes in the stdout. Adding the | safe also didn't help. So it seems that still either jinja or ansible is throwing single-quotes around the variable data before writing it to file. I don't see this same behavior when writing the same block

Re: [ansible-project] Re: lineinfile module: multiline from stdout is automatically wrapped in quotes

2014-08-02 Thread Synaesthete
- name: Add ssh config to ~/.ssh/config lineinfile: path=~/.ssh/config line={{ item }} insertafter=^Host vagrantguest\n.*\n with_items: vagrant_ssh_config.stdout_lines On Saturday, August 2, 2014 8:42:13 PM UTC+2, Synaesthete wrote: I checked and on a debug message do not see single-quotes

[ansible-project] Ansible JSON module?

2014-07-31 Thread Synaesthete
Is there a module for manipulating JSON data? Say I have a settings file that's written in JSON, and I'd like to set or modify a value. As a task, this might look like: - name: Modify author name json: src=config.json key=author.name value='rvang' -- You received this message because you

Re: [ansible-project] Ansible JSON module?

2014-07-31 Thread Synaesthete
I tend to take the template route almost all the time. This is in regard to modifying JSON-based configuration files. I compose several roles and run them against a host. Each role might do something very distinct, while they all modify a common configuration file or add information to a

Re: [ansible-project] Ansible JSON module?

2014-07-31 Thread Synaesthete
So are there any examples of a playbook or role that loads some JSON data from a file, works with that data, then writes it back out using a simple template like {{ data_structure }} ? What set of tasks could perform this? On Thursday, July 31, 2014 6:52:31 PM UTC-4, Synaesthete wrote: I

Re: [ansible-project] Ansible JSON module?

2014-07-31 Thread Synaesthete
creative. On Thu, Jul 31, 2014 at 7:11 PM, Synaesthete ryan.v...@gmail.com javascript: wrote: So are there any examples of a playbook or role that loads some JSON data from a file, works with that data, then writes it back out using a simple template like {{ data_structure }} ? What set of tasks

Re: [ansible-project] Help organizing project and accessing paths

2014-07-28 Thread Synaesthete
ansible 1.7 On Monday, July 28, 2014 10:09:32 AM UTC-4, Michael DeHaan wrote: What is ansible --version ? On Sun, Jul 27, 2014 at 5:45 PM, Synaesthete ryan.v...@gmail.com javascript: wrote: Thanks for the response. I'm using the following task: - debug: msg={{ playbook_dir

Re: [ansible-project] Help organizing project and accessing paths

2014-07-28 Thread Synaesthete
. Thanks! On Mon, Jul 28, 2014 at 3:15 PM, Synaesthete ryan.v...@gmail.com javascript: wrote: ansible 1.7 On Monday, July 28, 2014 10:09:32 AM UTC-4, Michael DeHaan wrote: What is ansible --version ? On Sun, Jul 27, 2014 at 5:45 PM, Synaesthete ryan.v...@gmail.com wrote: Thanks

[ansible-project] Help organizing project and accessing paths

2014-07-27 Thread Synaesthete
I'm working on a small Ansible project that's a little outside its primary use-case. I'm automating the generation of new web projects in a Mac OS X dev environment. There are two objectives: 1.) Install all development tools on the local machine 2.) Compose various projects based on small

Re: [ansible-project] Help organizing project and accessing paths

2014-07-27 Thread Synaesthete
, {{ playbookdir }}/some_path. On Sun, Jul 27, 2014 at 10:31 AM, Synaesthete ryan.v...@gmail.com javascript: wrote: I'm working on a small Ansible project that's a little outside its primary use-case. I'm automating the generation of new web projects in a Mac OS X dev environment

Re: [ansible-project] Variable registration step, ignore_errors, and idempotency

2014-07-24 Thread Synaesthete
Perfect, exactly what I needed. Thanks! On Wednesday, July 23, 2014 6:15:36 PM UTC-4, Michael DeHaan wrote: Instead of ignore_errors: True, consider: failed_when: False The reporting of changed always can be fixed with changed_when: False On Wed, Jul 23, 2014 at 1:14 PM, Synaesthete

[ansible-project] Variable registration step, ignore_errors, and idempotency

2014-07-23 Thread Synaesthete
I'm writing a playbook that runs an initial git commit on a folder if there has not yet been a commit. I check this using: - name: Get commit count command: git rev-list HEAD --count chdir={{ project_path }} ignore_errors: yes register: git_commit_count If there have been no commits, this