[ansible-project] maintaining database users

2014-10-14 Thread Ronald Rood
Hi,

I wrote a simple little oracle_user module in bash that accepts a username 
and a state (present|absent) that creates or deletes a user depending on 
the requested state. No action when user exists and state is present, 
create user when state is present and user does not exist. When user exists 
and state is absent, drop user and no action when state is absent and user 
does not exist.
Quite simple.

In a playbook it looks like:
---
- hosts: orardbms
  sudo: True
  sudo_user: oracle
  vars:
ORACLE_SID: ORCL

  tasks:
  - name: create or remove oracle users
action: oracle_user ORACLE_SID={{ ORACLE_SID }} ORACLE_USER={{ 
item.username }} ORACLE_STATE={{ item.state }}
with_items:
- { username : ronra,  state : present }
- { username : ronrb,  state : absent }
- { username : ronrc,  state : present }
- { username : ronrd,  state : present }

now my question: what about the users that are in the database and not in 
my list?
How can I detect the fact that users do exist in the database that are not 
in my list of managed users because they have been manually created by some 
backdoor procedure? I would like to get rid of them on the first run. The 
way it works now is that every user causes the invocation of the 
oracle_user script, that returns a simple answer for every user. Simple but 
not sufficient to catch aliens. How can I catch those aliens without making 
this much harder or creating extra data structures? A pointer to a simple 
example is very welcome.

Thanks,
Ronald.

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/81417dde-c39d-49fa-8a8a-bc63483f10a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible vs ssh-keys [Re: Globbing with Lookup]

2014-10-14 Thread Navid Paya
Here's how I did it. Created a directory with the public keys in it. For
instance:

base-ami/files/public_ssh_keys/jack.pub
base-ami/files/public_ssh_keys/jill.pub

- name: Create basic users
  user: name={{ item }} shell=/bin/bash groups=grabtaxi
  with_items:
- jack
- jill

And then used lookup to populate the keys:

- name: Use the public keys from the users for the their login
  authorized_key:  user={{ item }} key={{ lookup('file',
'public_ssh_keys/' + item + '.pub') }}
  with_items:
- jack
- jill

You could make it fancier using vars and all but I think you get the gist
of it.






On Tue, Oct 14, 2014 at 5:09 AM, Wawrzek Niewodniczanski m...@wawrzek.name
wrote:



 On Friday, 10 October 2014 08:50:11 UTC+1, Navid Paya wrote:

 Hi all
 Not sure if this is even the right tile. So I have a set of SSH keys, I
 want to be used as authorized keys for users. I've put all of them in a
 directory and am trying to do the job but nothing happens.


 Hi Navid,

 I 'm trying something similar, based on:
 http://blather.michaelwlucas.com/archives/1819

 Do you mind share your approach?

 Thanks,
 Wawrzek

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Ansible Project group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/ansible-project/E6--MjSuBJ8/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 ansible-project+unsubscr...@googlegroups.com.
 To post to this group, send email to ansible-project@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/3fc7e3fe-8278-49e7-a84a-29b24da097eb%40googlegroups.com
 https://groups.google.com/d/msgid/ansible-project/3fc7e3fe-8278-49e7-a84a-29b24da097eb%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFsFwzu2vK%3DuC7DoEvaOdTz9LyRLQSLjQ7C2AdEinasXiHgscg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Include ansible-galaxy playbooks from another playbook

2014-10-14 Thread Navid Paya
Bad choice of wording. So I like what a role in galaxy does so I download.
Now I want to override some of those role's defaults. In the case of this
rbenv role https://github.com/zzet/ansible-rbenv-role (which is also
available in galaxy), the version of Ruby it installs. If I include the
role using my site.file it just installs that role with its default values.

- hosts: all
  user: ubuntu
  sudo: true

  roles:
- base-ami
- nodesource.node
- rbenv
- rails

What's the right way of doing that?

On Tue, Oct 14, 2014 at 4:57 AM, Michael DeHaan mich...@ansible.com wrote:

 Now try to use an include statement in my role playbook

 I'm having a bit of difficulty following.

 Galaxy is only a mechanism of downloading roles, not playbooks, so I'm
 currently understanding this to mean you seem to be requesting that roles
 that are not found are not an error?

 Can you perhaps clarify?

 Thanks!





 On Sun, Oct 12, 2014 at 11:38 PM, Navid Paya m...@navidpaya.com wrote:

 Hi all
 I'm using an ansible-galaxy playbook. Right now I'm having it included
 using my site.yml file:

 roles:
   - nodesource.node
   - base-ami

 Now try to use an include statement in my role playbook but it raises an
 error since the playbook is an external one and not part of my playbook.
 Any way around that, like telling my playbook this is an ansible-galaxy
 playbook so don't expect to see it in the directory structure?

 - name: Include the nodesource.node playbook
  include: nodesource.node


  --
 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@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/2bf1fccd-c0e6-44fc-b7c0-ce75f934faef%40googlegroups.com
 https://groups.google.com/d/msgid/ansible-project/2bf1fccd-c0e6-44fc-b7c0-ce75f934faef%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to a topic in the
 Google Groups Ansible Project group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/ansible-project/ENJwHLN4ioA/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 ansible-project+unsubscr...@googlegroups.com.
 To post to this group, send email to ansible-project@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxm6p8ON8iO5HjQcDdKJ%2BFCJ%2BiGdYC0orCeckiZUTNWPw%40mail.gmail.com
 https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxm6p8ON8iO5HjQcDdKJ%2BFCJ%2BiGdYC0orCeckiZUTNWPw%40mail.gmail.com?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.


-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFsFwzu6cvwOE%2BU51j4TJLNrJiBXs1Hkf%3DYKhB5OwwmU%3DGqaOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Dependencies between tasks possible?

2014-10-14 Thread berndadamowicz
This will imply that the order in which tasks are executed in a playbook is 
from top to bottom and I only have to use the right order. Is this (the 
order of executing tasks) a guaranteed feature of Ansible?

Bernd

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/17dc964f-b9e2-4139-9e4f-08cdff2b857c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Dependencies between tasks possible?

2014-10-14 Thread David Karban
Hi Bernd,

yes, it is how ansible works. Tasks are executed from top to bottom in
order.

David

David Karban
Specialista na správu linuxových serverů
www.karban.eu

2014-10-14 11:34 GMT+02:00 berndadamow...@googlemail.com:

 This will imply that the order in which tasks are executed in a playbook
 is from top to bottom and I only have to use the right order. Is this (the
 order of executing tasks) a guaranteed feature of Ansible?

 Bernd

  --
 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@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/17dc964f-b9e2-4139-9e4f-08cdff2b857c%40googlegroups.com
 https://groups.google.com/d/msgid/ansible-project/17dc964f-b9e2-4139-9e4f-08cdff2b857c%40googlegroups.com?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.


-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOBFM95HBmkHtJgmyPpfdyzkzPx1MWq_YDVt2aXGzEj1OFyLNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Dependencies between tasks possible?

2014-10-14 Thread Tomasz Kontusz


berndadamow...@googlemail.com napisał:
This will imply that the order in which tasks are executed in a
playbook is 
from top to bottom and I only have to use the right order. Is this (the

order of executing tasks) a guaranteed feature of Ansible?
Yes, it is. It's one of the selling points actually, as it makes orchestration 
simpler.

Bernd

-- 
Wysłane za pomocą K-9 Mail.

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/febfa62e-4e1a-48cb-b66a-90d627930961%40email.android.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Including and overriding Ansible galaxy roles in my roles

2014-10-14 Thread Navid Paya
Hi
So this is a refined version of a question I asked before. I have a role 
that aims to:
  - Do some specific change such as creating users
  - Install nodejs and ruby using rbenv
  - Run a rails app

I'm using two dependencies from Ansible galaxy for that:
  - nodesource.node https://github.com/nodesource/ansible-nodejs-role
  - zzet.rbenv https://github.com/zzet/ansible-rbenv-role

How I do that at the moment is to install those roles using a 
requirements.txt file, and include them in my site.yml:

- hosts: all
  user: ubuntu
  sudo: true

  roles:
- base-ami
- nodesource.node
- zzet.rbenv
- rails

Now I have two questions.

1. Is there a way to include these roles from within one of my roles 
instead of the site.yml file so that I'll have just one role (base-ami) 
instead of four showing up in my site.yml. I tried to do something like 
this:

- name: Include the nodesource.node role
  include: zzet.rbenv

But then it would expect to see the role in my Ansible playbook. Is there a 
way to include a Ansible galaxy role from within my role?

2. I like what zzet.rbenv does but I want to change the version of Ruby it 
installs. According to the github page, that is controlled like this:

rbenv:
  env: user
  ruby_version: 2.1.2

How can I include this Ansible galaxy role in my base-ami role and then 
override these values?

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e44794a2-0c06-4337-92b5-b9bde5e5400a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] template backups in conf.d style locations

2014-10-14 Thread Adam Heath
Shouldn't such programs have a filter exclude setting?  dpkg and rpm 
will both place temp files into .d style folders, while installing a 
package.  I can't speak as to what temp extension rpm uses, but dpkg 
will create a $file.dpkg-new or $file.dpkg-old in such a folder.  Plus, 
vim creates .$file.swp.  So, it seems that these other programs will 
already need to have a way to exclude those files, and ansible should(or 
might already be) do something similar.


On 10/14/2014 03:50 AM, Josef Špak wrote:
I've just been auditing things and found that sometimes we used the 
template module with backups=yes even though it was configuring e.g. 
logrotate stuff in /etc/logrotate.d/


However, programs like logrotate may/will read all files in the 
directory, including the backups.


So perhaps this would be a useful tip.

I was also wondering - did anyone get burned by this?

Josef
--
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 
mailto:ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com 
mailto:ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4e462ee4-1802-44d0-905c-a8c04d4801d3%40googlegroups.com 
https://groups.google.com/d/msgid/ansible-project/4e462ee4-1802-44d0-905c-a8c04d4801d3%40googlegroups.com?utm_medium=emailutm_source=footer.

For more options, visit https://groups.google.com/d/optout.


--
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/543D50B0.1010402%40brainfood.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] template backups in conf.d style locations

2014-10-14 Thread Brian Coca
I've worked around it several ways:

- exclude specific extensions: *~ (also works for editor backups)
- include specific extensions: Include *.conf
- make the backups hidden: .backupfile

Also there might be an update in the works for making backups live on
the 'master' not on the target machines. Currently you can simulate
this with a fetch + file/absent set of tasks.

On Tue, Oct 14, 2014 at 9:34 AM, Adam Heath a...@brainfood.com wrote:
 Shouldn't such programs have a filter exclude setting?  dpkg and rpm will
 both place temp files into .d style folders, while installing a package.  I
 can't speak as to what temp extension rpm uses, but dpkg will create a
 $file.dpkg-new or $file.dpkg-old in such a folder.  Plus, vim creates
 .$file.swp.  So, it seems that these other programs will already need to
 have a way to exclude those files, and ansible should(or might already be)
 do something similar.

 On 10/14/2014 03:50 AM, Josef Špak wrote:

 I've just been auditing things and found that sometimes we used the
 template module with backups=yes even though it was configuring e.g.
 logrotate stuff in /etc/logrotate.d/

 However, programs like logrotate may/will read all files in the directory,
 including the backups.

 So perhaps this would be a useful tip.

 I was also wondering - did anyone get burned by this?

 Josef
 --
 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
 mailto:ansible-project+unsubscr...@googlegroups.com.
 To post to this group, send email to ansible-project@googlegroups.com
 mailto:ansible-project@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/4e462ee4-1802-44d0-905c-a8c04d4801d3%40googlegroups.com
 https://groups.google.com/d/msgid/ansible-project/4e462ee4-1802-44d0-905c-a8c04d4801d3%40googlegroups.com?utm_medium=emailutm_source=footer.
 For more options, visit https://groups.google.com/d/optout.


 --
 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@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/543D50B0.1010402%40brainfood.com.

 For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca
Stultorum infinitus est numerus
0111011100100110010101101110001001110111011000010110011101010010011100110110110101110111001001110111
Pedo mellon a minno

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADn%2BHswWoSD%3D188PQap6z1Ed3yoA0c9f0qrYvxcXqogt0iAsEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Escaping colon

2014-10-14 Thread John Oliver
  - name: Set iptables to log rejected packets 5
lineinfile: dest=/etc/rsyslog.conf
insertafter=^#kern\.\*\ \ *\/dev\/console
line={{item}}
with_items:
  -  ~
  - :msg,contains,\iptables \ /var/log/iptables.log
  - # iptables logs
  -  

The line :msg,contains,\iptables \ /var/log/iptables.log always bombs 
out.  I've tried:

\:msg,contains,\iptables \ /var/log/iptables.log

':msg,contains,iptables  /var/log/iptables.log'

':'msg,contains,\iptables \ /var/log/iptables.log

and I think a couple of other goofy things I found while Googling like 
enclosing everything after lineinfile: with strong quotes.

What the heck do I need to do to get that line to pass?

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ee2babe4-e3ca-4c0b-bba5-b54b4d779882%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] No color when running ansible SSH as an argument

2014-10-14 Thread Kevin Burton
If I ssh into a box , interactively, then run ansible, I get color, without 
any issue.

However, if I run it as a batch command, like:

ssh rele...@myserver.com ansible-playbook ... 

Then it doesn't have color.

The TERM is setup correctly and the same as when I run ssh interactively. 

Any advice?

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dfbf5fcd-43a4-4013-b5d9-d7f0c71fd84f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] No color when running ansible SSH as an argument

2014-10-14 Thread Adam Heath

Use ssh -t

On 10/14/2014 12:55 PM, Kevin Burton wrote:
If I ssh into a box , interactively, then run ansible, I get color, 
without any issue.


However, if I run it as a batch command, like:

ssh rele...@myserver.com ansible-playbook ... 

Then it doesn't have color.

The TERM is setup correctly and the same as when I run ssh interactively.

Any advice?
--
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 
mailto:ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com 
mailto:ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dfbf5fcd-43a4-4013-b5d9-d7f0c71fd84f%40googlegroups.com 
https://groups.google.com/d/msgid/ansible-project/dfbf5fcd-43a4-4013-b5d9-d7f0c71fd84f%40googlegroups.com?utm_medium=emailutm_source=footer.

For more options, visit https://groups.google.com/d/optout.


--
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/543D645D.7040803%40brainfood.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] No color when running ansible SSH as an argument

2014-10-14 Thread Kevin Burton
Ha. yup.  Realized that as I was posting the email... did I didn't try 
forcing the pseudo terminal :

... so basically I get to be that guy who pretty much answers his own 
question! :-P

Thanks for the help!

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1613d6dd-8bac-4274-bc93-2dd812166dff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Mapping out/visualizing Ansible Directory

2014-10-14 Thread Paul Angus
Hi all,

Has anyone come up with a way/tool to map out the playbooks, roles, tasks, 
templates, custom modules maybe even variables in an Ansible directory.

The use case is to:

A. Be able to pick up playbooks and understand their flow quicker (or at 
all) either ones I wrote wayy back or ones others have written.
B. Find tasks, package installs etc that I'm repeating (for no good reason)
C. Find orphaned code, roles etc that I wrote that are no longer refered to.

It;s a tall order I know, but would be really helpful.


Regards


Paul Angus

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/453bc811-1e25-4ac5-9e32-dd1a711693de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Role dependencies and ansible-galaxy

2014-10-14 Thread seaspicy
As per that issue (https://github.com/ansible/ansible/issues/9173), I am 
still experiencing problems despite the committed changes. I've removed the 
sample repositories linked to in that issue since all that is really needed 
to replicate this issue is the requirements.yaml file.

Given the following 
gist: https://gist.github.com/cspicer/7c3c37eaf8eff386f9ce

ansible-galaxy install will still fail using:

$ ansible-galaxy install -r requirements.yml

 Traceback (most recent call last):

   File /Users/spicy/Development/oss/ansible/bin/ansible-galaxy, line 
 901, in module

 main()

   File /Users/spicy/Development/oss/ansible/bin/ansible-galaxy, line 
 895, in main

 fn(args, options, parser)

   File /Users/spicy/Development/oss/ansible/bin/ansible-galaxy, line 
 711, in execute_install

 roles_left = map(ansible.utils.role_yaml_parse, yaml.safe_load(f))

   File 
 /Users/spicy/Development/oss/ansible/lib/ansible/utils/__init__.py, line 
 432, in role_yaml_parse

 if 'github.com' in role[src] and 'http' in role[src] and '+' not 
 in role[src] and not role[src].endswith('.tar.gz'):

 TypeError: string indices must be integers, not str


Not sure if this is my syntax that is an issue, or if this is still a bug. 
Should I file a new bug?

Thanks!

On Tuesday, September 30, 2014 12:05:09 PM UTC-7, Michael DeHaan wrote:

 Yeah so we have this is in the bug tracker now for Ansible I think, so 
 should be being tracked.

 https://github.com/ansible/ansible/issues/9173

 If not, please make sure there's a new bug.



 On Fri, Sep 26, 2014 at 4:00 PM, James Cammarata jcamm...@ansible.com 
 javascript: wrote:

 You can always use the --ignore-errors option too, so that the 
 installation continues if you're not concerned about those failures.

 On Fri, Sep 26, 2014 at 2:56 PM, seas...@gmail.com javascript: wrote:

 Great, thanks for the clarification!

 It looks like I am running into a bug then. If my requirements.yml 
 includes a role and that dependency itself has further non-galaxy 
 dependencies (say from GitHub for example), ansible-galaxy install will 
 fail to install the first level dependency and error out. I'm not expecting 
 it to resolve transitive dependencies (though that would be nice). I'll see 
 if I can create an example demo of this and then submit an issue.

 Thanks again!
  

 On Friday, September 26, 2014 12:46:48 PM UTC-7, James Cammarata wrote:

 Role dependencies that are not on Galaxy can be listed in the metadata 
 along with roles that are - however as Michael said, such roles should not 
 be shared via Galaxy since other users won't have access to them, and the 
 role will therefore not work.

 If you're writing a role for personal use however, you can list any 
 role dependencies there that you wish. The commented generated by the CLI 
 tool when using init to create a new role directly simply assumes that 
 the role will be uploaded to Galaxy, so really the comment should read # 
 If you're going to upload this role to Galaxy, be sure to list only 
 dependencies that are also available via Galaxy.

 Hope that clears things up.


 On Fri, Sep 26, 2014 at 11:46 AM, seas...@gmail.com wrote:

 Hi Michael,

 Thanks for your response. 

 Absolutely, I understand that Galaxy is not a private content store – 
 this is exactly what I'm trying to avoid. I think there might be 
 confusion 
 when I say galaxy the tool vs galaxy the service.

 I'm using ansible-galaxy as a role depsolver to download roles from 
 private GitHub repositories, and occasionally from Galaxy (the service). 
 Because Ansible itself seems to understand meta/main.yml in that it'll 
 include any dependencies listed there in a run, it seemed like it could 
 be 
 used for non-galaxy roles (ie private roles). Since this happens 
 automatically within Ansible, it is very useful to include both public 
 and 
 private roles in the meta directory.

 If it isn't intended to use the meta directory to list both open 
 source and internal deps, is there a functionally equivalent alternative?

 Thanks.



 On Friday, September 26, 2014 5:15:59 AM UTC-7, Michael DeHaan wrote:

 Is that a hard rule, that you can't add dependencies via the 
 meta/main.yml workflow? 

 Right, That's the only way you add dependencies.

 What that was saying is roles on galaxy should have all their 
 dependencies on galaxy, else the role should *not* be on galaxy.

 Why?  Because it's totally wrong to be sharing content with people 
 they can't use :)

 Galaxy is not a place for personal private content, it's a place to 
 share content with other OSS users.




 On Fri, Sep 26, 2014 at 4:06 AM, seas...@gmail.com wrote:

 Hi there,

 I'm currently using the in-development 1.8 version of Ansible to get 
 access to the enhanced requirements.yml features for the ansible-galaxy 
 command line tool. I'm using it to install roles from GitHub with the 
 appropriate config, and for the most part everything is working OK. 
 However, a few times 

[ansible-project] Cloudformation - What Does This Mean?

2014-10-14 Thread Tennis Smith

I'm using the cloudformation module 
http://docs.ansible.com/cloudformation_module.html to start a stack.  

Everything works.  But, I'd like to update the stack now that it is 
running. 

According to the documentation, the stack can be updated if the template 
changed (below)
https://lh4.googleusercontent.com/-2CKWsUSXuVM/VD2QHiBIISI/ACI/_37Nu24dz4w/s1600/screenshot.png

Just touching the template file with new date values doesn't work.  What 
about the template has to change before the module will update a running 
stack?

-T

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6feec89e-4b9e-4f7b-941f-7ac31347c059%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Looking for singleton... sort of.

2014-10-14 Thread Tiglath
 
In my app deployment scheme the first part happens locally, and the second 
part in the remote targets.   
 
Now, I want the first part to be executed only once no matter how many 
hosts the run is for, then the second part can be parallelized 
 
Is there a way to indicate that a part of the play execute a single time, 
and others once per host?   
 
Thanks
 
 
 
 
 

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/eab33dab-1cf2-44d6-958d-e3d43ca52fd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Looking for singleton... sort of.

2014-10-14 Thread Brian Coca
seems like you want run_once, just take into account that if you use
serial, it won't be per play but per serial batch

On Tue, Oct 14, 2014 at 3:59 PM, Tiglath te...@tiglath.net wrote:

 In my app deployment scheme the first part happens locally, and the second
 part in the remote targets.

 Now, I want the first part to be executed only once no matter how many hosts
 the run is for, then the second part can be parallelized

 Is there a way to indicate that a part of the play execute a single time,
 and others once per host?

 Thanks






 --
 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@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/eab33dab-1cf2-44d6-958d-e3d43ca52fd3%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca
Stultorum infinitus est numerus
0111011100100110010101101110001001110111011000010110011101010010011100110110110101110111001001110111
Pedo mellon a minno

-- 
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@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADn%2BHsw%3DkzcsRkDjAJ3x2e%2BLKhMBYpY0n3p5xEWXd_V%2BpP1nbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.