On Friday, May 8, 2015 at 12:04:52 AM UTC+3, John Oliver wrote:
>
> I'm using 'unarchive' to extract a tarball to /tmp/ Inside, I have a
> shell script with includes references to relative paths. This made my
> script fail as it was looking for the files relative to whatever directory
> it's
On Wednesday, May 6, 2015 at 4:33:43 PM UTC+3, Randy Bush wrote:
>
> have a playbook bit to distribute syslog-ng.conf to a bunch of servers,
> some running syslog-ng 3.3 and some running 3.5. so there are two
> different configuration files.
>
> is there a way to detect which version a host i
Randy, FYI: the output of that script (after beautifying it a bit):
{
"changed": false,
"rc": 0,
"ansible_facts": {
"rsyslog_ver": "5.8.6,"
}
}
(The trailing comma in the rsyslog_ver value is redundant but you should
get the idea.)
--
You received this message because y
On Friday, May 8, 2015 at 12:31:04 PM UTC+3, Yassen Damyanov wrote:
>
>
> On Friday, May 8, 2015 at 12:04:52 AM UTC+3, John Oliver wrote:
>>
>> I'm using 'unarchive' to extract a tarball to /tmp/ Inside, I have a
>> shell script with includes references to relative paths. This made my
>> scri
Hi,
Without quotes I get the same error without quotes...
- name: Vhosts apache config
template: src=apache_vhost.j2 dest=/etc/apache2/sites-available/{{
item.domain }}.conf
with_items: apache.vhosts
when: ansible_os_family == 'Debian' and item.state == 'availible'
tags:
- apache
n
On Monday, May 4, 2015 at 4:13:13 PM UTC+3, Ivan Müller wrote:
>
> Hi there before all thanks fot the amazing work that you already done
>
> Is only one thing that keep make me noise when I use Ansible, normally I
> use RVM to handle different versions of ruby and every time that i need to
> r
That's the puppy!
Thanks for the insight. That template syntax doesn't seem to be documented
anywhere that I can see. Might be useful if it was...
Thanks
Jerry
On Thursday, 7 May 2015 17:06:40 UTC+1, Brian Coca wrote:
>
> not sure why you expect those vars to be part of host, your definition
Hi
When I execute a playbook through the playbook Python API, is there a way
to toggle the verbosity of the output? I have enabled logging for Ansible
by configuring the `log_path` variable as well as by using a `log_plays`
callback, but have not succeeded in achieving very verbose output of
A
it sounds like the ansible process is dieing but the sockets are not
being closed, can you check dmesg to see if there are any resource
issues?
On Thu, May 7, 2015 at 4:16 PM, John Oliver wrote:
> This is odd. I can ssh into the host in question, no problem. In the logs,
> I get:
>
> May 7 13:
The first one I would look at is sudo (/etc/sudoers), as it normally
resets all env variables for a user.
--
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
On Friday, 8 May 2015 23:27:09 UTC+10, Brian Coca wrote:
>
> The first one I would look at is sudo (/etc/sudoers), as it normally
> resets all env variables for a user.
>
The contents of my /etc/sudoers and /etc/sudoers.d/* files are:
Defaults env_reset
Defaults mail_badpass
Defaults
secure_pa
try: sudo sh -c 'echo $PATH'
su can readd path info, the above is closer to what ansible does (it
uses sudo -u not sudo su).
--
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
On Fri, 8 May 2015 11:55 pm Brian Coca wrote:
try: sudo sh -c 'echo $PATH'
su can readd path info, the above is closer to what ansible does (it
uses sudo -u not sudo su).
$ sudo sh -c 'echo $PATH'
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/opt/vc/bin
--
You
The templates are jinja2, you can find the documentations at
http://jinja.pocoo.org/docs/dev/
--
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 email
to
something like:
lookup('pipe', 'grep private_key_file /etc/ansible/ansible.cfg|cut -f2 -d"="')
--
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 email
t
Is there any way to use no_log with ansible ad-hoc commands?
--
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
>From that error it looks like there is no python at /usr/bin/python at
the target host, normally this is due to not having python install or
having it in an alternate location (which you can direct ansible to
with the ansiblie_python_interpreter variable).
On Thu, May 7, 2015 at 11:13 AM, Oscar B
I can successfully fetch a file with an explicit src. However, when I try
to use with_items, I am getting a "remote file does not exist" error.
It doesn't matter whether I use a hard-coded list for with_items or a
variable.
Here is the playbook:
---
- hosts: '{{ hosts }}'
tasks:
- name: Li
try
src={{item}}
$var was removed from ansible several versions back.
--
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 email
to ansible-project+uns
That worked, thanks.
On Friday, May 8, 2015 at 11:11:42 AM UTC-5, Brian Coca wrote:
>
> try
> src={{item}}
>
> $var was removed from ansible several versions back.
>
>
>
> --
> Brian Coca
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" gro
does every list entry in apache.vhosts have 'state'?
--
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 email
to ansible-project+unsubscr...@googlegro
not currently.
--
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 email
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send emai
Brian, when do you think you'll find enough time to look into it?
On Thursday, May 7, 2015 at 6:31:59 PM UTC+2, Brian Coca wrote:
>
> downloaded, but not tested, I have not had the time yet.
>
> On Thu, May 7, 2015 at 12:31 PM, dusank >
> wrote:
> >
> > Brian, have you been finally able to rep
Hello list,
I have encountered some not expected results when i tried to include (with
include_vars) multiple var files in the beginning of a play.
I normally use the "merge" hash behavior (ansible.cfg) because it seems
more natural to me: i usually have highly nested variable dicts
and i wis
Hey guys, for now I'd suggest using the modules currently in the pull
request queue, the ones made by
emonty.
https://github.com/ansible/ansible-modules-core/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+openstack
Just download any or all of them into your $PLAYBOOK_ROOT/library directory
and you s
I want to register a variable with my java version. I can get that with:
java -version 2>&1 | head -1 | awk 'BEGIN { FS = "\"" } ; { print $2 }'
That gives me the result I want: 1.8.0_45
But I cannot make this happen in ansible :-( I'm going crazy with quotes
and escapes. I've tried:
- na
Because I would rather use jinja2 than piping through a bunch of shell
commands:
- name: Run java -version
command: java -version
register: java_version_out
changed_when: false
- name: Set java_version var
set_fact: java_version="{{
java_version_out.stderr.splitlin
ansible 1.9.0.1
- name: Get java version
script: /tmp/javaver.sh
register: java_ver
- name: Touch test file
copy: dest="/tmp/{{ java_ver.stdout }}"
content="test"
TASK: [Show output from installer]
ok: [flamingo] => {
"
Nice! However, your regex is also killing the underscore, and I need that.
I'm starting to monkey around with this, but I just don't know jinja, and
I bet you'll have the right magic sauce before I can puzzle it out :-)
Thanks!
On Friday, May 8, 2015 at 2:45:21 PM UTC-7, Matt Martz wrote:
>
>
Use the |trim jinja2 filter to strip whitespace off of the ends.
On Fri, May 8, 2015 at 4:55 PM, John Oliver wrote:
> ansible 1.9.0.1
>
> - name: Get java version
> script: /tmp/javaver.sh
> register: java_ver
>
> - name: Touch test file
> copy: dest="/tmp/{{ java_ver.stdout }}"
You can add the underscore to the list of allowed characters in the
regex_replace:
regex_replace('[^\d_.]+', '')
On Fri, May 8, 2015 at 5:03 PM, John Oliver wrote:
> Nice! However, your regex is also killing the underscore, and I need
> that. I'm starting to monkey around with this, but I jus
I created an issue reporting what appears to me to be a bug in the fetch
module -- the fetch module succeeds in grabbing the remote file and then
always fails its checksum test if the remote user's login shell is set to
/bin/tcsh -- but works when the remote user's login shell is set to
/bin/ba
hi, im the bot that closed the issue, in the response you might have
missed the answer:
set ansible_shell_type=csh group/host var for this host and
checksumming should work again. Different shell families need
different quoting.
On Fri, May 8, 2015 at 8:25 PM, breatheoften wrote:
> I created an
Ah ok, yeah I didn't see the above answer in the response on the issue ...
I'm surprised this isn't a faq.
Thanks,
Ben
On Fri, May 8, 2015 at 5:27 PM, Brian Coca wrote:
> hi, im the bot that closed the issue, in the response you might have
> missed the answer:
>
> set ansible_shell_type=csh gro
ok, for the record, here is what i ended up with
---
- hosts: ubuntu:debian
tasks:
- name: run syslog-ng --version
command: syslog-ng --version
register: ver_out
changed_when: false
- name: set ver
set_fact: ver="{{ ver_out.stdout.splitlines()[0]|regex_replace('[^\d.]+',
Sounds like a plan! :)
I willl try this method, thanks!
2015年5月8日金曜日 23時46分28秒 UTC+9 Brian Coca:
>
> something like:
> lookup('pipe', 'grep private_key_file /etc/ansible/ansible.cfg|cut -f2
> -d"="')
>
>
> --
> Brian Coca
>
--
You received this message because you are subscribed to the Goog
36 matches
Mail list logo