Try changing:
ansible_ssh_password=ansible
to
ansible_ssh_pass=ansible
That tripped me up with 1.9.4.
Same thing would apply to your windows.yml.
Kev
On Wednesday, October 21, 2015 at 5:48:13 PM UTC+1, Tianwei Liu wrote:
>
> Hi,
>
> I am having this weird problem that my ansible will
My existing instances are provisioned thusly:
tasks:
- name: Provision an instance
ec2: >
aws_access_key={{ec2_access_key}}
aws_secret_key={{ec2_secret_key}}
keypair={{mykeypair}}
group_id={{security_group}}
instance_type={{instance_type}}
Hi,
I recently inherited an Ansible deployment that manages some EC2 instances
and I have a couple questions. I am unable to find a pem file/ssh key on
the local file system, but somehow Ansible is able to connect to the
instances it creates and run shell scripts. How is this possible? I'm
Not a problem Mihai! *There is always a way*.
There are choices here, as per usual - you could always use 'wait_for'[1]
in an Ansible play, or you could use a 'phone home' type solution - i.e.
the newly provisioned virtual machine boots and the first thing it does is
'look for' a centralised
run ansible with -v and you should see the full ssh command used,
that should point at a key, if not you likely have an agent or the ssh
user/password info in inventory.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
*typo: not --> now. there's a nice one-letter semantic change, lol.
On Thursday, November 12, 2015 at 4:38:16 PM UTC-5, nathan chu wrote:
>
> Hi,
>
> I recently inherited an Ansible deployment that manages some EC2 instances
> and I have a couple questions. I am unable to find a pem
Is this machine Server 2008 R2 by any chance? WMF 3.0 had an irritating
bug where it would allocate a tiny memory quota for winrm so things would
fail a lot. Hotfix for the fix as described in the blue box here:
http://docs.ansible.com/ansible/intro_windows.html#windows-system-prep
Just
This is something I have been struggling with for a while: a variable
whose name includes a variable. For instance, Ansible facts for a server
includes the following information on the network interfaces:
"ansible_eth0": {
"active": true,
"device":
Hi ,
I got the requirement to ignore the invalid tag name when execute a
playbook
eg . ansible-playbook -t tag1 test.yml
and I will get below error and fail the playbook
ERROR: tag(s) not found in playbook: tag1.
What I expect is doing nothing if tag name is not exist just like
I've noticed since I upgraded to 2.0 that something is wrong with host key
checks when running ansible-playbook. Previously, under 1.9, if
ansible-playbook encountered an unknown host key during the setup phase, it
was present the standard OpenSSH host key prompt and pause to wait for user
Is it possible to get playbook name and/or path from within callback plugin?
--
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
You can't nest jinja2 delimiters. You just use bare variable names inside such
as:
{% for host in groups[VAR] %}
On Thursday, November 12, 2015, Edgardo Vega wrote:
> I am trying to do the following where I index groups by a variable instead
> of hardcoding it. Is that
Great, glad it worked for you!
On Wed, Nov 11, 2015, 1:27 PM Roy wrote:
> Thanks following works for me.
>
>
> zookeeper.connect={% for node in groups['eventstore-zookeeper-' ] %}{{
> node }}:2181{% if not loop.last %},{% endif %}{% endfor %}
>
> --
> You received this message
Great Mark - *There is always a way* even if is the crazyest way :)
I will investigate for now the wait for idea and ping the port or something.
Thanks a lot!
joi, 12 noiembrie 2015, 10:27:35 UTC+1, Mark Phillips a scris:
>
> Not a problem Mihai! *There is always a way*.
>
> There are choices
I figured it out. You can just do the following and it will work.
{% for host in groups[VAR] %}
On Thursday, November 12, 2015 at 7:50:18 AM UTC-5, Edgardo Vega wrote:
>
> I am trying to do the following where I index groups by a variable instead
> of hardcoding it. Is that possible somehow?
>
We do something similar with our builds. The last thing we do in the post
section of our Kickstart script is make a web service call. The web service
moves the VM to the correct network.
> On Nov 12, 2015, at 04:34, Mihai Cristian Satmarean
> wrote:
>
> Great Mark
I am trying to do the following where I index groups by a variable instead
of hardcoding it. Is that possible somehow?
{% for host in groups['{{VAR}}'] %}
STUFF
{% endfor %}
Thanks in advance,
Edgardo
--
You received this message because you are subscribed to the Google Groups
"Ansible
Fwiw, i built this role against centos7 and just ran it fresh against an
updated box monday. I'm gonna check it again now that i saw this.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving
Hi,
xou can write a handler for every single Action, and notify all desired
handlers when needed. Handlers are executed in the order inside the
handlers list.
theoretical example:
tasks:
- name: change config
action: do something
notify:
- enable_handler
-
Hi,
this may help:
https://docs.ansible.com/ansible/playbooks_loops.html#looping-over-subelements
https://docs.ansible.com/ansible/playbooks_loops.html#looping-over-hashes
Alex
On 13 November 2015 at 05:26, Hristo Stoyanov wrote:
> Sorry if this has been documented
1.9 had a skeleton for pfexec support but we never got to test it, it
is now available in 2.0 which is current devel and close to release.
If you really want to test with 1.9, you need to update the following
in the ssh.py or paramiko_ssh.py connection plugin (whichever you are
using).
try:
- hosts: boxens
remote_user: root
tasks:
- yum: name={{ item }} state=present
with_items: packages
- command: "puppet agent --noop --server={{ puppetmaster }}"
- command: "puppet cert sign {{ ansible_fqdn }}"
delegate_to: "{{ puppetmaster }}"
remote_user:
mustaches don't stack, to do dynamic vars you need to use hostvars:
- debug: msg="interface = {{item}}, address = {{
hostvars[inventory_hostname]['ansible_' + item].ipv4.address }}
with_items: ansible_interfaces
when: 'item != "lo"'
--
Brian Coca
--
You received this
So I have no idea why the ostname module would be behaving like that.
Looking at the module it has lots of distribution coverage. I just tested
hostname on ansible 1.9.4 and
"ansible_distribution": "CentOS", "ansible_distribution_major_version":
"7", "ansible_distribution_release": "Core",
2.0 does not lock known_hosts for updating ssh keys, 1.9 does, it is a
difficult issue as it needs to be locked to be consistent, but can end
up serializing the plays.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
Sorry if this has been documented elsewhere (where?), but how can one
iterate with jinja2 over a dictionary?
http://stackoverflow.com/questions/33666820/ansible-jinja2-loops-over-complex-structures
You can ask here or in stackoverflow.
Thanks
--
You received this message because you are
Hi,
xou can write a handler for every single Action, and notify all desired
handlers when needed. Handlers are executed in the order inside the
handlers list.
theoretical example:
tasks:
- name: change config
action: do something
notify:
- enable_handler
-
I'd try running 1.9 against the very same host and see what happens, also,
adding - may give some idea what's happening too .. it may just be a
new config setting somewhere ... this may be relevant too tho :
https://github.com/ansible/ansible/issues/3694#issuecomment-22530734
Alex
On 13
I have verified that PSRemoting seems to be working fine on this host. From
another windows box...
PS C:\> Invoke-Command -ComputerName myhost -port 5985 -Authentication
Kerberos -ScriptBlock { Get-Content c:\windows\system32\drivers\etc\hosts
} -credential myaccount
# Copyright (c)
Hi Mohammad,
I've submitted pull request
https://github.com/ansible/ansible-modules-extras/pull/1223 if you are still
after an Ansible cloudfront module.
Regards
Ķaren C
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe
Is there a advance substr( var, ':', 0) ---> to get from the begin of the
string the substring ?
On Thursday, 12 November 2015 14:13:16 UTC+1, Eric Franckx wrote:
>
> Hi,
>
> if I have a string/var with hostname_01.com:28569, how can I use the
> hostname part (hostname_01 and don"t use the
Hi,
if I have a string/var with hostname_01.com:28569, how can I use the
hostname part (hostname_01 and don"t use the :28569) to be use in an
action ?
Regards,
--
--
This email is sent on behalf of Northgate Information Solutions Limited and
its associated
SOLVED:
Simple by using : [0][0] and [0][1] to get the correct value/parameters.
On Wednesday, 11 November 2015 16:48:09 UTC+1, Eric Franckx wrote:
>
> Hi,
> I try to connect to a list of Sentinel host to get the master redis host
> and port.
>
>- name: "CONNECT SENTINEL" command:
Thanks Matt! is there way to do this in a playbook. The first one works the
second one doesn't.
- debug: msg="hey {{ item }}"
with_items: groups['tag_env_prod']
- debug: msg="hey {{ item }}"
with_items: groups['{{group_name}}']
On Thursday, November 12, 2015 at 7:59:20 AM UTC-5,
I havent managed to understand my problem but I have been able to use this
workaround using the "include_vars" module instead:
---
- hosts: server1:server2
tasks:
- include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_os_family }}{{ ansible_distribution_version }}.yml"
Hi guys,
Looks like state=reconfigured in vsphere_guest module cannot be used for
datastore migration for a vm.
Is there is away to migrate a virtual machine to a different datastore in
the vcenter using ansible?
--
You received this message because you are subscribed to the Google Groups
I am trying to get around the "Unable to validate server's certificate
against available CA certs" error. I've tried using uri: url=site url
validate_cert=no and I'm still getting the same error. Then I tried using
get_url: url=site url validate_cert=no, and now I'm getting "unsupported
Hi,
I have to run sudo commands in async mode and recover the stdout/stderr.
I have written a module to run sudo commands but I am not able to recover
the stdout and stderr. All of this is done from a python script and in the
json which is returned the file indicated in results_file is empty.
Hi,
I have to execute sudo commands in async mode and I need to recover stdout
and stderr.
I have written a module to do that but I am not able to recover the stdout
and stderr.
All of this is done using a python script and the file indicate in
results_file is empty.
I am new with ansible
Super, you are the man
Thank you very much
On Thursday, 12 November 2015 14:13:16 UTC+1, Eric Franckx wrote:
>
> Hi,
>
> if I have a string/var with hostname_01.com:28569, how can I use the
> hostname part (hostname_01 and don"t use the :28569) to be use in an
> action ?
>
> Regards,
>
OK ... found the issue:
var=production.clients.default.hosts[0].split(':')
Works.
thanks again to Matt Martz for the tip some_var.split(':')[0]
On Thursday, 12 November 2015 14:13:16 UTC+1, Eric Franckx wrote:
>
> Hi,
>
> if I have a string/var with hostname_01.com:28569, how can I use the
>
There a few ways. One way is to use .split()
Such as:
some_var.split(':')[0]
On Thursday, November 12, 2015, Eric Franckx wrote:
> Is there a advance substr( var, ':', 0) ---> to get from the begin of the
> string the substring ?
>
> On Thursday, 12 November 2015
Hi,
I am not able to get the "ping" modules working when using privilege
escalation on Solaris 11.
I am using Ansible 1.9.4 from a CentOS 7.1 control machine:
$ ansible --version
ansible 1.9.4
configured module search path = None
$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
Still an issue .. sorry I start with Ansible:
I have a config file with following entries:
production:
clients:
default:
database: db1
hosts:
- host1.com:29017
and so if I try on it :
debug: msg={{ production.clients.default.hosts.split(':')[0]}}
I have the
you can have more than 1 play in a playbook
- name: play1
hosts: ...
tasks:
- do most of the work
- na
On Thu, Nov 12, 2015 at 2:38 AM, Rafał Radecki wrote:
> Thanks for the tip. Overall serial looks good but it is usable only at the
> 'play' level. In my case
I've been bashing at this since yesterday and have read around a lot and
tried lots of things. I figured it was time to try the list.
Basically I'm trying to create a playbook that will be used when
bootstrapping a fresh host. The root user is needed for the initial
bootstrap. After the on
try hitting it again with ansible and check the event logs for any evidence
of a login attempt.
if its not getting that far... is there a proxy between controller and
windows host (guessing a bit here, not much experience with proxies)?
possibly firewall rules kicking in? bear in mind
- debug: msg="hey {{ item }}"
with_items: "{{groups[group_name]}}"
On Thu, Nov 12, 2015 at 5:44 AM, Edgardo Vega wrote:
> Thanks Matt! is there way to do this in a playbook. The first one works the
> second one doesn't.
>
> - debug: msg="hey {{ item }}"
>
I have been trying to determine this myself and I have not successfully
started a terminated instance with the Ansible gce module.
The titles of the Ansible module pages do seem to imply that the EC2 has a
higher level of functionality than the GCE module:
ec2 - create, terminate, start or
I see a sucessful connection listed in the event logs, and in my original
post demonstrated that I could telnet in on the WinRM port, so no firewall
blocking. There is also no proxy or anything in between. I can connect to
over 100 different servers, many on the same subnet as myhost, but this is
50 matches
Mail list logo