It looks like I will need to flatten out the structure, just want somebody
to confirm that there is no other obvious way.
On Tuesday, September 30, 2014 10:24:29 PM UTC-7, Sergey Sudakovich wrote:
>
> I have a dictionary like this:
> ppools:
> one:
> devices:
> - abc
>
You can iterate through it in a jinja template, though only for a fixed
depth as you would need to code each iteration level manually (AFAIK)
{% for p in ppools %}
{% for devices in ppools[p].devices %}
etc
On 1 October 2014 09:28, Sergey Sudakovich wrote:
> It looks like I will need to flatten
Thanks!
Having the same user to do the connection and run sudo does not seems a
good fit.
And SU is not an option since the password cannot be stored in the
inventory file.
On Tuesday, September 30, 2014 7:36:40 PM UTC+2, tkuratomi wrote:
>
> On Tue, Sep 30, 2014 at 11:41 AM, Andreas Calvo
> >
Hi,
I am using ansible 1.7.2 and see the chown is not working
olga@ubuntu:~/ansible/try/02$ ansible localhost -u root -k -m file -a
'path=/tmp/test6 state=directory mode=0700 owner=root'
SSH password:
localhost | FAILED >> {
"failed": true,
"gid": 1001,
"group": "olga",
"mode
Hi,
I just found fetch does not work very well with filenames has spaces in
them. so I wrote a test script.
##
name: report | fetch auditusage report from server
fetch: src="{{ item }}"
dest=/tmp/fetched
with_items:
Hello fellow ansible users.
I have a process that turns on ec2 instances, then subsequently adds said
instances to their respective load balancers. I get very intermittent
results, sometimes the playbook will complete successfully, even
consecutively at times. No matter what I do, ( change log
Hello,
The filter reverse returns a reverselistiterator and will be inappropriate
here.
I suggest you to use *with_items: *your_liste*[::-1] *
Regards,
Le mercredi 7 mai 2014 12:43:04 UTC+2, Aleksey Smart a écrit :
>
> Hello!
>
> I use zfs module for creating necessary structure.
> Using
Guys,
I can use boto to create instance, but my problem, i dont know how to add
tag when use it & get ip address.
If i use ansible, i can give tag name & get ip address of new instance, but
the problem the default of root size is 8GB.
How can i add my python file to create instance in ansible/ ed
Hi,
This is in reference to a CentOS 6.5 host using ansible as a vagrant
provisioner.
I added "export ANSIBLE_KEEP_REMOTE_FILES=1" to
/etc/profile.d/ansible_debug.sh so that all users would pick up the env
var.
However, after running ansible, there aren't any files in
/home/vagrant/.ansibl
So we stumbled upon this strange thing today while we are implementing and
testing Ansible.
We are sshing with keys to a server with ansible. from there we can run
playbooks as usual against hosts. What we don't understand is this:
We do the following:
ssh -A ansible-test-machine
ansible-playb
You are SSHing as root, is permitremoterootlogin enabled?
Op woensdag 1 oktober 2014 13:36:16 UTC+2 schreef olga:
>
> Hi,
>
> I am using ansible 1.7.2 and see the chown is not working
>
> olga@ubuntu:~/ansible/try/02$ ansible localhost -u root -k -m file -a
> 'path=/tmp/test6 state=directory mode
Hello folks,
New to ansible, using version - 1.7.2. I am trying to write a play to
launch an instance on AWS and install my packages on it. i need to
automatically add the DNS name of the launched instance to my hosts file.
But i am getting the error - One or more undefined variables: 'instance
Hello. I would like to reuse some ansible code in roles tasks. For example,
installation of packages for multiple destination operation systems from
local files:
roles/includes_common/pkg_from_files.yaml:
---
- name: uploading package
copy: src="../{{current_role}}/files/{{name}}.{{generic_pkg
Hello Fellow ansible users,
I am new to ansible, using version 1.7.2 on Mac OSx. I am trying to launch
aws instances and install our code on them as part of an automated
deployment process.
I am following this example http://docs.ansible.com/guide_aws.html
And my playbook is located here
https
Issue with files created by Ansible
I’m looking at using to setup some new servers at a new ISP and I’ve been
doing some basic steps to test first. I am new but have done some testing
on diff servers at another ISP which seemed to go OK (I had created files
there no problem). Both are Unbuntu
So I'm running 3 CentOS 6.5 machines and came upon this thing which I don't
understand.
server 1: client machine
server 2: ansible machine
server 3: any target machine controlled by ansible.
server 2/3 both have my public key. so when I ssh to them from server 1, it
all goes well.
I ssh from s
All -
I am having hell with this:
getLog = ansible.runner.Runner(
forks=100,
inventory=ansible.inventory.Inventory('inventory'),
module_name='fetch',
module_args='src=/tmp/logs.tar.gz dest=./output/?/logs flat=yes
validate_md5=no',
).run()
In line 5, you can see I put a whole bunch of
Typically "name" has been used to provide a user readable comment and we
haven't added code for ecosystem things that aren't part of the ansible
project.
One thing of caution to mention is that, currently, on the include this
would set a variable called "description".
My gut feeling is some playb
As an initial question, what is ansible --version ?
On Mon, Sep 29, 2014 at 10:23 PM, Paul Yan wrote:
> Hi,
>
> I just found fetch does not work very well with filenames has spaces in
> them. so I wrote a test script.
> ##
> nam
Newer versions of Ansible can iterate across iterators in that "with" and
should not present a problem.
On Wed, Oct 1, 2014 at 4:03 AM, Nicolas Dupont-Jubien <
nicolas.dupontjub...@gmail.com> wrote:
>
> Hello,
>
>
> The filter reverse returns a reverselistiterator and will be inappropriate
> he
First off, what's ansible --version?
Second, can you show the line you have tried using the variable?
This is a more-appropriate question for ansible-devel in the future.
Thanks!
On Tue, Sep 30, 2014 at 2:11 PM, CJR wrote:
> All -
>
> I am having hell with this:
>
> getLog = ansible.runner.R
Please open a ticket if the recent changes on the development branch do not
resolve things for you.
Thanks!
On Tue, Sep 30, 2014 at 3:32 PM, Lui wrote:
> Actually, it doesn't make the change.. it just says it did (step marked in
> yellow)
>
>
> On Tuesday, September 30, 2014 3:06:42 PM UTC-4, L
You can kill this thread as I submitted a duplicate, updated one later on.
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...
"if you look at yum, it gets binaries and installs them, with a very simple
recipe."
I'm aware of what yum is but I'm unclear on what "recipe" means here.
I gather you are trying to build a module to automatically install Oracle,
where that feels like it should be a role to me.
Oracle is not a s
Restructing it slightly, you could use the "with_subelements" lookup:
http://docs.ansible.com/playbooks_loops.html#looping-over-subelements
On Wed, Oct 1, 2014 at 3:35 AM, Serge van Ginderachter <
se...@vanginderachter.be> wrote:
> You can iterate through it in a jinja template, though only fo
The user you connect as, and sudo to, are both seperately configurable.
On Wed, Oct 1, 2014 at 6:23 AM, Andreas Calvo wrote:
> Thanks!
>
> Having the same user to do the connection and run sudo does not seems a
> good fit.
> And SU is not an option since the password cannot be stored in the
>
For starters, what ansible --version are you using?
On Tue, Sep 30, 2014 at 11:49 AM, Nate Dobbs
wrote:
> Hello fellow ansible users.
>
> I have a process that turns on ec2 instances, then subsequently adds said
> instances to their respective load balancers. I get very intermittent
> results,
Start here for basic info and let us know if you have specific questions:
http://docs.ansible.com/ec2_module.html
http://docs.ansible.com/guide_aws.html
On Tue, Sep 30, 2014 at 3:26 AM, wholanda Edwart
wrote:
> Guys,
> I can use boto to create instance, but my problem, i dont know how to add
>
Reading your playbook above, there's no point at which you register into a
variable called "instances", which is the problem.
Move your debug line up and see what is in it:
- debug: var=ec2_info
On Tue, Sep 30, 2014 at 12:45 AM, Andy Raj wrote:
> Hello folks,
>
> New to ansible, using version
That parameter needs to be set on the control machine, not the remote.
I suspect that's what's happening to you, perhaps?
On Tue, Sep 30, 2014 at 4:30 PM, Tennis Smith wrote:
> Hi,
>
> This is in reference to a CentOS 6.5 host using ansible as a vagrant
> provisioner.
>
> I added "export ANSI
"You are SSHing as root, is permitremoterootlogin enabled?"
If that were the case the error would appear further up.
Also sudo isn't being used because of the "-u root"
Is there anything unusual about /tmp we might need to know?
On Wed, Oct 1, 2014 at 7:40 AM, Mark wrote:
>
> You are SSHing
I'm having a bit of difficulty following the above, but I did want to point
out that ansible is not doing anything to move/store your key.
On Wed, Oct 1, 2014 at 6:48 AM, Mark wrote:
> So I'm running 3 CentOS 6.5 machines and came upon this thing which I
> don't understand.
>
> server 1: clien
The ec2 module is actually not returning this as an error, where you have
it, there is no global named "item".
This error message is appropriate.
You'll need to debug a variable that's actually in scope :)
On Tue, Sep 30, 2014 at 12:03 PM, Andy Raj wrote:
> Hello Fellow ansible users,
>
> I
A few pedantic things: Roles don't actually hold code, and this seems to
be more of a question about how to split up things that vary between OS
than about reuse.
Attaching a "when" to an include is fine if you'd like to do this, or you
could keep the tasks inline. This is fine.
The "pkg_from_f
As this is somewhat long, I understand your question to be about this:
" The file “authorized_keys” in the .ssh directory exists and appears to
have the correct permissions and does have the correct content. But trying
to login via SSH acts as if it is not there."
I see you have the task to copy
As an example https://galaxy.ansible.com/list#/roles/628, my role to
install Oracle's java on ubuntu/debian.
It has similar requirements, though lot simpler than the DB install.
--
Brian Coca
Stultorum infinitus est numerus
0111011100100110010101101110001001110111011000010110111
I'm not sure if I can make it any clearer than this.
Server 1 has the private key. Server 2 and 3 have the public key of server 1
If I connect to server 3 from server 1 through server 2 I would need to use
ssh -A, since it needs to take my key from server 1, through 2 to 3.
This is done through S
Hi
On Wed, Oct 01, 2014 at 03:48:52AM -0700, Mark wrote:
> So I'm running 3 CentOS 6.5 machines and came upon this thing which I don't
> understand.
>
> server 1: client machine
> server 2: ansible machine
> server 3: any target machine controlled by ansible.
>
> server 2/3 both have my public k
Check to see if you still have the control persist sockets open,
ansible will reuse those and the forwarding settings will be the ones
used to create the socket, so if created with -A, forwarding will
continue to work.
--
Brian Coca
Stultorum infinitus est numerus
0111011100100110010101101110
So, reducing this to a more simple example:
getLog = ansible.runner.Runner(
forks=100,
inventory=ansible.inventory.Inventory('inventory'),
module_name='command',
module_args='echo "{{ansible_ssh_host|default(inventory_hostname)}}"',
).run()
In the above, I can confirm that standar
I am running Ansible version 1.7.
I have tried many different flavors of variables. I have tried using
Ansiable syntax:
module_args='src=/tmp/logs.tar.gz dest=./output/{{ inventory_hostname
}}/logs
...as I would in a YML playbook.
On Wednesday, October 1, 2014 8:05:23 AM UTC-4, Michael DeH
Matt -
Thanks for the assistance. I will try that shortly and see if I get the
desired effect. I hadn't been using default() around it...
On Wednesday, October 1, 2014 8:44:49 AM UTC-4, Matt Martz wrote:
>
> So, reducing this to a more simple example:
>
> getLog = ansible.runner.Runner(
>
So, allthough I have not specified ControlPersist in the playbook, nor in
.ssh/config , when I reconnect to the machine in a short enough time and
run the playbook to server 3, the ssh tunnel is still open and will be used
by Ansible?
So what I want, is probably, a way to close the tunnel when
ansible by default tries to use control persist (you can turn this off
in ansible.cfg) if using a new enough version of openssh as it speeds
things up considerably.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this grou
Ah! Thank you.
-T
On Wednesday, October 1, 2014 7:19:26 AM UTC-5, Michael DeHaan wrote:
>
> That parameter needs to be set on the control machine, not the remote.
>
> I suspect that's what's happening to you, perhaps?
>
>
>
> On Tue, Sep 30, 2014 at 4:30 PM, Tennis Smith > wrote:
>
>> Hi,
>>
>>
Thank you for the comment.
'name' is always printed when you play. If name is long, the output
becomes too verbose.
I mentioned the Sphinx in the previous mail, but we can implements an
ansible command which can output description.
When many people write playbooks for a long time, it is easy to
Thanks for the idea Michael, I had verified that the
correct/user(testjunk01 variable set in playbook) file was being created. I
don't think that the fact that SSH didn't appear to use the file is the
root issue but a symptom.
>From trying to display the .ssh directory which contains the file,
This did it! Thanks, I was not including the '|default(...)' piece.
On Wednesday, October 1, 2014 8:44:49 AM UTC-4, Matt Martz wrote:
>
> So, reducing this to a more simple example:
>
> getLog = ansible.runner.Runner(
> forks=100,
> inventory=ansible.inventory.Inventory('inventory'),
>
FYI. I submitted a doc update.
-T
On Wednesday, October 1, 2014 7:19:26 AM UTC-5, Michael DeHaan wrote:
>
> That parameter needs to be set on the control machine, not the remote.
>
> I suspect that's what's happening to you, perhaps?
>
>
>
> On Tue, Sep 30, 2014 at 4:30 PM, Tennis Smith > wrote:
Here's the code change to restart the container if env vars have changed:
https://github.com/forty9ten/ansible-modules-core/compare/ansible:devel...devel
Let me know what you think.
I know in the previous post I also talked about also checking other
parameters such as volume and port.
Maybe tha
Thank you for replying. I knew I left something out.
Ansible version: ansible 1.7.2
Boto version: 2.32.1
On Wednesday, October 1, 2014 8:16:06 AM UTC-4, Michael DeHaan wrote:
>
> For starters, what ansible --version are you using?
>
>
>
> On Tue, Sep 30, 2014 at 11:49 AM, Nate Dobbs > wrote:
>
I had been confused how a problem that looked that bad could get thru user
testing. Well it turns out that Ansible testing didn't catch the problem
because the problem was on my end and NOT with Ansible. Because I had not
set the X-execute permission on the .ssh directory the "ls" command
could
So I havent made any progress with this, and given the lack of response I
take it this will not work?
The workaround hack it is then
/Micke
On Friday, September 26, 2014 3:00:59 PM UTC+2, Mikael Sandström wrote:
>
> Hi,
>
> I've got the following structures (or at least I'm hoping to be able to
Thank you, ended up flattening it and using subelements.
On Wednesday, October 1, 2014 5:15:17 AM UTC-7, Michael DeHaan wrote:
>
> Restructing it slightly, you could use the "with_subelements" lookup:
>
> http://docs.ansible.com/playbooks_loops.html#looping-over-subelements
>
>
>
> On Wed, Oct 1,
ansible-playbook --version
ansible-playbook 1.8 (devel 1d3a8bd39c) last updated 2014/09/18 10:33:54
(GMT -400)
Hi!
I've written a custom iterator that works when I put it in
ansible/lib/ansible/runner/lookup_plugins, however I can't seem to get it
found when I put it with my playbooks . . . does
Had the same problem. Managed to solve it using this way to access the
value:
debug: msg="{{ hostvars[item]['ansible_default_ipv4']['address'] }}"
with_items: groups.web_servers
On Friday, April 25, 2014 4:07:47 PM UTC+2, Sébastien Han wrote:
>
> No one?
>
> On Wednesday, April 23, 2014 3:34:47
I'm trying to use the new exclude_hosts option as part of the drained state
on the wait_for module (https://github.com/ansible/ansible/pull/7260). I'm
using the latest source from git.
However I'm getting the following error:
Traceback (most recent call last):
File
"/home/monk/.ansible/tmp/an
Hi,
I run ansible 1.7.2 under ubuntu 14.04 amd64
I made a playbook to upgrade only package that I added to a list.
(
https://github.com/johan-chassaing/linux/blob/master/ansible/playbook/package_upgrade_list.yml
)
So, I retrieve the list of every packages that need to be upgraded on my
se
Hi Guy,
If this is a lookup plugin, you should be able to put it in a directory
named "lookup_plugins" at the same location as the playbook. I can't find
any documentation or code referencing this working in roles though, so I
don't believe you can embed lookup plugins in a role at this time (whic
Hi Kevin, this appears to be a bug. Could you please open a GitHub issue
for this? The fix for this is to remove the `.split(',')` from that line.
On Wed, Oct 1, 2014 at 4:18 PM, Kevin Formsma
wrote:
> I'm trying to use the new exclude_hosts option as part of the drained
> state on the wait_for
Awesome! yes, so moving my plugin, 12fcmds, to
ansible_root/lookup_plugins/12fcmds.py allowed me to use the plugin as:
- name: Test of with_cmd
template: src=cmd.j2 dest=/tmp/{{ item.key }}.txt
with_12fcmds: test_var
tags: test
This reply is mostly for posterity . . .
Thanks!!
Guy
On Wed
If I understand your intent, it is to only update Apache if it is already
installed, so that systems without Apache on them won't accidentally have
it installed by mistake. A better way to go about this would be to have an
"apache" or "webserver" group, and assign that group only to the servers
tha
The 'file' module could use the "directory_mode" directive.
And 'unarchive' could use "owner", "group", "mode", "serole", "setype",
etc. As well as "directory_mode"
Unless I'm completely missing something, but it seems I should be able to
unzip a local archive to the target, set ownership and
Hi John,
Those options should be available to both of those modules - I believe it
is a mistake in the documentation that they are missing. If you have any
trouble specifying those options with either module please let us know, and
I will get the documentation updated in the mean time.
Thanks!
O
Also, as far as the directory_mode option goes, the copy module is the only
one that uses that, so it is not available in the other modules.
On Wed, Oct 1, 2014 at 7:25 PM, James Cammarata
wrote:
> Hi John,
>
> Those options should be available to both of those modules - I believe it
> is a mist
65 matches
Mail list logo