Using the "serial:" keyword so ansible can do hosts in batches.
Wondering if there is support for addressing those batches - e.g.: -l
dbservers@batch1 or something like that
Use case is folks want to run a job to do half the nodes; then pause for manual
QA; then run another job for the other
New to Ansible here, and have a question on using an inventory_hostname
variable.
I have a playbook that deploys an add-on to numerous servers, using an
inventory list of IP addresses setup as so:
[servers01]
xxx.xxx.xxx.xxx
yyy.yyy.yyy.yyy
[servers02]
zzz.zzz.zzz.zzz
and so on.
One of the
Hi Brian,
Okay, but why does my play work with package, but not yum?
On Nov 25, 2015 1:53 PM, "Brian Coca" wrote:
> package will just call yum module, the main difference is in the
> 'squashing', another check you can do to confirm this is set the env
> var
I'm up to date running boto 2.38.0 on OS X. My OS is Yosemite, but I'd be a
little shocked if that were the issue.
From: Stephen Granger
Reply: ansible-project@googlegroups.com
Date: November 25, 2015 at 5:44:44 PM
To:
if you run the test i asked, i can confirm it will be because of
argument squashing, which is an optimization that will run on yum but
not on package.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this
Alright, it worked with that variable you requested.
I exported the env var (it didn't work just set in the current shell):
export ANSIBLE_SQUASH_ACTIONS="apt,pkgng"
And ran this play:
- yum: name="{{ item }}" state=present
with_items:
- ypbind
- rpcbind
The play succeeded with this
Hi,
I am trying to deploy openstack using openstack-ansible project. I am using
Liberty release (tag 12.0.0).
The problem i have is that Ansible is not able to SSH into the containers:
*TASK: [Wait for ssh to be available]
***
failed:
Hi,
I'm having some issues with ansible 2.0.0-stable (b69942a), where
--start-at-task can't find the task with that name.
I think a clue may be in --list-tasks, which doesn't list task names for
tasks defined as meta:
[output from --list-tasks]:
PLAY: #5
tasks:
TASK: meta
Hi,
I'm trying to solve a problem I'm having with the Ansible Galaxy CLI tool.
It seems that the YAML file is being incorrectly parsed as a "basic" file,
instead of YAML. Using Ansible 1.9x, I get the following error trying to
install roles:
ansible-galaxy install -r requirements.yml
Ansible 1.9.4
What version of boto are you using? I've noticed issues when using older
versions and I'm wondering if the first bug was resolved by updating to a
later version (2.38) version of boto.
Assuming you are running of OS X?
$ python -c "import boto; print boto.__version__"
Good job on
Yes, right. Sorry for my misunderstanding. I'll get back to you with a test
run after I feed my kids dinner.
On Nov 25, 2015 6:10 PM, "Brian Coca" wrote:
> if you run the test i asked, i can confirm it will be because of
> argument squashing, which is an optimization that will
Thanks, Brian!
On Wednesday, 25 November 2015 20:05:12 UTC, Brian Coca wrote:
>
> yes, loops normally execute each task independently per iteration.
>
> --
> Brian Coca
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe
On Wed, Nov 25, 2015 at 5:19 PM, Joanna Delaporte
wrote:
> Hi Toshio,
>
> ANSIBLE_LIBRARY is unset.
>
> $ ansible --version
> ansible 2.0.0
> config file = /etc/ansible/ansible.cfg
> configured module search path = /usr/share/ansible
>
> With a little investigation,
Thanks! I found the paths on my machines so I could set them in my
ansible.cfg file. I appreciate the tip!
For reference, I found the modules dirs in these two locations on my
current control hosts:
/usr/local/lib/python2.7/dist-packages/ansible/modules (Ubuntu 14.04)
Hi Toshio,
ANSIBLE_LIBRARY is unset.
$ ansible --version
ansible 2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = /usr/share/ansible
With a little investigation, I see the long listing of
/usr/share/ansible/packaging shows all files with a date of April 2014,
I have also tried the following dictionary layouts, which resulted in the
same 'list object' python error:
- yum:
name: "{{ item }}"
state: present
with_items:
- ypbind
- rpcbind
And this:
- yum:
name:
- ypbind
- rpcbind
state: present
Running the task with only
Okay, so the yum module might actually be broken, because when I replaced
"yum" with "package", it started working correctly.
This works:
- package: name="{{ item }}" state=present
with_items:
- ypbind
- rpcbind
This doesn't:
- yum: name="{{ item }}" state=present
with_items:
-
Good afternoon, I am attempting to install multiple packages on a CentOS 7
server. I am using 2.0.0-rc1. I keep running into a python error.
I tried using a yum task in a role, using with_items like so:
- yum: name={{ item }} state=present
with_items:
- ypbind
- rpcbind
I think that is
Hello,
If the script module is used in a loop, will it transfer the script to the
remote on every iteration of the loop?
Thank you,
Tomek
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving
package will just call yum module, the main difference is in the
'squashing', another check you can do to confirm this is set the env
var ANSIBLE_SQUASH_ACTIONS="apt,pkgng", which would avoid that in yum
(which is part of default list).
--
Brian Coca
--
You received this message because you
Hi David,
Thanks. I also tried it with more indentation, with the same error result:
- yum: pkg={{ item }} state=present
with_items:
- ypbind
- rpcbind
On Wednesday, November 25, 2015 at 11:46:27 AM UTC-6, David Karban wrote:
>
> Hi,
>
> if I`m looking right, it can be indentation
I'm working on a playbook, that will be deploying a java app to four hosts.
I want it to push the app out to each node, making sure the correct
directories exist to push the new version to - that's the easy part, and it
can do all four of the nodes at once, no issue there. But then I want it to
Hi Richard,
I'm sure there's more than one way to skin a cat, here, but I set up my
hosts file thusly, and it does the job:
[rails]
rails0 ansible_ssh_host=xxx.xxx.xxx.xxx
rails1 ansible_ssh_host=xxx.xxx.xxx.xxx
rails2 ansible_ssh_host=xxx.xxx.xxx.xxx
I believe when doing this, you're just
Well, crap. Looks like this could be related to #981
(https://github.com/ansible/ansible-modules-core/issues/981) or #1701
(https://github.com/ansible/ansible-modules-core/issues/1701). Or both.
On Tuesday, November 24, 2015 at 2:03:51 PM UTC-5, Rob Wilkerson wrote:
>
> I thought this would be
One more note on this that I just realized is that the profile only seems
to fail for the ec2 module.
This works:
- name: Key Pair | Ensure that the appropriate keypair exists
ec2_key:
profile: Socrates
name: "soc-{{ env_short }}"
region: "{{ aws_region }}"
state: present
[prior post had a link in the title - if a mod can delete that post, would
be great, thanks!]
I'm having some issues with ansible 2.0.0-stable (b69942a), where
--start-at-task can't find the task with that name.
I think a clue may be in --list-tasks, which doesn't list task names for
tasks
yes, loops normally execute each task independently per iteration.
--
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
Hi,
if I`m looking right, it can be indentation problem,
- yum: name={{ item }} state=present
with_items:
- ypbind
- rpcbind
David Karban
Linux server specialist/Specialista na správu linuxových serverů
www.karban.eu
2015-11-25 18:40 GMT+01:00 Joanna Delaporte
inventory_hostname should always reflect the 'hostname alias' provided
by the inventory, if you ALWAYS want the IPs use ansible_ssh_host
(ansbile_host in 2.0 and above).
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
you could whip up something like:
groups['dbservers'][:groups['dbservers']|len/2]
groups['dbservers'][groups['dbservers']|len/2:]
currently there is no var for tracking the split groups other than
'current one' which is play_hosts
--
Brian Coca
--
You received this message because you are
Roger, did you try to use "with_items" (
http://docs.ansible.com/ansible/playbooks_loops.html#standard-loops)?
среда, 25 ноября 2015 г., 22:24:02 UTC+3 пользователь Roger Sherman написал:
>
> I'm working on a playbook, that will be deploying a java app to four
> hosts. I want it to push the app
Hi! I'm trying to implement firewall rules management with ufw module. Idea
is to have list of ports to be accessable from sources somewhere in host
variables. For example, I have this in my group_vars/consul_servers:
ufw_open_docker_from_sources:
- {port: 8500, src: consul_agents}
-
Hi,
I'm afraid hipchat module is not very well tested with private
hipchat servers. There is a chance that we've missed something here. I
committed some changed to the module in regard of API V2 support so I
would be happy to help you. Please drop me a line off the list. I hope
I will be able to
On Tuesday, November 24, 2015 at 6:53:56 PM UTC-6, Brian Coca wrote:
>
> become_user defaults to root, no need to specify, same with become_method:
> sudo
>
> can you run with - and show the output? also what ansible version?
> OSs involved?
>
> Thanks for your help, The OS is Oracle
On Tuesday, November 24, 2015 at 6:53:56 PM UTC-6, Brian Coca wrote:
>
> become_user defaults to root, no need to specify, same with become_method:
> sudo
>
> can you run with - and show the output? also what ansible version?
> OSs involved?
>
> Sorry, omiited the ansible version.
This task is locking up on some servers. It's not often that happens.
- name: Reconfigure console
shell: dpkg-reconfigure -f noninteractive console-setup -u
sudo: yes
tags:
- newpdv
- grub
What I can improve on that task?
Best Regards.
--
You received this message because you
Hi,
I have installed ansible on centos 6 and it seems that I am getting the
error : state is not legal...
[user@server tasks]$ ansible-playbook -v -i
/home/user/ansible/ansible_hosts /home/user/ansible/amazon_vpc.yml
ERROR: state is not a legal parameter in an Ansible task or handler
no, you cannot use jinja to generate tasks on the fly.
you should look into the different lookups as you can combine them to
create what you need in a single task.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
38 matches
Mail list logo