Michael DeHaan mich...@ansible.com napisał:
It is -- it's called ansible_ssh_user.
Originally the variable in ansible was called user but to avoid
confusion
when used with the user module, remote_user is an alias.
You mean task parameter (or are they called arguments?), and not variable,
Thanks for the responses guys. Although in my use case the extension can be
trusted I agree to make it publicly available in S3 may lead to some
confusion :-)
On Wednesday, 27 August 2014 13:20:04 UTC+1, Michael DeHaan wrote:
That's still in very widespread use
Yes, I'm aware people use
Hi all,
I was just wondering what the best practice is for including sensitive
variables in an Ansible Galaxy role.
For example, if I were to publish a role which required sensitive (i.e.
vault encrypted) data, e.g. an API key, would I just document that this
variable was required in the
On Thu, Aug 28, 2014, at 04:03 AM, Brian Coca wrote:
hosts can be in more than one group. all hosts in the
production file
should be in production group, but you can also have hosts in
dbservers
group.
Agree. So when targeting hosts we can use the inventory as
environment and --limit to
Hello,
I wanted to do that :
ansible -i inventories/production all -m shell -a echo urok | nc {{
ansible_eth1.ipv4.address }} 2181
But it it seams that vars are not supported within ad-hoc commands. Right ?
Thanks
Alain
--
You received this message because you are subscribed to the
Jake Clarkson jacobwclark...@gmail.com napisał:
Hi all,
I was just wondering what the best practice is for including sensitive
variables in an Ansible Galaxy role.
For example, if I were to publish a role which required sensitive (i.e.
vault encrypted) data, e.g. an API key, would I just
Obviously don't include your AWS key in the defaults or examples, just use
dummy values, but it's up to them.
Folks should be aware of ansible-vault and I don't think it's necessary for
the galaxy role to remind users to use it, but it's ok if the role did too.
Definitely doesn't need to be a
Hi,
I've just encountered the same issue. Ansible 1.7.1 from Debian Testing
Repository. OP proposed fix helps.
I can reproduce it with this playbook:
- hosts: testsetup
accelerate: yes
accelerate_port: 4711
tasks:
- command: /bin/ls
Cya, Ed
Am Mittwoch, 27. August 2014 01:17:07
Variables are, including inventory variables and -e, but you cannot use
fact gathering with /usr/bin/ansible, as they are a playbook only construct.
On Thu, Aug 28, 2014 at 4:44 AM, Alainkr akreienb...@gmail.com wrote:
Hello,
I wanted to do that :
ansible -i inventories/production all
Ok, I'll file a bug on this now so it can be fixed for later.
Thanks!
On Thu, Aug 28, 2014 at 3:52 AM, Ed Hein tarry...@gmail.com wrote:
Hi,
I've just encountered the same issue. Ansible 1.7.1 from Debian Testing
Repository. OP proposed fix helps.
I can reproduce it with this playbook:
Ok thanks
Le jeudi 28 août 2014 13:57:22 UTC+2, Michael DeHaan a écrit :
Variables are, including inventory variables and -e, but you cannot use
fact gathering with /usr/bin/ansible, as they are a playbook only construct.
On Thu, Aug 28, 2014 at 4:44 AM, Alainkr akrei...@gmail.com
Here's an example of how we lay out our ansible project directory. We have
a tomcat-based app and we create an RPM for the common portions of the
app that live outside of the WAR file to be installed (log dir, extra libs,
etc), and keep the WAR and the config files specific to each inst-env pair
Michael DeHaan mich...@ansible.com napisał:
Variables are, including inventory variables and -e, but you cannot
use
fact gathering with /usr/bin/ansible, as they are a playbook only
construct.
Will fact caching change that? Or is bin/ansible not aware of the cache?
On Thu, Aug 28, 2014 at
OK I'm testing it out.
First, I love that you can pass arguments. I have been automating the
Jenkins clients; I'm adding a specific version of SVN, and with the win_msi
installer, I couldn't figure out how to pass arguments to it so it would
install the Command Line Interface.
With the
I changed it to run win_get_url to download the package so I could rename
the file (using 'dest').
And then, I hit a nice System.OutOfMemoryException. This server isn't that
beefy and it's wanting to run updates, so it could be that... but I'm going
to try to grab the remote files anyway.
I
I used the second style present by Jeff which involved apt: format. At
one time, I don't know how long ago this was in the ansible docs as a
coding style.
Even with the widest screens available it is very difficult to read
everything on one line. For version control as mentioned it is also a
I would like to add these lines to a file at the end sysctl.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.tcp_keepalive_probes = 4
I am adding these using
i would use sysctl module + with_items
--
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,
At this point (and likely for some time, maybe forever?) there is no formal
specification/best practices listing for Ansible, and that's both a
blessing and a curse. It's nice to say this way is the best, but it also
means that there's less freedom to use a style that fits your needs.
I'll be
My hope was not for more of a standard ansible way, but here are the
available options those of us who have only worked with YML because of
ansible. Until this post, I did not know that some of the options existed.
With the number of contributors to the project, I hope I am not alone in
being
I am currently doing this, want a better one :)
- name: Changes to sysctl.conf
lineinfile:
dest=/tmp/1
regexp={{ item.regexp }}
line={{ item.line }}
with_items:
- { regexp: '^net.ipv6.conf.all.disable_ipv6', line:
'net.ipv6.conf.all.disable_ipv6 = 1' }
- {
I am trying to do something like this:
- name: setup user home directories
synchronize: src=homes/{{item.username}} dest=/home/{{item.username}}
owner={{item.username}}
group={{item.username}}
with_items: ssh_users
ignore_errors: yes
So basically, I want it to copy a home
Hi Tim,
We were unable to reproduce the above situation, and this message is
different, it's basically saying that the input is missing. So to me this
seems like a new, but unreported issue.
ignore_errors basically only deals with the return of the module, so what I
think we need to do here is
On Thu, Aug 28, 2014 at 12:34 PM, Patrick Heeney
patrickhee...@gmail.com wrote:
Even with the widest screens available it is very difficult to read
everything on one line. For version control as mentioned it is also a lot
easier to break it up.
Take for example this playbook of mine:
I have an inventory file like this:
[redisservers]
72.14.178.81
[webservers]
198.58.107.247
I'm trying to run this playbook against the redisservers group to allow
access to port 6379 for the webservers:
---
- name: Allow port 6379 (Redis) access to Web servers
ufw: rule=allow
I agree. I should say I have never learned full YAML and how that relates
to ansible way of setting up the arguments. Everything I have picked up was
from different playbooks and examples from around the web. That's why it
would be great to have a generic use case document that ansible could point
Cool I just hit the StackOverflow again.
I used win_get_url to download, and then win_package to install. I am using
the updated powershell.ps1 script from 8759, but I have seen it without
that as well.
failed: [clone] = {failed: true, parsed: false}
invalid output was:
Process is terminated
Hí Darup,
i believe that Brian thougth sysctl module:
http://docs.ansible.com/sysctl_module.html
2014-08-28 18:52 GMT+02:00 Darup tek darup...@gmail.com:
I am currently doing this, want a better one :)
- name: Changes to sysctl.conf
lineinfile:
dest=/tmp/1
regexp={{
So I wrote a template task that populates this jinja template:
{{ hostvars['198.58.107.247'] }}
And this is the output I got:
{'ansible_ssh_user': 'root', 'inventory_hostname_short': '198',
'group_names': ['webservers'], 'inventory_hostname': '198.58.107.247'}
So hostvars['198.58.107.247']
OK it is a python problem on my new host, I just don't know / remember what
I did the first time around (if anything) to get winrm.
Python still pukes when I tell it to install it, but on my current host, I
ran:
find / -name winrm
# /usr/local/lib/python2.7/dist-packages/winrm
Checking on my
Found it:
sudo pip install pywinrm
ansible windows -m win_ping
# clone1 | success {
changed: false,
ping: pong
}
On Thursday, August 28, 2014 3:28:31 PM UTC-5, Damon Overboe wrote:
OK it is a python problem on my new host, I just don't know / remember
what I did the first time
I somewhat remember doing that too, now, but I don't see it in the
documentation.
I'm supposed to patch something else in the Windows docs, so I'll add this
to that patch.
On Thursday, August 28, 2014 3:34:21 PM UTC-5, Damon Overboe wrote:
Found it:
sudo pip install pywinrm
ansible
I've posted the blog post: YAML best practices for Ansible playbooks - tasks
https://servercheck.in/blog/yaml-best-practices-ansible-playbooks-tasks
Only proofread once, so please let me know if you find any points of
contention or outright lies!
-Jeff
On Thursday, August 28, 2014 12:20:22
Hello,
after yesterday's thread I've goggled a bit more around ansible and
variables and I've figured out the following facts (of which many of you
are probably aware but I'm new of the environment):
- the precedence of the variables is set in stone: a lot of people rely on
that and tweaking
Installing pywinrm is included in the documentation at
http://docs.ansible.com/intro_windows.html#installing-on-the-control-machine
On Thu, Aug 28, 2014 at 3:35 PM, Damon Overboe damon.over...@gmail.com
wrote:
I somewhat remember doing that too, now, but I don't see it in the
documentation.
If role B depends on role A it cannot use values for variables provided by
A unless these values are specified globally, e.g. in group_vars/all.
Role variables in the vars/ directory of a role are actually pulled into
all roles.
- several people using ansible are baffled by the inability to
Yep, roles that just cary variables in /roles/foo/vars/main.yml can be a
perfect solution for cases like this, just include them before your other
role.
Basically a role describes what something is, but they don't entirely have
to self contained.
Ansible contains some nice protections to make
Sorry, perhaps addressed on devel only. I hate to be that annoying, but it
would save me time if you could let me know if you see the same there.
I do know we handled chown specifically around something like this, though
it might have been specific to atomic_move.
If it's still in devel,
groups['groupname']
is a list of all hosts in a group, so
with_items: groups['groupname']
will do it.
On Thu, Aug 28, 2014 at 1:33 AM, Mikael Sandström orav...@gmail.com wrote:
Thanks, I'll try that.
So I guess I can somehow reference the hostgroup 'hosts' (which was a
stupid name even
I do. Parameter is probably a good word.
On Thu, Aug 28, 2014 at 2:26 AM, Tomasz Kontusz tomasz.kont...@gmail.com
wrote:
Michael DeHaan mich...@ansible.com napisał:
It is -- it's called ansible_ssh_user.
Originally the variable in ansible was called user but to avoid
confusion
when
Take a look at --limit to refine execution to a specific subgroup, or
additional parameters on the host specifier like:
- hosts: webservers:phoenix
To select all webservers in phoenix
--limit phoenix does the same thing as adding :phoenix to all host
specifiers.
On Wed, Aug 27, 2014 at 5:25
You can make a group called db_servers_stage and db_servers_production if
you like. Put hosts in each.
[stage:children]
dbservers_stage
webservers_stage
[dbservers:children]
dbservers_stage
dbservers_production
etc
On Thu, Aug 28, 2014 at 4:31 AM, Jordi Funollet funol...@fastmail.fm
wrote:
This was addressed on the devel branch today, and will be a part of a
future 1.7.2 update which we'll do soon.
Thanks!
On Thu, Aug 28, 2014 at 7:59 AM, Michael DeHaan mich...@ansible.com wrote:
Ok, I'll file a bug on this now so it can be fixed for later.
Thanks!
On Thu, Aug 28, 2014
Should change that, yes!
On Thu, Aug 28, 2014 at 11:24 AM, Tomasz Kontusz tomasz.kont...@gmail.com
wrote:
Michael DeHaan mich...@ansible.com napisał:
Variables are, including inventory variables and -e, but you cannot
use
fact gathering with /usr/bin/ansible, as they are a playbook
Out of memory? For real? I havent seen that since the 90's. Put some more
ram in your box?
On Thursday, August 28, 2014 7:38:24 PM UTC+2, Damon Overboe wrote:
seen it without that as well = seen the StackOverflow on the mainline
dev branch, using win_msi and the powershell.ps1 from the
In Ansible to use facts about a host you must have either:
already gathered facts from that host in that play (just gathering facts
would be enough, no tasks needed)
- hosts: webservers:dbservers
tasks: []
- hosts: webservers # that need to know facts about dbservers
tasks:
- ...
OR
Super easy to see this discussion bikeshed.
Our policy here is to show examples and let people learn by example,
without having to teach YAML.
You can use YAML and not really know all of YAML -- and that's awesome.
For instance, we shy away from Anchors.
I think that's enough on this topic and
Right in front of my face. I saw that line and assumed that was the full
installation for the Control machine, I just hurried through it this time.
Thanks!
On Thursday, August 28, 2014 3:55:28 PM UTC-5, Matt Martz wrote:
Installing pywinrm is included in the documentation at
Well I'm consistently getting StackOverflows now too, so I think the two
might be related; some kind of infinite loop that sometimes runs out of
memory before it can overflow the stack.
The VMs should have plenty of memory, but, then again some of the VMs we
have are a bit laggy, so I'm trying
Thanks. When I was initially working on my ansible role, I wasn't stopping
snmpd before editing the conf file. So, once I copied how you are doing
things, it started working. :)
--David Reagan
On Tue, Aug 19, 2014 at 8:03 AM, dgan...@iww.org wrote:
I know this is an old thread, but it came up
Damon -- I've been getting occasional stack overflow and out of memory
exceptions when testing against Server 2008 R2 without updates. See
https://github.com/ansible/ansible/pull/8345#issuecomment-52074837 for a
hotfix that might work.
Running with -v when using winrm provides even more
Awesome, thanks!
So given:
[dbservers]
Node1
Node2
Is there a way to (in the play) get info on which group the play is running
against?
I.e something that will tell me 'dbservers'?
Or is that something I have pass in as a variable?
/M
--
You received this message because you are subscribed
Cool thanks Chris I'll check that out.
I'll make sure to update pywinrm, on one control in pretty sure i don't
have that version because I didn't specify the repo to take it from. The
other is probably a month old, and i was getting some 500s, SOs, and out of
memories.
And should i just go ahead
53 matches
Mail list logo