Hi Everybody,
I want to startup tomcat by script module . The running output show the
script is successful at target machine but actually tomcat do not startup.
I try same script by command module. I meet same issue. If I directly run
the script at target machine, the tomcat can startup.
My
On 08.12.2016 04:06, colynn@chinanetcloud.com wrote:
As titile,
Could we redefined ansible default system facts.
eg: default "ansible_env.PWD" is "/root"
But I want to change it to specific directory. shall I do ?
Why would you do that?
Why not create your own facts/variables instead?
Hi,
you can have a list of dicts:
patches:
- name: patch1
patch_name:
patch_md5:
engine:
Services:
- name: patch2
patch_name:
patch_md5:
engine:
Services:
Then instead of item.key and item.value.xxx, use item.name and item.xxx
when using "with_items: {{patches}}".
Cheers,
Felix
On 13.12.2016 07:27, Deepa Yr wrote:
Thanks. I have many more fields defined for patch other than
patch_name. In
that case, it would be difficult to use with_items right.. or Is there
a
solution with list and with_items ?
patches:
patch1:
patch_name:
patch_md5:
Thanks. I have many more fields defined for patch other than patch_name. In
that case, it would be difficult to use with_items right.. or Is there a
solution with list and with_items ?
patches:
patch1:
patch_name:
patch_md5:
engine:
Services:
patch2:
Hi,
I believe it is 'tasks:'
Vincent
On 12 Dec 2016 11:45 p.m., "Dan" wrote:
> # Example of role with custom trust policy for Lambda service
> ---
> task:
> - name: Assign a policy called Admin to the administrators group
> iam_policy:
> region: us-east-1
>
On 12.12.2016 20:50, John Oliver wrote:
My little playbook:
- hosts: all
become: true
become_user: root
become_method: sudo
tasks:
- name: Update McAfee virus definitions
shell: /opt/McAfee/LinuxShield/bin/nails task --run 1
register: result
- name: Update McAfee virus
Hi,
I am running following stack for ansible :
Ansible Tower 3.0.2
Ansible 2.1.1.0 (that comes default on Tower 3.0.2)
Below is the output of pip freeze on Ansible Tower CentOS 6.8 machine which
shows any python packages that are there on my Ansible Tower image :
ansible==2.1.1.0
Hi Nick,
Not sure if you figure this out yet or not but you need to add connection:
local to your playbook. Your updated playbook should look like this:
https://gist.github.com/privateip/2482751b36b30eb60151e94e16c905ea
Peter
On Tue, Nov 29, 2016 at 7:47 PM, Nick Keeling
Hi there —
I have a variable called pbis_require_membership_of defined in
group_vars/all.yaml, and it is overridden for a particular host under
role/vars/hostname, however neither of the values are being used at runtime
and the module errors with pbis_require_membership_of' is undefined
# Example of role with custom trust policy for Lambda service
---
task:
- name: Assign a policy called Admin to the administrators group
iam_policy:
region: us-east-1
profile: dev
iam_type: role
iam_name: test
policy_name: Admin
state: present
policy_document:
I have a master playlist, global.yml, in which I specified hosts, become,
and includes for different OSes That worked fine until I went to add
handlers. In my included playbooks, I did something like:
- handlers
- name: handler 1
etc etc
- tasks:
- name: Task 1
etc etc
At that
Darn it, I forgot all about handlers!
--
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,
On 12. des. 2016 20:06, John Oliver wrote:
Let's say I have a playbook that looks for and changes lines in sshd_config
if necessary. Then I want the sshd service to be restarted only if at
least one of those actions has taken place. Is there a way to evaluate for
that without registering a
Thanks, Spike. That's what I'll do. That, or a hash.
On Monday, December 12, 2016 at 11:15:37 AM UTC-8, Spike Robinson wrote:
>
> In the specific case of modifying one file only, multiple times, you could
> get away with one register for the original modification timestamp, and
> then compare
My little playbook:
- hosts: all
become: true
become_user: root
become_method: sudo
tasks:
- name: Update McAfee virus definitions
shell: /opt/McAfee/LinuxShield/bin/nails task --run 1
register: result
- name: Update McAfee virus definitions 2
shell:
i have add the vvv to ansible and to ssh command. The log provided comes
from this run. I don't have more logs. I will try tomorrow to make a new
run just with the wait task.
reza
Le 12 déc. 2016 20:12, "Guilherme Ueno" a écrit :
> Reza,
>
> You have to put the
In the specific case of modifying one file only, multiple times, you could
get away with one register for the original modification timestamp, and
then compare that timestamp with the current timestamp as your last
operation.
In the general case, I think you need to use a register with a
Reza,
You have to put the parameter at the end of command, like: ansible-playbook
-i inventory... -vvv
Guilherme.
On Monday, December 12, 2016 at 4:28:48 PM UTC-2, Reza ISSANY wrote:
>
> I can't reproduce the same run. Actually, ansible ask me to provide a
> password to connect. I
Let's say I have a playbook that looks for and changes lines in sshd_config
if necessary. Then I want the sshd service to be restarted only if at
least one of those actions has taken place. Is there a way to evaluate for
that without registering a variable for the completion of each and every
Hello Deepa,
Dictionaries are *not* ordered collections. You should never rely on items
in a dictionary to be returned in order. You'd be better off using a list.
patches:
- patchdata1
- patchdata2
A list preserves order.
On Monday, 12 December 2016 15:37:22 UTC+1, Deepa Yr wrote:
>
> Hi
>
>
I can't reproduce the same run. Actually, ansible ask me to provide a
password to connect. I don't know why.
Ansible has to wait until he can connect using the command I provide no ?
2016-12-12 19:23:31,939 p=12608 u=deploy | Using ansible.cfg as config file
2016-12-12 19:23:32,048 p=12608
Hi,
For the past few days I am getting the following error when running ansible
playbooks using the AWS cloud modules or when directly running the ec2.py
file with the --refresh-cache command from my local machine:
ap:~ ap$ /ansible/inventory/ec2.py --refresh-cache
Traceback (most recent call
Hi Dick,
Thank you for your attention, but what you mean when you says "host var"?
INVENTORY:
[webserver]
hosta
hostb
TASK1:
- name: copy script to server A
copy: src=jboss.sh dest=/usr/app/abc/dir mode=u+rwx
TASK2:
- name: copy script to server B
copy: src=jboss.sh dest=/usr/app/def/dir
the *copy *option in the *unarchive *module is deprecated and we are
advised to use *remote_src* instead
However, in an otherwise identical script, having staged the source file to
the target machine successfully in a previous play, if I use *copy = no* the
play succeeds, but if instead of
I discovered volume_size is also optional when using ephemeral option here,
it will default to the maximum size of the instance type spec.
On Thursday, August 21, 2014 at 9:01:49 AM UTC-4, Mike Buzzetti wrote:
>
> I just came across this.
>
> I did something like this for a c3.xlarge. Setting
I discovered you volume_size is also optional when using ephemeral option
here, it will default to the maximum size of the instance type spec.
On Thursday, August 21, 2014 at 9:01:49 AM UTC-4, Mike Buzzetti wrote:
>
> I just came across this.
>
> I did something like this for a c3.xlarge.
Basically, debug this using the ping module and an adhoc command eg
ansible -m ping xx.whatever
and only go back to your playbook once that's working OK.
(Apologies for the multiple posts.)
--
You received this message because you are subscribed to the Google Groups
"Ansible Project"
I'm assuming you have set xx. to the name of a real server and "myname" to
a real account on that server, right? :-)
--
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
Often a credentials failure or naming failure rather than connectivity.
Check you can manually ssh to the target machine with the host name and
username exactly as stated in your hosts file. And remove ssh pipelining to
test if that's the issue.
--
You received this message because you are
If they're in different groups, make the path a group var.
If they're in the same groups, make the path a host var.
On 12 December 2016 at 14:29, Guilherme Ueno wrote:
> Hi all,
>
> I have to copy a file into a directory to specific hosts, but the path
> changes for
Reza,
Could you run with -vvv at the end?
Thanks,
Guilherme.
On Monday, December 12, 2016 at 1:25:56 PM UTC-2, Reza ISSANY wrote:
>
> yess I've already tried shell butsame issue. If I try to connect
> manually, it works. The problem is that ansible doesn't release the
> first connection
I was thinking about possibly using vars in the yaml to deduce what the
prefix list actually is.
Like, if it's possible to do a var where pl-123456 can be deduced by
describing it in AWS cli, then substituting it in. Thanks for the response,
now I don't feel like a small island :)
Daniel
yess I've already tried shell butsame issue. If I try to connect
manually, it works. The problem is that ansible doesn't release the
first connection attemps while the server isn't ready. I don't know
why ...
2016-12-12 13:58 UTC+01:00, Guilherme Ueno :
> Hi,
>
> Did you
UNREACHABLE! changed : false , msg:SSH error:data could not be sent to the
remote host. Make sure this host can be reached over ssh", "unreachable":
true
Hosts: [test] xx.local ansible_ssh_user=myname
ansible.cfg [defaults] host_key_checking = False
[ssh_connection] pipelining=true
Hi all,
I have to copy a file into a directory to specific hosts, but the path
changes for specific hosts.
Ex.:
Inventory:
[webserver]
hosta
hostb
task: Copy a file into:
hosta: /usr/app/abc/dir
hostb: /usr/app/def/dir
But, I don't know how to use those variables in the "same task"
I've see several discussions where the "validate_certs" arg should work
(was fixed, https://github.com/ansible/ansible-modules-extras/issues/2757
for example) in order to use self-signed certificates and skip cert
validation in ansible 2.2, however I'm still seeing certificate issues when
Hi Guys,
I met a strange issue "shared connection closed", googled but don't find
any solution or workaround.
when the issue happened , the network is ok , why ssh connection closed ?
My verion is as following.
[root@director ~]# ansible --version
ansible 1.9.4
configured module search
Hello there,
I get the error described in the title when I execute systemctl in a docker
container launcher with Ansible docker module. Thus, I cannot manage
services in the docker container (eg. satrt/stop/reload nginx service
...etc.)
How can I avoid this issue when launching a docker
I'm kind of with BitDivine. I've been using Ansible "in anger" (at times
literally!) on a real world environment for a few months now. I also try to
make my playbooks a statement of desired state. Most of the time that's easy to
achieve. It gets frustrating when it's not so easy to achieve, but
ERROR: UNREACHABLE! => changed : false , msg:SSH error:data could not be
sent to the remote host.Make sure this host can be reached over ssh",
"unreachable": true
Hosts: [test] xx.local ansible_ssh_user=myname
ansible.cfg [defaults] host_key_checking = False
[ssh_connection]
I met a issue when run a playbook. what caused that symtom ?
[root@director restart-service-overcloud]# vim site.yml
[root@director restart-service-overcloud]# ansible-playbook site.yml
PLAY [controllers]
GATHERING FACTS
Hi Brian,
thanks a lot for the pointer / the solution. A double-default does the
trick in this case :)
with_items: "{{ (pkg_repo_list|default({})).repo_keys | default([]) }}"
Cheers, Kai
On 12/12/16 15:23, Brian Coca wrote:
> when executes for each item in the loop and cannot short circuit
Hi
I have a dict where I need to install patches in the order
patches:
patch1:
patch_name:
patch2:
patch_name:
patch3:
patch_name:
and so on
patch8:
patch_name:
- name: install patches
include: install_patch.yml
with_dict:
This came up about a year ago on the ansible-devel list,
https://groups.google.com/forum/#!searchin/ansible-devel/prefix$20list%7Csort:relevance/ansible-devel/YjfcFY75wJk/qXoEDQbrEwAJ
is the thread: I'd asked about it, someone replied "yes but it'd be
tricky", I don't think anything's happened
Hi there!
ansible-playbook (v. 2.2.0.0) throws an error message that I do not
understand in my conext: "'pkg_repo_list' is undefined"
The task reads:
- name: ensure defined apt keys
apt_key:
state: present
id: "{{pkg_item.id}}"
I think the think you are missing here is that whatever is in group_vars
(either a file or a directory) needs to match up with the name of a group
in your inventory file (unless you using the magic 'all' group, which
applies to all hosts).
So you might wind up with 3 files in different
Le jeudi 8 décembre 2016 09:02:31 UTC+1, Andreas Olsson a écrit :
>
> ons 2016-12-07 klockan 23:40 -0800 skrev Sebastian S.:
> > which ansible says: /usr/local/bin/ansible
>
> That looks more like somewhere where Pip would install Ansible, or
> where someone would install Ansible manually. Any
You were right. There was a ansible pip installation. I uninstalled it and
ansible --version is now correct. Thank you!! ^^
Am Donnerstag, 8. Dezember 2016 13:44:35 UTC+1 schrieb Sebastian S.:
>
> In fact there is one. But when I run this one something goes wrong:
>
> ansible@DE9899S76
Has anyone found a method around this?
On Friday, December 9, 2016 at 5:57:09 PM UTC-5, Dan wrote:
>
> I've had great success in building out my security groups with this
> module, until today.
>
> The issue is that I cannot code in yaml a destination referencing a
> prefix-list. "pl-XX"
>
Hi, forgive me for my bad english.
I'm trying to find a way to test an ssh connection to a specific user on a
new server.
When I create a new virtual server, an ansible playbook is executed to
finish the soft deployments:
1 Check if ssh is available (port 22)
2 Chekc if the ansible user is
Do you feel safe running the playbook automatically every five minutes and
having it alert you when things were not as expected? Personally that's
the point I'd feel queasy about, and given that a playbook (in my
philosophy) logically must have a check only mode, not as a feature but as
52 matches
Mail list logo