Re: [ansible-project] Security question about a custom (in python) for accessing the gitlab API

2015-07-01 Thread Boris Mühmer
I will have a closer look at this "vault" stuff. Thank You for the input! Regards, Boris -- 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+uns

[ansible-project] Re: msg='dopy >= 0.2.3 required for this module'

2015-07-01 Thread Willard Dennis
Exact same problem here... Why can't Ansible find the dopy module? I was able to successfully create a droplet via the dopy module in Python: Wills-MacBook-Air:ansible-stuff will$ python Python 2.7.9 (default, Dec 19 2014, 06:00:59) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin

[ansible-project] Re: msg='dopy >= 0.2.3 required for this module'

2015-07-01 Thread Willard Dennis
Exact same problem here... Why can't unusable find the dopy module? On Monday, June 1, 2015 at 8:44:22 AM UTC-4, Global Cooling wrote: > > I have tried suggestions on Github, Google Groups, and GIthub Gists but > can't seem to resolve this error. > > I'm using system version of Python > > which

Re: [ansible-project] Regression suites..?

2015-07-01 Thread Brian Coca
We already have a place for this, look under test/ in the repo, we have many tests testing the semantics, but not every possible combination and definitely not the 'undocumented/unexpected' functionality. There might be some tests we have not ported yet from v1 but should have that done well befor

[ansible-project] nodejs package requires key/value arguments?

2015-07-01 Thread gitted
I'm trying to install nodejs using: - name: install node apt: pkg={{item}} state=pre sent with_items: - nodejs - nodejs-legacy - npm I'm getting this error: failed: [host1] => (item=nodejs,nodejs-legacy,npm) => {"failed": true, "item": "nodejs,nodejs-legacy,npm"} msg: this module re

Re: [ansible-project] Ansible ask for vault password for a host that don't need any variable

2015-07-01 Thread Brian Coca
If ansible is asked to open a vault file it will always try, if it does not have a password it will fail. There is no way to know if a variable inside the file is used unless you open it and examine it, so we enter the paradox of needing to open the file to find out if we need to open it. If you k

Re: [ansible-project] Conditional execution on hosts where service exists

2015-07-01 Thread Tom Cameron
Sorry for the super late reply to this, but you'll miss services not found in the init.d directory. For example, this would fail on systemd, upstart, runit, and so on. It would also be platform specific to Linux. These may not be a big deal for the original author, but it should be noted for po

Re: [ansible-project] Dynamic string/list manipulation

2015-07-01 Thread Brian Coca
something like: with _items: otherservers set_fact: otherips: "{{otherips}}, " + hostvars[item]['ansible_' + rhel7_interface in hostvars[host]|ternary(['an['ansible_' + rhel7_interface, 'ansible_' + default_interface) or I would try using the jinja2 map filter. its going to be ugly in any

Re: [ansible-project] Dynamic string/list manipulation

2015-07-01 Thread Strahinja Kustudić
I knew about that part, but from there how do you extract IP addresses from that list of hosts and put them in a string concatenated by a comma? On Wednesday, July 1, 2015 at 8:06:12 PM UTC+2, Brian Coca wrote: > > you could > > set_fact: mypeers={{ groups['gluster']|difference([inventory_hostna

Re: [ansible-project] Re: failed_when sequence logic

2015-07-01 Thread Tom Paine
Ok, got it. failed_when: > "foo bar" not in x or "baz bar" not in y etc. Thanks for the help Matt. Hottest July day on record with no air-con wasn't helping either :) -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe fro

Re: [ansible-project] Re: failed_when sequence logic

2015-07-01 Thread Tom Paine
Not convinced it's good syntax, for a failure_when I'd expect an OR. But ok. My issue is that I now I want to OR a bunch of multiline statements: failed_when: - > "long string with characters that need escaping" over many $%^&* lines - >

Re: [ansible-project] Re: failed_when sequence logic

2015-07-01 Thread Matt Martz
No, pretty sure that is correct, here is the output from the operation of 'True and False' in Python: In [1]: True and False Out[1]: False Like I said, they are ANDed not ORed. If you want to use an or, you are going to have to write it out such as: failed_when: true or false On Wed, Jul 1,

[ansible-project] Re: failed_when sequence logic

2015-07-01 Thread Tom Paine
Simplified, I've tried: failed_when: - true - false evals to false. Surely a bug? This is the post where sequences are said to evaluate as OR https://groups.google.com/d/msg/ansible-project/cIaQTmY3ZLE/c5w8rlmdHWIJ -- You received this message because you are subscribed to the Google Group

Re: [ansible-project] failed_when sequence logic

2015-07-01 Thread Matt Martz
When you give when, changed_when or failed_when a list, the items are ANDed, not ORed. On Wed, Jul 1, 2015 at 1:31 PM, Tom Paine wrote: > Having trouble understanding if there's a bug in failed_when, or my > understanding is incorrect - > > a *false* and a *true* are OR'ing in a YAML sequence to

[ansible-project] failed_when sequence logic

2015-07-01 Thread Tom Paine
Having trouble understanding if there's a bug in failed_when, or my understanding is incorrect - a *false* and a *true* are OR'ing in a YAML sequence to *false*: Fails (failed when evals to true): failed_when: - '"300 OK" not in command_result.stderr' Passes (failed when evals to

Re: [ansible-project] Re: v2 - issue running copy module

2015-07-01 Thread Brian Coca
this was temporary bug in the devel branch, I believe it has already been fixed (or the PRs that do are about to be merged). On Wed, Jul 1, 2015 at 1:38 PM, joshm wrote: > I'm seeing this as well with latest code as of 7/1/2015 > > > On Tuesday, June 30, 2015 at 11:51:02 AM UTC-7, Rodrigo B Brasi

Re: [ansible-project] Security question about a custom (in python) for accessing the gitlab API

2015-07-01 Thread Brian Coca
you can use vars_prompt or a store the credentials in a vault and then pass those as arguments to the script. On Tue, Jun 30, 2015 at 10:57 AM, Boris Mühmer wrote: > I am pretty new to Ansible and this group, so just a quick "Hello" to > everyone! > For my 1st questions I already got quick answer

Re: [ansible-project] Dynamic string/list manipulation

2015-07-01 Thread Brian Coca
you could set_fact: mypeers={{ groups['gluster']|difference([inventory_hostname])}} On Wed, Jul 1, 2015 at 10:20 AM, Strahinja Kustudić wrote: > I'm not even sure how to name this thread, but hopefully from the example > you will understand what I mean. > > I was reading this article > https://m

[ansible-project] Detecting os in conditional for local action

2015-07-01 Thread Andrew Swerlick
Is there a way to detect what OS ansible is being run on and to use that information in the condiational for a local_action task? In particular, I need create a temporary directory on the local machine to fetch a local file into. I'd like to use mktemp, but it behaves differently on Mac OSX vs

[ansible-project] Vagrant Ansible Provisioner - best practice

2015-07-01 Thread chinedu uzoka
Ive been asked to use Ansible to create a CI and CD pipeline - i have extensive knowledge of Puppet and know experience of Ansible - im almost two weeks in and after trying to model Ansible with same concepts derived from Puppet im almost happy Some frustrations aside i wondered whether I am do

[ansible-project] Re: v2 - issue running copy module

2015-07-01 Thread joshm
I'm seeing this as well with latest code as of 7/1/2015 On Tuesday, June 30, 2015 at 11:51:02 AM UTC-7, Rodrigo B Brasil wrote: > > Hello all! > > Does anyone had this issue using the copy module in v2 (2.0.0 0.0.pre)? It > was working in 1.9.2. > > > - copy: src=files/etc_logrotate.d_zabbix_agen

[ansible-project] nested regexp_replace in an ansible variable:

2015-07-01 Thread R. Dikkes
Hello all, I am currently looking at a quote issue in an ansible nested variable and i cannot get it clear why it is not working. Can you help me out? Some details: hostname: x55-n12 I want to get the first value (x55) with a regular expression: (.*?)(?=\-) and place this value in a file

Re: [ansible-project] Is it possible to access ansible facts from a custom fact!?

2015-07-01 Thread Brian Coca
facts are only information, i'm guessing you mean you have a custom fact gathering module, modules themselves do not get facts unless you pass them explicitly as an option. But they can use the shared module_utils/facts.py to get the same facts as the setup module gathers. -- Brian Coca -- Yo

Re: [ansible-project] Re: Should --tags work for playbooks?

2015-07-01 Thread Brian Coca
tags on plays should be applied to all tasks in the play, but the play itself should not be skipped. -- 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 an em

[ansible-project] Confusing about Ansible and Rundeck

2015-07-01 Thread zhz shi
Hi there, I have some confusing points about Ansible and Rundeck and posted a question on SO: http://stackoverflow.com/questions/31152102/is-it-a-good-idea-to-make-ansible-and-rundeck-work-together-or-using-either-one Could anybody help to give me some hints? Thanks a lot BR, zhz -- You re

[ansible-project] Security question about a custom (in python) for accessing the gitlab API

2015-07-01 Thread Boris Mühmer
I am pretty new to Ansible and this group, so just a quick "Hello" to everyone! For my 1st questions I already got quick answers using IRC, but now I think a mail would be better. The problem I have is the following: during the setup of virtual hosts I generate new users, with SSH key-pairs, an

[ansible-project] Dynamic string/list manipulation

2015-07-01 Thread Strahinja Kustudić
I'm not even sure how to name this thread, but hopefully from the example you will understand what I mean. I was reading this article https://medium.com/@jmarhee/deploying-a-glusterfs-storage-cluster-with-ansible-on-digitalocean-14dacd721e23 and in the middle of the article below the "Creating

[ansible-project] Force (dependant) roles with different params to be executed ?

2015-07-01 Thread Torsten Reinhard
Hi all, I have a playbook like: hosts: weblogic ... roles: - { role: weblogic, wls: "{{weblogic['12.1.3']}}" } - { role: weblogic, wls: "{{weblogic['12.1.1']}}" } The role "weblogic" itself has a dependency to a role "java/jdk" dependencies: - { role: java/jdk, jdk_version: "

[ansible-project] Regression suites..?

2015-07-01 Thread jang
There are a number of corner-cases in core ansible semantics that don't appear to be nailed down. I don't know about anyone else, but we certainly seem to have a knack of depending on those without realising it. I also note there seem to be a fairly high level of bug reports about regressions i

[ansible-project] Re: ec2 module, encrypted: true doesn't create EBS volume with encryption enabled

2015-07-01 Thread Pradeep Reddy
Checked the code in ec2.py that came along with my ansible version, As it turns out this version ansible 2.0.0 (devel de52cfb5d7) doesn't have the ec2.py with encryption support -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

[ansible-project] Re: ec2 module, encrypted: true doesn't create EBS volume with encryption enabled

2015-07-01 Thread Pradeep Reddy
Surprisingly, even with m3.large, which is a supported instance type for EBS encryption , Volume (100GB) is not being created with encryption enabled. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop r

[ansible-project] Re: Should --tags work for playbooks?

2015-07-01 Thread Barry Kaplan
Very interesting. My tasks were wrong: tasks: set_fact: vs tasks: - set_fact: No errors so it looked like the tags were being ignored. Correctly task syntax and tags are not ignored. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Should --tags work for playbooks?

2015-07-01 Thread Barry Kaplan
I have: --- - name: Dump data hosts: mesos_slave sudo: yes gather_facts: false tags: - mtc tasks: set_fact: dump_s3_bucket: product-data set_fact: dump_s3_folder: /dump But trying to use --tags yields: $ ansible-playbook -i inventory/aws/production playbooks/a