[ansible-project] Re: Debugging Ansible with Packer

2015-10-19 Thread Nathan Sowatskey
{ "type": "ansible-local", "playbook_file": "playbooks/setup_devvm.yml", "extra_arguments": "-v" } On Monday, October 19, 2015 at 10:22:01 PM UTC+2, Nathan Sowatskey wrote: > > Hi > > Does anyone know how to debug what Ansible is doing as part of a Packer > build ple

[ansible-project] Re: How to do something with nested variables...

2015-10-19 Thread Willard Dennis
Never mind all this, thought about it some more and will handle it with a two-level structure (i.e. a list var) in host_vars -- 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, se

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread K Cheng
No worries - thanks Brian. On Tuesday, October 20, 2015 at 10:57:22 AM UTC+10, Brian Coca wrote: > > Open a github issue, we might be able to work around this, afaik those > using AWS in the China zone were using 1.x versions of ansible, there > were many changes introduced in 2.0 (current devel

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread Brian Coca
Open a github issue, we might be able to work around this, afaik those using AWS in the China zone were using 1.x versions of ansible, there were many changes introduced in 2.0 (current devel). -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansibl

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread K Cheng
Hmm - looks like its something to do with the profile lookup in boto. I've hardcoded the credentials into the playbook temporarily to test and launching of an instance now works - creating an IAM role does not at the moment and returns: The security token included in the request is invalid." O

[ansible-project] protect ansible code ?

2015-10-19 Thread Alejandro Comisario
Yeahp, im not talking about vault, im talking about protecting / encrypting / compiling ansible app ( by that i mean a series of roles executed for example, by a site.yml ). By that i mean, any company that builts a product around ansible, a product where this series of roles should be protected

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread K Cheng
Thanks Brian, in terms of the Signature - its been there from day 1 from memory. In terms of getting help on this issue, would this be the best place to ask for help on this matter? Not sure how to proceed and AWS China is something we need to have working. I was working on terraform originall

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread Brian Coca
So they should work 'in principle' I know other people have been using the China region, not sure about the signatures though, is that a recent change? -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread K Cheng
Yes - only thing that is different is that China and some other regions AWS has supports only Signature v4 while other AWS regions support both v2 and v4 Signatures so not sure if that has been catered for. In terms of credentials - yes they are correct - they work for both the ec2.py dynamic i

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread Brian Coca
Ansible does not restrict the regions, that is what your credentials + AWS API do, are you sure you are using the correct credentials? The error message you got seems to indicate that this is not the case. -- Brian Coca -- You received this message because you are subscribed to the Google Grou

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread K Cheng
I have an AWS China account with IAM credentials which is what I am trying to use with Ansible. I've found a handful of github Ansible/China related issues/posts but I can't tell whether Ansible supports China or not. Karen On Tuesday, October 20, 2015 at 9:34:10 AM UTC+10, Brian Coca wrote:

Re: [ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread Brian Coca
Only accounts created in the China region can access the China region https://www.amazonaws.cn/en/sign-up/, this is an AWS restriction and Ansible cannot do anything about it. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] AWS China Support/Issues - AWS was not able to validate the provided access credentials - Launching Instance

2015-10-19 Thread K Cheng
Hi, Apologies if this has already been asked previously - I couldn't seem to find the relevant information I required. I'm having issues running a playbook to launch a EC2 instance in AWS China. The same playbook works in non-China AWS accounts. The error I am receiving is the following: TAS

[ansible-project] Re: Syntax error while using Ansible docker module

2015-10-19 Thread Kunal Pariani
> > This error got fixed when i moved the section under tasks to a different > YML file and included that file in this one and it worked :) > Although i got moved to new error now TASK: [Wildfly container#1] *** failed: [159.203.249.12] => {"error"

Re: [ansible-project] Best practices for deploying 100 apps in multiple environments

2015-10-19 Thread Brian Coca
There are many ways to do this, I have done very similar setups with java, C and python apps. I recommend you create generic roles for the load balancers and any other 'shared/common' services. Afterwards, you can have either app roles or 'app type' roles for similar apps that only differ in some

Re: [ansible-project] User quota management with Ansible

2015-10-19 Thread Brian Coca
IIRC the `quota` command can be used to set/modify/remove user quotas w/o interactive prompts, its been years since i set user quotas so things might have changed. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscr

[ansible-project] User quota management with Ansible

2015-10-19 Thread Joanna Delaporte
Hi, I would like to provision a system on AWS using Ansible, recreate my ~8000 users and establish user quotas... edquota opens an interactive editor, so it's not particularly Ansible-friendly. Has anyone here set user filesystem quotas via Ansible? Thanks! Joanna -- You received this messa

Re: [ansible-project] Ansible and ephemeral docker containers

2015-10-19 Thread Brian Coca
In ansible.cfg you can [defaults] host_key_checking= False as env var: ANSIBLE_HOST_KEY_CHECKING=0 or you can bypass sshpass by using paramiko as your transport `-c paramiko` in the command line (also settable in ansible.cfg and env) -- Brian Coca -- You received this message because you are s

Re: [ansible-project] Ansible to manipulate dynamic inventory

2015-10-19 Thread Brian Coca
Well, normally you start with either already existing hosts that you can list in inventory or a virtualization solution (including clouds) which normally already have a dynamically updated DB with the list of the machines, add_hosts is only in memory because the inventory scripts are not normally '

Re: [ansible-project] Debugging Ansible with Packer

2015-10-19 Thread Brian Coca
If Packer is the one calling ansible, you might want to ask the Packer crowd. Debug is not configurable from withing a playbook. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

[ansible-project] Forcing a stop on failure

2015-10-19 Thread Guy Matz
Hi! I have a playbook that has three plays, each one deploying software to a set of servers . . . if any of these plays fail I want the playbook to stop running. Is that what any_errors_fatal is for? It sounds like it's close, but I can't tell if in the case of multiple plays it will work as I

[ansible-project] Debugging Ansible with Packer

2015-10-19 Thread Nathan Sowatskey
Hi Does anyone know how to debug what Ansible is doing as part of a Packer build please? Using packer -debug did not help. In effect I need a way to introduce the -v argument to Ansible from within Packer, or to configure debug in a playbook. Many thanks Nathan Nathan John Sowatskey Pro

[ansible-project] Ansible to manipulate dynamic inventory

2015-10-19 Thread Bence Takács
Upon running some tasks I need to manipulate Ansible host variables. I created a dynamic inventory script that could support thata functionality and then I stucked: - inventory modules support only add_host which works only in-memory - I see no sign that ansible is capable of doing this: everythi

Re: [ansible-project] AWS / Elastic Beanstalk? / Docker / Ansible .. orchestration?

2015-10-19 Thread Matt Young
or https://github.com/skorochkin/ansible-elastic-beanstalk-with-cleanup or https://github.com/lachatak/deliverypipeline would be so awesome to have an eb core module. -M > On Oct 19, 2015, at 12:39 PM, Matt Young wrote: > > So which module do you speak of? I ran across a few and would like

[ansible-project] Re: AWS / Elastic Beanstalk? / Docker / Ansible .. orchestration?

2015-10-19 Thread Matt Young
So which module do you speak of? I ran across a few and would like recommendations... This one: https://github.com/hsingh/ansible-elastic-beanstalk Or? On Wednesday, October 7, 2015 at 11:59:09 AM UTC-7, Rmen R wrote: > > There is an elasticbeanstalk module now! > > On Friday, October 17, 2014

Re: [ansible-project] Best way to accomplish this task using slurp

2015-10-19 Thread Brian Coca
several things wrong there, but im just going to give you some thing that should 'just work' - name: part one of playbook hosts: server_A gather_facts: no tasks: - name: slurp a file slurp: src=/tmp/test.txt register: fileContents - debug: msg="{{ fileContents.content | b64

[ansible-project] Github

2015-10-19 Thread Deepak
Are there plans to support one github repo for multiple galaxy roles? Just thinking about name collisions within my own github account. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] How to do something with nested variables...

2015-10-19 Thread Willard Dennis
Hi AnsiPeeps, I have a nested structure in vars as so: data_bricks: ovirt-node-01: - gluster_brick2 - gluster_brick4 ovirt-node-02: - gluster_brick1 - gluster_brick3 ovirt-node-03: - gluster_brick2 - gluster_brick4 (the number of items in the 2nd-level node now is t

Re: [ansible-project] How to load a json data?

2015-10-19 Thread Brian Coca
Just load them as you would load yaml files, json is a subset of yaml so vars_files and include_vars will read json files. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving email

Re: [ansible-project] Seeing a stream of output from stdout while forked commands execute?

2015-10-19 Thread Brian Coca
1. can be done via callback 2 and 3 are not how ansible works, there it only returns data once the execution is complete. async tasks are the exception to this but they don't return any other data than the process is 'running', they would need to be modified to support this -- Brian Coca --

Re: [ansible-project] Problem with retry file.

2015-10-19 Thread Brian Coca
Its 'how it works' right now retry file ONLY gets written when something breaks during a run. You can open a github issue and ask for a new feature to remove the file on successful runs, but this might be an issue for people that have multiple plays with the same name. -- Brian Coca -- You re

[ansible-project] Re: Ansible as a "daemon"

2015-10-19 Thread Adam Kosmin
I'd suggest avoiding Tower as it is not Free Software. Instead, use a scheduler like RunDeck or Jenkins. You could use cron but the schedulers I've mentioned offer much more functionality (reporting, git webhooks, etc). Personally, I like the idea of setting up 2 jobs: Scheduled: This job sho

Re: [ansible-project] Ansible Tower in vagrant does now show admin password or URL

2015-10-19 Thread Brian Coca
for tower related issues please email supp...@ansible.com, this ML is for the command line ansible project -- Brian Coca -- 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

Re: [ansible-project] Re: How do you structure Playbooks to Handle Managing Many Applications with Many Environments?

2015-10-19 Thread Javier Palacios
On Mon, Oct 19, 2015 at 3:42 PM, Corwin Brown wrote: > > That is clever, I really dig that! We handle the puppet deployments (Which > I'm currently replacing, one by one) in a very similar manner, so just > porting that process over makes a lot of sense. Do you just maintain all of > that informa

Re: [ansible-project] Installation of Ansible Tower fails at "determine if postgresql user exists"

2015-10-19 Thread Brian Coca
for tower questions please email supp...@ansible.com or go to http://support.ansible.com this ML is for the OSS project. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving email

[ansible-project] Re: Installation of Ansible Tower fails at "determine if postgresql user exists"

2015-10-19 Thread Brad Bendily
I just installed Ansible the other day. I think you need to install postgresql separately. There are several steps during the install that the playbook doesn't account for very well. One package, can't remember which, maybe postgres, i had to install it, then the installer uninstalled my versio

Re: [ansible-project] Ansible as a "daemon"

2015-10-19 Thread Brian Coca
you can also run ansible from cron, jenkins or any other scheduler if you want that. If you want a 'agent' you can put ansible-pull on eachmachine and invoke from cron there. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. T

Re: [ansible-project] Ansible as a "daemon"

2015-10-19 Thread Greg Chavez
Tower is a very expensive product, although it's an excellent option if you manage hundreds of servers and need to schedules dozens of jobs across different parts of your organization. If you're environment is more simple or you're working on a budget, you really have to rely on cron to schedule pl

Re: [ansible-project] ansible - variables reuse in templates

2015-10-19 Thread Matt Martz
Jinja2 has some unexpected variable scopes when it comes to loops. You are setting mynewvar inside of a scope for a for loop, which is not available outside of the for loop. There is some explanation at a similar issue logged on the jinja2 project: https://github.com/mitsuhiko/jinja2/issues/330

Re: [ansible-project] Ansible as a "daemon"

2015-10-19 Thread Matt Martz
Ansible Tower supports this functionality. http://www.ansible.com/tower On Mon, Oct 19, 2015 at 3:57 AM, Nimon Ambient wrote: > Hi everyone, > > I'm very new, so sorry if this is a silly question but every time I see > Ansible referred to it seems to be on a single ad-hoc command line run, > wh

[ansible-project] ansible - variables reuse in templates

2015-10-19 Thread Pavlo Zhuk
Dears, I am trying to construct a variable inside the loop of ansible template. The value gets constructed, but I'm unable to use it outside the loop. Looks like variables with same name inside the loop and outside the loop are pointing to actually different variables. Is there any way to con

[ansible-project] Ansible as a "daemon"

2015-10-19 Thread Nimon Ambient
Hi everyone, I'm very new, so sorry if this is a silly question but every time I see Ansible referred to it seems to be on a single ad-hoc command line run, which is great for building but I was wondering how (or indeed if) daemonized ansible works for managing configuration. I don't want to u

[ansible-project] Re: How do you structure Playbooks to Handle Managing Many Applications with Many Environments?

2015-10-19 Thread Corwin Brown
John McNulty: That is clever, I really dig that! We handle the puppet deployments (Which I'm currently replacing, one by one) in a very similar manner, so just porting that process over makes a lot of sense. Do you just maintain all of that information in flat files on disk, or in a database so

[ansible-project] Installation of Ansible Tower fails at "determine if postgresql user exists"

2015-10-19 Thread Felix Gläske
I have setup a blank VM and configured Ansible Tower via ".configure.sh" and answering the questions. After that I tried to install via "./setup.sh" Playbook always fails at: TASK: [postgres | determine if postgresql user exists] fatal: [coconut] => error while evaluati

[ansible-project] Ansible Tower in vagrant does now show admin password or URL

2015-10-19 Thread Felix Gläske
On page http://www.ansible.com/tower-trial and section "LAUNCH TOWER IN VAGRANT" you can read "That last command will give you your admin password and the Tower log-in URL. Upon login, you will be provided with directions on how to obtain a trial license." So I did everything as shown: ansible

Re: [ansible-project] Re: How do you structure Playbooks to Handle Managing Many Applications with Many Environments?

2015-10-19 Thread Javier Palacios
My opinion is that there should be only one inventory. To achieve this we have an inventory with multiple axes, so that every host is member of a few groups (typically for the running app and the environment). This still requires "duplicated" playbooks, because the hosts must be explicit there, but