How about adding 3rd common role that has no tasks but just sets vars, then
add that to both db and web as a dependency?
On Wednesday, 27 August 2014 17:59:03 UTC+1, Daniele Varrazzo wrote:
Hello, first of all thank you very much for Ansible.
I'm setting up the deployment of a complex
On 6 March 2015 at 10:46, Dag Wieers d...@wieers.com wrote:
(Or we could decide to always template when script is used ?)
Given the extra processing and slow down that kicks in with templates,
I'd rather not.
--
You received this message because you are subscribed to the Google Groups
Thanks Serge, that worked. I'll use that.
On Friday, 6 March 2015 13:24:46 UTC, Serge van Ginderachter wrote:
On 6 March 2015 at 12:15, John McNulty john...@gmail.com javascript:
wrote:
# inventory/poc
[poc:children]
poc-app
poc-db
- And repeat my test
$ ansible-playbook
Hey Lars,
As it happens I'm putting the finishing touches today on a pull request to
revamp some of the Docker module's functionality, specifically by adding
more states and more clearly defining the ones that are there. I'm doing a
bit with the documentation along the way (and I still have to
The html content of your body contains quotes which break the quoting that
you wrap it in.
Instead of:
body={{ lookup('file', './tmp/email.txt') }}
Try:
body='{{ lookup(file, ./tmp/email.txt) }}'
Which is basically switching your surrounding quotes to ' since your body
uses throughout.
On
By way of explanation here's a simple reproducer.
- The Inventory is a directory containing two files - each one contains
one group and one host
# inventory/poc-app
[poc-app]
host1
# inventory/poc-db
[poc-db]
host2
- A playbook is created to run a couple of roles for each
---
#
the above code got this error message, how to fix it ?
TASK: [debug msg={{ list_of_dict[item] }}]
**
fatal: [localhost] = One or more undefined variables: 'list object' has no
attribute 'd01'
FATAL: all hosts have already failed -- aborting
On Wednesday, 4
All,
I am trying to get emails and html template.
I get a message saying var are added in the replaced body text.
Any idea of where that come from?
- name: delete temp dir
local_action: file path=./tmp state=absent
- name: template create dir
local_action: file path=./tmp
On 6 March 2015 at 12:15, John McNulty johnm...@gmail.com wrote:
# inventory/poc
[poc:children]
poc-app
poc-db
- And repeat my test
$ ansible-playbook poc.yml --list-hosts
ERROR: child group is not defined: (poc-app)
Just add to that last file these two empty entries:
[poc-app]
How do I run command without playbook on non-win/lin host ?
[irekr@nms02 ansible]$ ansible cp11 -i hosts -c local -a show
software-version
Irek-11 | FAILED | rc=2
[Errno 2] No such file or directory
see below my hosts file
[irekr@nms02 ansible]$ cat hosts
[local]
localhost
[cp11]
All,
I am trying to send email in html
I keep getting
TASK: [pre_install | send email] *
fatal: [localhost - 127.0.0.1] = A variable inserted a new parameter into
the module args. Be sure to quote variables if they contain equal signs
(for example: {{var}}).
Hi -
This is driving me crazy.
If I run this, ansible honors the creates and properly skips if the
specified directory exists.
- name: copy and unpack form2
unarchive:
src={{ jdks_available[item.jdk_ver]['java_archive'] }}
dest={{ jdk_install_dir }}/
copy=yes
creates={{
In a way I expect that to happen. Your files more than likely load in
order. poc, poc-app, poc-db.
When in doubt give them names that load in the necessary order. You can't
define children using another group that hasn't been defined yet.
Often I will prefix files with numbers to get the load
Hi Clay,
My understanding is that list_of_dict, being a list, should be indexed by
integer and not by a string such as 'd01'. Try the code in Chip's response;
it runs successfully.
Cheers,
Jack
On Fri, Mar 6, 2015 at 2:25 AM, Clay Ye clay...@gmail.com wrote:
the above code got this error
That was very helpful, thank you Ash! I do understand the way that the
docker volumes work, but was hoping that the ansible module would be able
to add some extra functionality like the volume parameter being able to
mount a directory from the docker host into the docker container
I don't think there's a quick solution for this. I believe you'd need to
write your own filter
plugin: http://docs.ansible.com/developing_plugins.html#filter-plugins
On Thursday, 5 March 2015 16:23:58 UTC+1, Larry Fast wrote:
I'm using the following jinja2 code to dump my hostvars for
On Thu, 5 Mar 2015, Craig White wrote:
Seems that the 'script' module wants a local file but I need the local file
to be a template with variables ./templates/my_script.sh
# Run script which removes the directory
- name: perform OpenLDAP setup and clean up
script: /tmp/slapd/add_ldifs.sh
On Fri, Mar 6, 2015 at 11:47 AM, Craig White white.n...@gmail.com wrote:
given that I am a newbie, my opinions lack perspective. I think the
'script' command should be able to be gathered from a template because
ansible is just a glorified shell script manager anyway and why keep it
On 6 March 2015 at 18:47, Craig White white.n...@gmail.com wrote:
given that I am a newbie, my opinions lack perspective. I think the
'script' command should be able to be gathered from a template because
ansible is just a glorified shell script manager anyway and why keep it
emasculated?
On Friday, March 6, 2015 at 2:50:21 AM UTC-7, Serge van Ginderachter wrote:
On 6 March 2015 at 10:46, Dag Wieers d...@wieers.com javascript:
wrote:
(Or we could decide to always template when script is used ?)
Given the extra processing and slow down that kicks in with templates,
Sorry, I realized I answer your first question but not your second.
I have not started work on GTM modules but am open to implementing this for
the community. Feel free to share your specific use cases of what you would
like to be able to do.
On Tue, Mar 3, 2015 at 11:41 AM, Michael Perzel
On 6 March 2015 at 19:00, Matt Martz m...@sivel.net wrote:
In my non-humble opinion, I think templating a shell script or any script
for that matter is pretty terrible.
That could do terrible things yes :)
But I could see use cases. Instead of templating a separate config file,
just
I'm still in the preliminary phase of developing requirements. From a high
level we have multiple datacenters and use the GTM to route traffic
(round-robin by default but during maintenance we may pin traffic to one
datacenter). I should have more specifics in a few weeks.
I've been reading up
Thanks John, that was just what I was looking for. This would be a great
addition to the docs. I was originally trying to do:
pre_tasks:
- include_vars: sharedvars.yml
But the variables in that case weren't being pulled in. I feel like the
docs would warn you that pre_tasks don't affect
Additionally I just want to mention that it appears that if you modify a
playbook with a container from not having volumes mounted to mounting
volumes, ansible doesnt register that as a change and thus won't actually
implement the changes to the task.
So if I have a playbook that just spins up a
That's the second half of the missing functionality I wanted to add that
prompted the refactor I linked before. (The first half was the ability to
pull the latest version of the image on every run, not only when it's
missing, with pull=always.) If my PR is accepted, that will be
why not use the play's var loading?
vars_files:
- sharedvars.yml
--
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
I'm trying to set the I/O scheduler for a block device (mysql tuning) with
ansible. I've seen some examples but I'm curious what others are doing to
persistently set this.
--
You received this message because you are subscribed to the Google Groups
Ansible Project group.
To unsubscribe from
You can already use templates for script, either by running a local
template task or using the template lookup, I feel remiss to add
script generation from template to the module.
Not that I think dynamic shell generation should be done from ansible,
IMHO it is much cleaner to use shell/script
On Fri, 6 Mar 2015, Serge van Ginderachter wrote:
On 6 March 2015 at 18:47, Craig White white.n...@gmail.com wrote:
given that I am a newbie, my opinions lack perspective. I think the
'script' command should be able to be gathered from a template because
ansible is just a glorified shell
30 matches
Mail list logo