[ansible-project] Copying files on the remote host

2015-10-20 Thread brentgclarklist
Good day Guys How do I got about copying files on the remote host? My client up loads the cert in /srv, and I need ansible to copy it. This is what I got: - name: copy SSL key domain.key command: creates="{{ ssl_cert_dir }}/domain.key" cp "{{ ssl_cert_dir }}/domain.key"

[ansible-project] installing rvm: setting environment for role

2015-10-20 Thread r144
hello group, In order to install rvm for a user, I have tried the rvm1-ansible role. My playbook looks like this: roles: - machine - role: rvm_io.rvm1-ruby sudo: True rvm1_user: 'fuser' rvm1_rvm_version: 'stable'

[ansible-project] Re: Debugging Ansible with Packer

2015-10-20 Thread Jeremy Young
This is definitely a Packer question, but you can increase verbosity of the playbook run by doing something like this: { "type": "ansible-local", "playbook_dir": "/home/jyoung/git/ansible/playbooks", "staging_directory": "/opt/jeremydemo", "command": "ansible-playbook

Re: [ansible-project] Copying files on the remote host

2015-10-20 Thread Brian Coca
in 2.0 the copy module supports remote_src=true to copy files to/from the remote target in 1.x what you've got or the synchronize module. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

[ansible-project] Re: ec2 inventory to return Name tags

2015-10-20 Thread Alexey Vazhnov
Try to set in your ec2.ini: destination_variable=Name On Friday, October 16, 2015 at 10:16:13 AM UTC+5, Nicolas G wrote: > > Hi, > > I'm able to run Ansible on AWS using ec2.py successfully but unfortunately > I get the public DNS of the instance instead of the Name tag : > > ansible -i

[ansible-project] Re: Can not attach CM rom in Vmware

2015-10-20 Thread Nick Vanadium
Dude, thank you so much. It worked! Of course I tried moving the entry everywhere else other than what you suggested lol. But yeah man you finally gave me some peace. On Sunday, October 18, 2015 at 4:30:15 AM UTC-4, Markus Ellers wrote: > > hi, > > try making vm_cdrom a parameter under

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

2015-10-20 Thread Ivan Smirnov
Thank you, Brian. But how do I do this provided that (as I mentioned in the first post): 1. Files to include with vars_files ot include vars are located by the path configs\*\config.json, and this path should be processed dynamically (the names of directories * and the number of directories are

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

2015-10-20 Thread Brian Coca
1. can be solved using either a find task or a lookup (fileglob, pipe, etc) 2. you can set facts on each file using the path for namespacing -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

[ansible-project] Re: protect ansible code ?

2015-10-20 Thread Alejandro Comisario
thanks for the answer Brian On Tuesday, October 20, 2015 at 9:59:44 AM UTC-3, Brian Coca wrote: > > short answer: No > long answer: Even if we supported encryption, the users would need to be > able to decrypt it to execute. Ansible being open source and python it > would be trivial to dump to

[ansible-project] lineinfile Best Practice?

2015-10-20 Thread Josef Fortier
What ideas do others have on Best Practice for using lineinfile? As a potential conversation starter, here's a couple of ideas that have recently gelled for me: 1) Use two rules: * First delete all versions of the line * Then add the finished version of the line. This makes the process more

[ansible-project] Copying file from server1 to server 2

2015-10-20 Thread Ramon Bautista
Hello, I can't seem to copy a tar over from one server (server01) to another(server02). I am trying to do this from a server called server03.helpme.com This is part of my hosts file: [dev] server01.helpme.com:7723 This is my playbook: --- - hosts: [dev] tasks: - name: Tar up /home

[ansible-project] hiera eqivalent and proxy feature feature

2015-10-20 Thread marco giovannini
Hi I would like to know if there is an equivalent feature of hiera (overriding or appending values of variable) and if exist sort of 'ansible proxy' sort of syndication master of Salt. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] user module doesn't work properly

2015-10-20 Thread Koji Tanaka
Hello Ansible Community, I have a task described below, and it works fine if the user account has been managed by Ansible since the moment of the user account creation. However, this task always ends with "changed" status when I try to manage an existing user account on an existing server. Has

[ansible-project] Re: protect ansible code ?

2015-10-20 Thread esco real
Hello, I don't know what's the real use case here. If you want to hide how you configure/deploy a system or software for your customer then this doesn't make much sense. If you administer the system then this is no problem at all. And if your customer manages the system by himself he would

[ansible-project] Re: lineinfile Best Practice?

2015-10-20 Thread esco real
Hello Josef, could you explain what exactly the problem is here? Maybe posting some examples with actual/ and expected results? I have different relay hosts in main.cf, too. I just use a var per group and lineinfile to set relay and didn't have a problem with that. esco -- You received this

[ansible-project] Re: Can not attach CM rom in Vmware

2015-10-20 Thread Markus Ellers
You're welcome. Sometimes all it takes is a fresh pair of eyes. -- 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.

[ansible-project] Re: lineinfile Best Practice?

2015-10-20 Thread Josef Fortier
Hi Esco: On Tuesday, October 20, 2015 at 3:31:11 PM UTC-5, esco real wrote: could you explain what exactly the problem is here? Maybe posting some examples with actual/ and expected results? Nothing insurmountable. Just trying to formulate in my own mind what works the best. I was/am able to

Re: [ansible-project] Re: apt module fails with non-root sudoer ("Permission denied")

2015-10-20 Thread Markus Ellers
ah, sorry about that. You would have to use sudo on the task and become on the overall play. You can not user both "side by side". But you are right, you can and should achieve that without the old sudo stuff, I only suggested that because it works for me right now. Now, I went back and tried to

Re: [ansible-project] lineinfile Best Practice?

2015-10-20 Thread Brian Coca
rule 0) If at all possible, use template module instead, it gives you full control and verification. -- 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

[ansible-project] Whether and how to propose a change to the iam_policy module

2015-10-20 Thread Jaime Bermudez
Hello! I was so enticed by the iam modules slated for Ansible 2.0 that I decided to download the current devel them into a 1.9.4 project and see if they would work... and they do! At least, for what I'm trying to do which is to create an iam role and then attach a policy to it. What I

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

2015-10-20 Thread CyberCyber
Hi Brian, Can you elaborate on the several things that are wrong with the approach taken above? It seems dynamic variables do not carry over from each play. Is this intentional ? Your suggestion would work, but won't that require server_B to have access to server_A. What if that is not an

[ansible-project] Send payload using uri module

2015-10-20 Thread Igor Cicimov
Well first of all if you check the module docs http://docs.ansible.com/ansible/uri_module.html you can see that body_format was introduced in ansible 2.0 so you can't use it in 1.9.1 It also shows an example of supplying the json file to the body parameter that looks much cleaner than what you

Re: [ansible-project] Send payload using uri module

2015-10-20 Thread Sharwari Phadnis
Yes, I tried that. It worked. Thanks. On 21-Oct-2015 9:48 am, "Igor Cicimov" wrote: > Well first of all if you check the module docs > http://docs.ansible.com/ansible/uri_module.html you can see that > body_format was introduced in ansible 2.0 so you can't use it

[ansible-project] Re: protect ansible code ?

2015-10-20 Thread Brian Coca
short answer: No long answer: Even if we supported encryption, the users would need to be able to decrypt it to execute. Ansible being open source and python it would be trivial to dump to file the decrypted in memory copy of the encrypted files you loaded. It would be a lot of effort to

[ansible-project] Using yum module to install gnome-desktop-environment on CentOS 7 does not work

2015-10-20 Thread Nathan Sowatskey
HI I am working on a role here: https://github.com/DevOps4Networks/ansible-linux-desktop-role Which is used in a Packer build here: https://github.com/DevOps4Networks/opendaylight-integration-packaging-devtools/tree/master/packer When I attempt to use the yum module to install the group