It looks like I had a typo as everything is now working.
On Monday, July 11, 2022 at 12:07:34 PM UTC-7 senorsmile wrote:
>
>
> I'm trying to pass a generic date to the expires key in the user module
> and convert it inline so that our inventory doesn't have to include t
I'm trying to pass a generic date to the expires key in the user module and
convert it inline so that our inventory doesn't have to include this same
jinja over and over:
```
users:
name: asmith
comment: Adam Smith
key_exclusive: true
key: |
abcdefghijklmnopqrstuvwxyz
create_use
I assume I'm making some strange error here, but I cannot figure out what
the error is.
I have a "changed_when" clause I've constructed that never seems to work.
However, if I take out the clause into its own debug statement, it seems to
work.
I have reproduced this with the following ansi
Someone on IRC sorted me out. I needed a tasks folder to put the main.yml
into.
On Thursday, October 24, 2019 at 8:19:20 PM UTC-7, senorsmile wrote:
>
> I have some complex aws related tasks that I would like to move into a
> role.
> However, when I run the play against localho
a role does not (i.e. it never runs the code).
I've only tried this on ansible 2.8.
Simple repro repo:
https://github.com/senorsmile/ansible-localhost-role-broken
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubs
Never mind. I needed to change the param in debug from var to msg!
On Wednesday, March 20, 2019 at 5:27:37 PM UTC-7, senorsmile wrote:
>
> I have narrowed this issue down to a sample role:
>
> ---
> - set_fact:
> testdir: "/some/dir/myfile.txt"
>
> - debug
I have narrowed this issue down to a sample role:
---
- set_fact:
testdir: "/some/dir/myfile.txt"
- debug:
var: "{{ testdir | dirname }}"
I get back the error:
fatal: [vagrant_test01]: FAILED! =>
msg: 'template error while templating string: unexpected ''/''. String:
{{/some/dir}}
This appears to be the PR where this functionality was added:
https://github.com/ansible/ansible/pull/7395
On Saturday, March 9, 2019 at 1:57:35 PM UTC-8, senorsmile wrote:
>
> I haven't used Ansible with AWS for a while.
>
> I am using it on a new project. I see a newer o
I haven't used Ansible with AWS for a while.
I am using it on a new project. I see a newer option that didn't used to
be there:
hostname_variable = tag_Name
My understanding of this variable is that it will use the Name tag to name
the host, while still using the i.p. address as the value
I have had great success with the synchronize module as of Ansible 2.4.
In my opinion, your use case sounds like reasoning to create a custom
module.
On Wednesday, March 7, 2018 at 11:03:36 AM UTC-8, Malcolm Hussain-Gambles
wrote:
>
> After further investigation it appears there are a lot of
I have done similar things. With enough "experimentation", you can get it
right.
Here's an example from a recent project:
---
all:
vars:
randomkey: "1" # set this first to override
{% for k in inventory_data.key1.key2["key3-with-dashes"] -%}
{% set v = inventory_data.key1
I would much prefer google groups to anything else. Please do not change!
On Tuesday, February 27, 2018 at 7:12:21 AM UTC-8, Kai Stian Olstad wrote:
>
> On Monday, 26 February 2018 21.08.42 CET David Reagan wrote:
> > > I don't see that, plain text with monospace font is better.
> >
> > I've b
Running:
ansible all -i inventory/backend/nodes.yml --list-hosts -vvv
ansible 2.4.0.0
config file =
/Users/shaun/Seafile/scripts/ansible/yaml_inventory/ansible.cfg
configured module search path = ['/Users/shaun/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
ansible pyth
:03:12 PM UTC-7, senorsmile wrote:
>
> The ansible.cfg doesn't seem to be working either.
>
> I added the following to ansible.cfg
>
> enable_plugins = 'host_list', 'script', 'yaml'
>
>
> and now I see these errors:
>
> ansibl
ng 'host_list'
> [WARNING]: Failed to load inventory plugin, skipping 'script'
> [WARNING]: Failed to load inventory plugin, skipping 'yaml'
> ERROR! No inventory plugins available to generate inventory, make sure you
> have at least one whitelisted.
As specified here:
https://github.com/ansible/ansible/issues/25321
we must now specify the inventory type, making yaml based inventory a
higher precedence.
I found the new cli env vars here:
https://github.com/ansible/ansible/blob/stable-2.4/lib/ansible/config/base.yml
I'm trying to overr
I'm pondering how difficult it would be to create a filter that allows
passing all contents of a variable withOUT interpolating any {{ }} pairs.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receivi
I figured as much. And setting that doesn't apply to the task itself,
apparently.
On Friday, March 17, 2017 at 11:30:04 AM UTC-7, Brian Coca wrote:
>
> that you set those settings for that specific template, will not
> affect Ansible's templating itself, so the with_ will use normal
> templa
Note that I'm testing the above on 2.2.1.
I also tried running from git on tag: v2.3.0.0-0.1.rc1
with the exact same results.
On Friday, March 17, 2017 at 11:13:19 AM UTC-7, senorsmile wrote:
>
> In the docs, there is reference to variable_start_string:
>
> http://docs.an
In the docs, there is reference to variable_start_string:
http://docs.ansible.com/ansible/template_module.html
Also, you can override jinja2 settings by adding a special header to
> template file. i.e. #jinja2:variable_start_string:'[%' ,
> variable_end_string:'%]', trim_blocks: False which ch
For those who find this same issue in the future, the error will still
appear unless you add
state: file
to the copy module, as documented in here:
https://github.com/ansible/ansible-modules-core/issues/468
On Tuesday, November 11, 2014 at 12:26:23 PM UTC-8, Sean McGowan wrote:
>
> issue #302
Ultimately fixed this by simply putting this into the role's
defaults/main.yml
nagios_host_fqdns_flat: ([])
On Wednesday, August 19, 2015 at 10:20:38 AM UTC-7, senorsmile wrote:
>
> A! Thanks Serge. So it is applying in the same manner as roles apply
> args (e.g. tags: ).
A! Thanks Serge. So it is applying in the same manner as roles apply
args (e.g. tags: ).
So, now to figure out how to default a split().
On Wednesday, August 19, 2015 at 10:09:32 AM UTC-7, Serge van Ginderachter
wrote:
>
>
> On 19 August 2015 at 19:02, senorsmile >
>
essed. I am not being combative,
but am I missing something here? That seems like a real bug; the specific
bug that I'm running into over and over again.
On Wednesday, August 19, 2015 at 9:47:04 AM UTC-7, senorsmile wrote:
>
> And I've run into this bug yet again!
>
> I hav
t|default([])).split(',')|default([]) }}"
register: stat_host_certs
This is becoming quite time consuming to insert for every with_* on skipped
files!!!
On Thursday, August 13, 2015 at 6:09:06 PM UTC-7, senorsmile wrote:
>
> Ah, great catch. That actually works.
>
> Now,
You didn't specify this in your description, but from your naming it is
clear you're using add_host after provisioning new aws nodes. I don't
believe this is an Ansible issue but an AWS issue. After creating the
node, it's takes a little while for the api to respond that it exists (my
guess a
Ah, great catch. That actually works.
Now, to convince ansible not to evaluate anything in included files which
are skipped...
On Thursday, August 13, 2015 at 5:46:11 PM UTC-7, Brian Coca wrote:
>
> try:
> with_items: "{{ ((the_files|default([])).stdout_lines|default([])) |
> list }}"
>
I'm not sure I follow you. The include is being skipped since the when:
condition isn't met. All other tasks above the one that errs out shows
skipped. It's just that specific task that makes everything fail for that
host.
I have attempted to add a 'default' filter to the when:, but it see
Error:
fatal: [myhost] => with_items expects a list or a set
I have a role with the following tasks(snippets included):
tasks/main.yml
---
- include: server.yml
when: icinga_install_mode == 'server'
tasks/server.yml
---
.
- name: Get filenames
connection: local
shell: find ./roles/ro
How are you setting the inventory (I assume the hosts folder contain your
inventory files). Give us a sample of what's in the inventory files?
On Wednesday, July 29, 2015 at 1:29:29 PM UTC-7, datsun80 wrote:
>
> I moved my inventory files to their own directory and now the group_vars
> are not
caching is happening.
On Wednesday, July 29, 2015 at 12:42:04 PM UTC-7, Brian Coca wrote:
>
> docs are wrong, location doesn't exist, i'll fix the docs
>
> On Wed, Jul 29, 2015 at 3:40 PM, senorsmile > wrote:
> > There is no such keyword according to the doc
;
> have you tried setting fact_caching_connection?
>
> On Wed, Jul 29, 2015 at 3:28 PM, senorsmile > wrote:
> > I should add that both machines are using ansible 1.9.2.
> >
> > On Wednesday, July 29, 2015 at 12:27:46 PM UTC-7, senorsmile wrote:
> >>
I should add that both machines are using ansible 1.9.2.
On Wednesday, July 29, 2015 at 12:27:46 PM UTC-7, senorsmile wrote:
>
> I have added the following to ansible.cfg
>
> fact_caching = jsonfile
> fact_caching_location = /tmp/ansible_facts
> fact_caching_timeout = 86400
I have added the following to ansible.cfg
fact_caching = jsonfile
fact_caching_location = /tmp/ansible_facts
fact_caching_timeout = 86400
With these set, any attempts to use ansible or ansible-playbook (tried
multiple different known working playbooks) fails with the error:
error, fact_caching_
+1 this would be awesome.
On Monday, June 23, 2014 at 9:25:46 AM UTC-7, Hernandes Sousa wrote:
>
> Hi,
>
> I wanted to use the machine hostnames with ec2.py, which I was able to by
> customizing the script to return the Name tag for the hostname instead of
> the public or private dns name, how
Has anyone made any further progress on this yet?
On Monday, March 23, 2015 at 4:41:24 PM UTC-7, Steven Truong wrote:
>
> Thanks for the tips. I tried this and this worked but to only some
> extents.
>
> What do I meant by that and here are the steps that you can repeat to see
> the potential
Dmitry, this is the solution to the ultimate problem I've been having.
Thanks
On Wednesday, October 29, 2014 at 1:09:02 AM UTC-7, Sankalp Khare wrote:
>
> I second Giorgio. Dmitry, you're a lifesaver :D
>
> On Friday, 6 December 2013 03:46:13 UTC-6, Giorgio Crivellari wrote:
>>
>>
>> Dmitry
I am attempting to display the debug output of multiple items from a
previous resource(including as complete an example as possible; not using
roles for this):
---
- hosts:
- sled1
gather_facts: false
tasks:
- name: verify ssh from sled1 to all other sleds
shell: ssh {{ item }} 'hos
No one has run into this?
On Sunday, January 18, 2015 at 4:09:47 PM UTC-8, senorsmile wrote:
>
> Oddly enough, I CAN run ansible commands, just not playbooks:
>
> ansible 192.168.1.9 -i hosts -m setup
>
>
> runs just fine.
>
>
> On Sunday, January 18, 2015 a
Oddly enough, I CAN run ansible commands, just not playbooks:
ansible 192.168.1.9 -i hosts -m setup
runs just fine.
On Sunday, January 18, 2015 at 4:02:56 PM UTC-8, senorsmile wrote:
>
> I am getting some strange errors when trying to run ansible against some
> new ubuntu 14.04
I am getting some strange errors when trying to run ansible against some
new ubuntu 14.04 boxes. I am using roles that I have already used before
and had no issues. I have tried several different roles (including a
simple one that simply has a debug message) to no avail. I can still run
ansi
I am not quite sure how to do this. E.g.
I have a group of hosts
www[100:150]
and I need to assign their hostnames:
ansible_ssh_host = www[100:150].example.com
obviously I can't do the above (I did try though). I assume there needs to
be some abstraction and some sort of yaml magic ha
I am getting the exact same issue as OP. I cloned the official
ansible-examples and am trying to deploy the hadoop example. I get part
the way through and then get the error:
TASK: [common | Create the hosts file for all machines]
***
fatal: [hadoop1] => {'msg': "One or
On Wednesday, November 6, 2013 8:56:33 AM UTC-8, Jean Philippe Caruana
wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I successfully managed to add a private IP address on my servers. I
> can see both network interfaces eth0 and eth1 when I ask for the facts
> of thi
I'm trying to control openvpn on an arch linux server.
I am able to successfully start the service on the box with
> systemctl start openvpn@server
but when I try to do some from ansible I get:
> failed: [laprouter] => {"failed": true, "item": ""}
> msg: Failed to issue method call: Unit nam
;isuid": false,
"md5": "d41d8cd98f00b204e9800998ecf8427e",
"mode": 420,
"mtime": 1386281904.370964,
"nlink": 1,
"pw_name": "root",
"rgrp": true,
"roth": true,
&quo
checking of the file exists with stat is done like this:
---
- name: Check if path exists
stat: path=/etc/monit/conf.d
register: check_path
- name: It exists
debug: msg='Yay, the path exists!'
when: check_path.stat.exists
On Thursday, December 5, 2013 2:11:25 PM UTC-8, senors
should probably touch a changed file on the system if something
> changes and use when with the stat module.
>
> -- Michael
>
> On Dec 5, 2013, at 1:35 PM, senorsmile >
> wrote:
>
> After trying to implement this workaround, I realize that this does NOT
> fix my i
if multiple roles have changes.
I need it to only run once at the very end.
Still searching for solution to OP...
On Wednesday, December 4, 2013 2:44:40 PM UTC-8, senorsmile wrote:
>
> I have been thinking about this all wrong. I just need to set up a
> handler that includes the ym
, senorsmile wrote:
>
> I'm trying to come up with a seemingly simple logic, yet can't figure out
> how to do it in ansible:
>
> I want to run the last role only if any previous roles have changes.
>
--
You received this message because you are subscribed to the Goo
I'm trying to come up with a seemingly simple logic, yet can't figure out
how to do it in ansible:
I want to run the last role only if any previous roles have changes.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from t
how to make my own modules.
May need to do a full reinstall.
On Thursday, November 21, 2013 11:21:41 PM UTC-8, Michael DeHaan wrote:
>
> I suspect it already knows about your role path and you are specifying too
> much, but is that the full output? If so that seems suboptimal and you
I'm trying the following:
- name: Ensure adminer installed and up to date
> synchronize:
> src=roles/mysql/templates/adminer.php
> dest=/var/www/adminer.php
I first tried just specifying the file name, as it should be automatically
found in the templates.
I always get a version
53 matches
Mail list logo