Faced with a similar issue, I initially wrote a script to which I could
pass all my parameters to be operated on, and then a custom module :-)
On Thursday, 17 March 2016 23:49:50 UTC, Arthur Reyes wrote:
>
> I have a series of commands registered to the same var
>
> - shell: ls -alh'{{ item }}'
Hello,
by default Ansible uses SSH's ControlPersist feature to reuse one ssh
connection for running multiple tasks. This is very nice and helpful.
However, there is one situation when this is a problem: when I change sshd
configuration, I want Ansible to start a new connection so that it
Check against current devel, we just fixed an issue with delegation
connection vars not being set correctly.
--
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
>
> Hi
>
I understand that task-level includes are completely dynamic in 2.0 and
therefore the following command / option ( --list-tasks ) can
not list tasks in the task-level includes at parse time present in
playbookfoo.yml :
ansible-playbook playbookfoo.yml --list-tasks
However, I feel
I am creating a role to install some packages and then join a system to a
domain controller. However, when I run my playbook, it comes back saying
*ERROR!
ERROR! 'test' is undefined.* Here is how I am running my playbook:
ansible-playbook -i server_hosts app_install_main.yml
I don't see
that is actually a jinja2 issue, 'equalto' would have been available by
just upgrading jinja2 itself.
--
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,
Just a thought. Did you export ANSIBLE_INVENTORY? And is it equal to the path
and name of your inventory file?
--
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
That "when" should be checking for "testservers" (plural).
On Fri, 18 Mar 2016, 23:59 Gilberto Valentin, wrote:
> Hi Mike,
>
> When I say "moved it up one level", I meant I took my hosts file out of
> the roles directory and moved it up one level out of there.
>
> Now,
There are two things you should try to help us track down the problem, if
you don't mind.
First of all:
openstack server list
(python-openstackclient also uses occ, so that should let us know that the
config is working right)
If that works and you see the servers, my _hunch_ is that ansible
I suggest you add a task, before your win_service task that installs the
service if it is not yet installed. Depending on what the service is, you
might be able to use win_package to install it. If it is already
installed, there is not much to loose by running the win_package task a
second
I don't know if you are aware, but there is already a Perl 'module helper'
http://search.cpan.org/~mramberg/AnsibleModule-0.3/lib/AnsibleModule.pm
We don't host Perl/Ruby/shell or other module helpers in the Ansible
project itself, but we would be happy to reference such in our docs.
--
Hello there~
Is this possible using when conditional with variables?
For instance, I use two kind of was (Jboss, Weblogic)
I create for checking process id some yml files like under line
*check.yml*
- shell: ps -ef | grep '{{ nodename }}' | grep XX | awk {'print $2'}
register: pid
I export ANSIBLE_CONSUL_URL in order for the Consul lookup pluging to
search against a remote server. I'm not able to set this environment
variable within my playbook. It still defaults to localhost. Is it not
possible?
# group_vars/all
consul_url_env:
ANSIBLE_CONSUL_URL:
Hi Ansible Experts,
I am facing the error in the subject line, when i tried to access a file
and add a line to end of the file using lineinfile module.
For some reason it unables to find the module or something, tried
re-installing ansible different ways , without any luck.
All the post on
I'm trying to use the iptables module, and I *think* I'm hitting a bug. Wanted
a sanity check before I open a bug report. This is Ansible 2.0.0.2. The action
looks like this:
- name: Update IPtables rules
iptables:
chain: INPUT
match: state
ctstate:
Hi All,
I am facing the same issue as "no hosts matched" and the ansible-pull is
taking only localhost. It is not able to see any of my hosts.
Here is how i am using the command
ansible-pull -U g...@github.com:XPlat/caps-sps.git -d
/home/gvenka008c/caps-sps jenkins_mesos_icinga.yml -i
Hello,
Is there a way to update the naming convention of the backup files:
I see them being written as: MyFile.*2016-03-10@15:48:16~*
These files are placed by the template core module when backup=yes is given.
Is this naming convention configurable? Would rather have like
ansible is not using those commands and will not work with restricted sudo
in that way, it needs full sudo to accomplish these tasks. Most of the work
of the apt module is using the apt-python API.
--
Brian Coca
--
You received this message because you are subscribed to the Google
You may have a typo or 2 in your sample case. This works fine for me:
$ cat tst.yml
---
- hosts: localhost
vars:
staff:
- { netid: user001, uid: 12345, comment: "Chris Short", state:
present }
- { netid: user002, uid: 12346, comment: "Bob Jones", state:
absent }
I think your tree should look more like this. Also notice the change of
tasks/app_install_task.yml to tasks/main.yml
~/git/ansible$ tree
.
└── project1
├── server_hosts
├── roles
│ └── app_install
│ ├── README.md
│ ├── defaults
│ │ └── main.yml
│
The main reason I want to tweak is so when I do audits and such they will
stand out more as being a backup file.
On Friday, March 18, 2016 at 7:20:26 PM UTC-7, johhue wrote:
>
> Hello,
>
> Is there a way to update the naming convention of the backup files:
>
> I see them being written as:
I agree with Mike's suggestion regarding changing that conditional to when:
"'testservers' in group_names" -- that's exactly how I handle special cases
like DMZ hosts.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from
I have the following defined in group_vars and I'm trying to run a task
when the state is defined as present and the syntax is baffling me:
staff:
- { netid: user001, uid: 12345, comment: "Chris Short", state: present }
- { netid: user002, uid: 12346, comment: "Bob Jones", state: absent }
Haven't heard anything back in a few days on this. Should I submit a
feature request?
On Tuesday, March 15, 2016 at 5:14:22 PM UTC-7, Julian Barnett wrote:
>
> I can't seem to figure out if this is supported (if so what am I missing?)
> or if this just hasn't come up yet anywhere. I haven't
Both get-service and sc.exe returns textual results. I will have to match
strings to check if service exists and its state and i never like to base
my conditions on pattern matching.
The best solution i could thing of is to go with win_service and define a
failed_when situation along with. At
Apologies for the previous blank post.
I have had a playbook in production for about 9 months that carries out a
rolling update or our application across a number of servers by using a
pre_tasks section that removes a server from load balancers before
deploying updated code and then adding
Take a look at asynchronous actions:
http://docs.ansible.com/ansible/playbooks_async.html
On Friday, March 18, 2016 at 12:39:28 PM UTC-5, jan.w...@codilime.com wrote:
>
> Hello,
>
> by default Ansible uses SSH's ControlPersist feature to reuse one ssh
> connection for running multiple tasks.
Hi Mike,
When I say "moved it up one level", I meant I took my hosts file out of the
roles directory and moved it up one level out of there.
Now, back to your suggestions. For your first point, I am not sure I
follow. For example, you said to run my play (I understand this as task)
with
That is not currently possible, but put in a 'feature idea' in github.
--
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
Thanks! Will do
On Friday, March 18, 2016 at 7:21:28 PM UTC-7, Brian Coca wrote:
>
> That is not currently possible, but put in a 'feature idea' in github.
>
>
> --
> Brian Coca
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
30 matches
Mail list logo