Thank you. I did read the documentation on truncate, but obviously not
closely enough.
--
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+un
Guys, please make it throw something better then python exception! I've
spent damn half an hour trying to run my playbooks ;(
On Monday, November 3, 2014 5:23:36 AM UTC-8, Michael DeHaan wrote:
>
> Doing "make deb" without getting the latest submodules first would leave
> some things out, yes.
>
I need the opposite of notify.
Basically, I have a 'foo-off' role to turn services / daemons off for a
specific host.
So if foo is the service, I want to stop foo , then apt-get remove it.
- service: name=foo state=stopped
... because the second time it's run the daemon isn't present because t
You should check out the jinja2 docs:
http://jinja.pocoo.org/docs/dev/templates/#truncate
truncate will add "..." unless you specify end=''
Also you might be able to use the "indent" filter for adding the spacing
for you:
http://jinja.pocoo.org/docs/dev/templates/#indent
On Saturday, December
I just built a Ubuntu 14.04 VM, and went through the same procedures. It
installed Ansible 1.8.2, not 1.9.
user@ubuntu:~$ uname -a
Linux ubuntu 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu:~$ dpkg -l | grep -i ansible
ii ansible
Hello,
I've got the following ansible code:
- name: check distro exists
with_items: distro
stat: path=/var/www/cobbler/ks_mirror/{{ item.name }}-{{ item.arch
}}/images/pxeboot/initrd.img
register: distro_file
when: distro is defined
- name: add distro to cobbler
shell: cobbler import
Furthermore, I can show that it is the 'truncate' part itself that is
adding the '...':
{% for item in collection %}
{{ item.name }}{{ "" |truncate(16-(item.name|length)) }}:{{
name.value }}
{% endfor %}
Produces the following output:
item1 ...:v01
item02 ...
I like your yaml template idea, but I did end up pushing the logic off into
my backend.cfg.j2 template:
{% for server in groups['web_servers'] %}
server{{ server }} {{ hostvars[server].ansible_fqdn
}}:{{ hostvars[server].http_port }} params
{% endfor %}
This is based off
I am trying to print a line of text to a file such that field1 is separated
from field2 by 16 characters. I have a template like this working:
{% for item in collection %}
{{ item.name }}{{ "" |truncate(16-(item.name|length)) }}{{
name.value }}
{% endfor %}
So the " " field is
Oh, meant to say be aware that win_template has been unmerged due to a
different issue.
On Saturday, December 20, 2014 5:19:25 PM UTC, J Hawkesworth wrote:
>
> Hmm... not sure the integration tests cover this, could be a bug.
>
> I'd try using
>
> od -cx your_template | more
>
> to make sure yo
Hmm... not sure the integration tests cover this, could be a bug.
I'd try using
od -cx your_template | more
to make sure you have got CR and LF at the end of your lines to start
with. If they are there in the template then please shout, as it sounds
like it might need a fix.
Jon
On Thur
I want to set a playbook variable to the root of my hg tree, i.e. capture
the output of the "hg root" command run on my local host. How do I do that?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop re
Thanks. I found out that win_copy has a pull request about to be merged
into 1.9
I also found a resource for copy.ps1 which works -- I don't need all the
bells and whistles and a rudimentary copy function is all that's needed for
now.
Although, for the purposes of just running a powershell scr
Following the official Ubuntu guide
(http://docs.ansible.com/intro_installation.html#latest-releases-via-apt-ubuntu)
I experienced the following problem:
$ ansible --version
> ansible 1.9
> configured module search path = None
> $ ansible all -m ping
> nas | FAILED => module ping not found in
Any ideas anyone?
On Friday, 19 December 2014 13:57:46 UTC+8, Michael Shi wrote:
>
> I'm trying to use the postgresql_user module, but I keep getting *unable
> to connect to database: fe_sendauth: no password supplied*
> Doing the same on postgresql_db module seems to work
> Is it a problem auth
When running ansible v1.8.2, in the below playbook, to_json fails to handle
a basic variable
- name: a play that runs entirely on the ansible host
hosts: localhost
vars:
users:
- bob
- joe
tasks:
# no problem
- debug: msg="{{users|to_yaml}}"
# ERROR: an unexpe
>
> let me elaborate a bit further:
>
The backend groups have a variable set for the webservice to call, that
webservice runs on one of the frontend boxes.
[backend:children]
backend-group1
backend-group2
[backend-group1]
be[1:3]
[frontend-group1]
fe1
[backend-group2]
be[4:6]
[frontend-grou
17 matches
Mail list logo