Sorry, I don't follow.
If I have functions that are common to many of *my *custom libraries, I'll
need to put them in
*/usr/lib/python2.6/site-packages/ansible/module_utils/mycommon.py* and
then import them in my libraries with *from ansible.module_utils.mycommon
import ** right?
Are you
Is there a way to call a filter_plugin from within a custom module?
For example, I've written a simple filter_plugin utils.py that contains a
'to_bytes' function. This filter is used from my play like: *debug:
msg={{'25GB'|to_bytes}}*.
I need to call the same function from within one of my
Thanks Brian.
Is there a way to add custom common functions?
On Friday, May 15, 2015 at 9:52:21 AM UTC-5, Brian Coca wrote:
no, filters are not available to modules, but modules do have a bunch
of common functions available, like 'pretty_bytes', probably the
reverse of what you want.
modules.
On Friday, May 15, 2015 at 10:21:52 AM UTC-5, Brian Coca wrote:
stuff in lib/ansible/module_utils/
On Fri, May 15, 2015 at 11:05 AM, Ananda Debnath
ananda@gmail.com javascript: wrote:
Thanks Brian.
Is there a way to add custom common functions?
On Friday, May 15
Known bug: https://github.com/ansible/ansible/issues/10251 and
https://github.com/ansible/ansible/issues/10564
--
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
A friend at work was wondering whether this has to do with the location of
the extravars.json file - I moved it out to the base directory of the
ansible project and added another var to make sure the extravars.json file
was being loaded - with no difference in results.
*Is this a bug or am I misunderstanding how variables are resolved based on
precedence? According to http://docs.ansible.com/playbooks_variables.html, *
* extra vars (-e in the command line) always win
* then comes connection variables defined in inventory (ansible_ssh_user, etc)
* then
to the domain, then
I can optionally remove the root keys. This is all done with Ansible.
On Saturday, February 14, 2015 at 11:10:11 AM UTC-5, Ananda Debnath wrote:
Thanks for looking.
There are too many current processes dependent on passwords that I'm
migrating to Ansible - while converting
specified in the
ssh_config file in order to use sshpass with the password specified in the
inventory file?
On Saturday, February 14, 2015 at 10:10:11 AM UTC-6, Ananda Debnath wrote:
Thanks for looking.
There are too many current processes dependent on passwords that I'm
migrating
:
Not the answer you're looking for, but why don't you just use ssh
keys? It's some minor work upfront with huge security and automation
benefits easier.
On Fri, Feb 13, 2015 at 3:51 PM, Ananda Debnath
ananda@gmail.com javascript: wrote:
Does anyone know of an example to do
Does anyone know of an example to do this using *password *authentication?
My inventory file has ansible_ssh_user and ansible_ssh_pass values set and
my ssh config file has password authentication set to yes.
*my.ssh.config*
Host 56.66.3.10
User king
HostName
Many thanks!
After a few hours of wresting with this and my setup, and a typo that my
eyes kept skimming over I finally got this working.
Thanks again for point it out to me Giovanni!
--
You received this message because you are subscribed to the Google Groups
Ansible Project group.
To
Hi Ansiblers,
I have an Ansible controller machine that contains my playbooks, custom
libraries, key files etc.
I have an inventory of host machines and CentOS VM's that run on these host
machines. The VMs aren't directly accessible from the Ansible box. To get
to each VM manually, I need to
Apologies if this topic has been hashed to death - but I wanted to follow
up to see if there is a simple/clever way to solve this problem. I too am
writing custom modules for Xen and there's a lot of boilerplate code common
to many such modules that would be better off in a common shared python
*ping* - any advice on passing variables from one role to another?
On Tuesday, November 25, 2014 8:58:49 AM UTC-6, Ananda Debnath wrote:
Hola,
I have a playbook with multiple roles mapped to multiple vms. I'm
registering a variable in the output of one of the tasks in role A and need
Thanks James.
I understand the recommendation - I'll look into decoupling one of these
days. For now though, I have a hard dependency - inventory-vm-A/role-A is
generating a signed cloudfront url (using aws creds that exist in vm-A)
that needs to be downloaded by inventory-vm-B/role-B without
Hola,
I have a playbook with multiple roles mapped to multiple vms. I'm registering a
variable in the output of one of the tasks in role A and need to pass it to
role B. Calling register or set_facts in the role A tasks file works as
expected within role A, but this var doesn't seem to make it
Thanks for looking Michael,
I was looking for an intuitive way for expressing nested variables in this
use case.
In my group vars, I specify 3 ec2 region/ami specs:
ec2_specs:
- { region: us-east-1, ami: ami-b66ed3de, count: 1, type: t2.micro }
- { region: us-west-1, ami: ami-b56e64f0,
Any recommendations?
--
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
Hi,
As others have before me, I find the syntax for nested loops somewhat
confusing :(
Consider my group_vars:
ec2_specs:
- { region: us-east-1, ami: ami-b66ed3de, count: 1, type: t2.micro }
- { region: us-west-1, ami: ami-b56e64f0, count: 2, type: t2.micro }
- { region: sa-east-1, ami:
I guess I could express it as a nested dict in the first place?
ec2_specs:
- { region: us-east-1, ami: ami-b66ed3de, count: 1, type: t2.micro,
containers: [{ name: NGINX_A, hostport: 443 }, { name: NGINX_B,
hostport: 444 }] }
- etc
I suspect though that if I need to express a large number
Any ideas?
On Thursday, October 30, 2014 10:17:30 PM UTC-5, Ananda Debnath wrote:
Thanks for responding Michael. Here's all the version info:
--
You received this message because you are subscribed to the Google Groups
Ansible Project group.
To unsubscribe from this group and stop
Gurus,
I'm trying to create a docker image from a Dockerfile in an ec2 instance.
I'm able to create the ec2 instances and copy over the dockerfile fine.
However, for *every* ec2 instance I fire up, it *always* fails the first
time I try to build the docker image.
- name: Build the docker
I agree with Michael on the variable expectations on idempotency here.
Is the command 'date' idempotent? It can be invoked with no arguments and
almost always *returns* a different value - but results in no *perceivable
state change on the system* where the command was called.
What about the
-nginx .
Sending build context to Docker daemon 2.56 kB
Sending build context to Docker daemon
Step 0 : FROM ubuntu:trusty
--- 5506de2b643b
Step 1 : MAINTAINER Ananda Debnath anandadebn...@micromail.com
--- Using cache
--- 7a9f0bc9d34f
Step 2 : RUN apt-get update
25 matches
Mail list logo