Instead of using expect, setting the ansible_ssh_pass is another solution.
Instead of running ansible-playbook inside a script, i can directly use it
and it may get the ssh password from group_vars variable. I couldn't make
it, thats what i am trying to do now.
On Thu, Jun 22, 2017 at 8:13 AM,
There is a default time out value for expect. That's why its timing out. To
disable the timeout, we are setting as -1. I don't think its ansible issue.
On Wed, Jun 21, 2017 at 10:09 PM, Oğuz Yarımtepe
wrote:
> The lookup method sounds more Ansible way. timeout -1 solved
The lookup method sounds more Ansible way. timeout -1 solved the issue by
the way. But i would like to solve the lookup problem also.
On Thu, Jun 22, 2017 at 4:59 AM, Madhu wrote:
> Hi,
>
>I think it's timing out because of the spawn. Use 'set timeout -1'
> before the
Brian, thank you!
Additional information provided by the IRC chan:
Complex types get stringified using python's default representation. the [
is for start of list, and each string has u'...' denoting that it's a
unicode string
instead of set_fact: instance_id="expression", use set_fact:
Hi,
I think it's timing out because of the spawn. Use 'set timeout -1' before
the spawn command. That should solve the issue.
Thanks,
Madhu
Sent from my iPhone
> On Jun 21, 2017, at 3:21 PM, Oğuz Yarımtepe wrote:
>
> Great tip.
>
> Here is my folder structure:
Thank you for looking @ issues
I am trying to install pexpect module using easy_install script in Ubuntu
Servers and following are errors we have been observing
after search found following bug can cause issues, Does this bug fixed or
any work around for my installation..
Bug observed
Great tip.
Here is my folder structure:
group_vars/all
some_playbook/playbook.yml
inventory_file
$ ansible-playbook -i inventory_file some_playbook/playbook.yml
--become-user root --become-method sudo --become
# cat group_vars/all
---
ansible_ssh_pass: "{{lookup('pipe',
I don't think there's a One True Way, it really boils down to the team
you're working
with and what makes sense for them given the mix of environments
they're managing.
Some people use one inventory for ALL their servers, if you need cross-site
plays that might be necessary. If you're lucky
Look at this site for Solaris. It installed python 2.6 and dependences to
/opt/csw/.
https://www.opencsw.org/manual/for-administrators/index.html
For CentOS 5 we are looking at python26 from EPEL repository.
https://fedoraproject.org/wiki/EPEL
there was long list and big part of the team is at the London Fest
--
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
Hello, I am looking to get ansible on an approved software list within the us
federal government. Is there a pic that can help identify an existing customer
that I can reference? Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Ansible
New user here trying to figure out the best way to convert our current
server provisioning system to Ansible. Our system uses approx. 5 different
attributes to provision each server and we have about 1,000 servers. I'm
wondering whether we could get by by using Ansible's built-in mechanism
Yeah, I'm currently playing around with exactly these things. I guess I'm
looking for some best-practice guidance for how to handle this situation.
I see a couple of ways people are handling these kinds of things...but
none seem to be very elegant.
I'm trying to talk my team into using
I just recently updated to 2.3.1.0. I've used set_fact before the upgrade
to set my AWS instance ID to a variable "coreaid".
- name: Save instance ID to coreaid
set_fact:
coreaid: "{{ ec2_asg.instances }}"
- debug: msg="the id= {{ coreaid }}"
- name: Set the instance public IP to a
I just had this exact problem. Hopefully this is helpful to anyone else who
comes across this thread.
An empty list is falsey, so
mylist|selectattr('list')
should get what you're looking for, and
mylist|rejectattr('list')
would return elements that have an empty list.
On Tuesday, July 5,
Nevermind, I found my own error for rescue just put command:
ansible-playbook ###.yml
Not sure what I was thinking.
On Monday, March 20, 2017 at 6:43:36 AM UTC-5, Mike C wrote:
>
> Hi all,
>
> im having trouble with the block/rescue functionality.
>
> Here is my code:
>
> ```
> - block:
>
Does anyone know if there is a way to call a play from the rescue part of a
block? I have tried the include: statement but that does not seem to work.
---
- name: Error Catching
hosts: localhost
gather_facts: false
connection: local
tasks:
- block:
- debug: msg='i execute
Anyone have recommendations (and/or example playbooks) that install
programs that get installed into %userprofile%/AppData?
I'm trying to install Slack with Ansible and win_chocolatey but I can only
get Slack to install as the ansible_user.
--
You received this message because you are
Just checked; if you're SSHing in as a non-root user
(vagrant here)
and running the plays via become: then you'll see the sudo messages
in /var/log/secure (on CentOS6; YMMV for other distros) and the
task messages in /var/log/messages.
(the playbook just checks the mysqld service is running,
Sudoing to run Ansible on the control machine won't show up in the
target server logs.
If ansible sudos on the targets (i.e. you have become: yes in the
plays) that should show up.
On 21 June 2017 at 15:56, Steve Zimmerman wrote:
> Hello,
> I have an audit/security
I played around with 'flat file' variables and a dynamic inventory a while back;
group variables seemed to override the inventory level ones.
YMMV, check the precedence levels for vars for the version of Ansible
you're running.
On 20 June 2017 at 22:39, William Saxton wrote:
>
There's a few options.
You can do a 'pre-seed' ssh key (added via Kickstart on in the VMware template;
on AWS you'd add this as the instance is created).
Ansible can use that to get in initially once the server is up and create more
users/groups as desired. Another option would be a central key
use a lookup?
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send
The password is being gathered by a curl command so it is dynamic. Is there
a way to set ssh_pass variable dynamic? Like something to get from an
environment variable?
On Wed, Jun 21, 2017 at 8:23 PM, Brian Coca wrote:
> You can set the ansible_ssh_pass variable, preferably
You can set the ansible_ssh_pass variable, preferably in inventory.
--
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
But in your error you were using (detached from v2.3.1.0-1)?
--
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
Thank you Kai, that is exactly what I was doing wrong. Have a great day!
On Wednesday, June 21, 2017 at 5:37:04 AM UTC-7, Kai Stian Olstad wrote:
>
> On 21.06.2017 02:44, Michael Bushey wrote:
> > - name: AWS Bucket get last SQL dunp
> > hosts: localhost
> > gather_facts: no
> >
在 2015年10月5日星期一 UTC+8下午11:59:55,johhue写道:
>
> This will not work for us. We have to give the password as part of our
> security rules.
>
>
>
> On Sunday, October 4, 2015 at 6:01:04 AM UTC-7, johhue wrote:
>>
>> Hello, I have seen many similar topics but want to make sure my issue is
>> the
Hello,
I have an audit/security request to include the user id in the
messages log for commands issued against a linux server. To illustrate, the
commands are issued with as sudo:
# sudo ansible ---
results in /var/log/messages:
Jun 19 00:01:13 usildng-ps-03 ansible-command: Invoked with
Hi Mumshad Mannambeth,
Any update on this issue? Were you able to resolve it?
Thanks!
Aman.
On Monday, September 19, 2016 at 8:46:59 AM UTC+8, Mumshad Mannambeth wrote:
>
> Hi,
>
> I am trying to run a long running task asynchronously and monitor results
> at the end. (My target are not
Hi i got a realy akward Problem with Ansible(devel)
Got Multiple Servers and all works fine with WinRM and Kerberos on Ansible
Side until i Install/Configure follow Windows Roles on hosts
- Active Directory Federation Service
- WebapplicationProxy
All Servers are based on the Same VM
Hello.
I'm looking around for a best practice tutorial or document that describes
how to configure our ansible server to deploy our applications to about 20
servers at a time. We call this group of servers a track. We have a
growing number of tracks.
So I got Ansible installed but now I
Hi,
I am trying to load a pretty long access-list to a Catalyst 3850 using
Ansible ios-config module with the src option.
- name: copy to the acl to target switches
ios_template:
src:a_test_acl.txt
However it only works with the list with less than 378 entries. I can
confirm that
Any Ideas, I met the same issue
--
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, send
Hi,
I hit a snag using "become/sudo". I can become/sudo to the root user if the
prompt that is returned is as expected (I think). For example, here is the
default prompt.
*[sudo] password for testuser:*
I think Ansible expects some variation of the prompt above to which it
sends the
Hello! I need to play the playbook unprivileged user. The user is not
allowed to use bin/sh and usr/bin/python. How to solve this? Help me please!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
setup
client
installed with
ansible 2.3.1.0
python version = 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) [GCC
4.2.1 (Apple Inc. build 5666) (dot 3)]
host: RHEL 7
installed with
docker version 17.05.0-ce, build 89658be
docker-compose version 1.13.0, build 1719ceb
base image:
Hi, it's taking more than 10 minutes to launch GCE instance with ansible,
wiith existing custom image. What will be the problem?
--
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
Hi
I have testet the Ansible vmware_guest module against vCenter and ESXi 6.5
free trail version. Creating new vm guests based on templates works like a
charm using vmware_guest module.
As I understand vmware_guest uses the pyVmomi API:
https://github.com/vmware/pyvmomi
My question is which
is "Configure zabbix-agent" reporting a change ?
Am Mittwoch, 21. Juni 2017 16:35:05 UTC+2 schrieb Onallion:
>
> Hi,
>
> I am running a playbook with a task that calls a handler like so:
> - name: "Configure zabbix-agent"
> win_template:
> src: zabbix_agentd.conf.j2
> dest: C:\Program
Our current configuration management system stores hostnames and attributes
for each of our systems, including things like "project" and "site". I'd
like to use these attributes when determining which values to provision a
system with using ansible, just like Puppet does with hiera.
Right now
I posted a rather long post yesterday and it seems to have not yet been
approved. Others have. Is there a reason for this?
I would really hate to have to re-write it again...
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe
I m having a similar issue on my side with ansible failling to create an
instance based on a "shared" image. Same error message: "Inner Exception:
Invalid imageRef provided."
If we accept the image it will works fine but it is extra works for us and
we are not facing the issue when we deploy
I'm very new to Ansible. I have a small lab running and I'm trying to
evaluate the use of Ansible for making network changes. I have a
workstations running CentOS Linux release 7.3.1611 and Ansible 2.3.0 as a
fresh install. I'm using a cisco 819 router running Cisco IOS Software,
C800
Hello.
I have ansible server and a few target machines.
I want to run ansible playbooks from target machine instead ansible server.
Is there way to resolve my wish?
Regards, Vlad.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
Hello! I need to play the playbook unprivileged user. The user is not
allowed to use bin / sh and usr / bin / python. How to solve this? Help me
please!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and
So what do you suggest?
Any other method to enter password at a bash script?
On Wed, Jun 21, 2017 at 4:46 PM, Brian Coca wrote:
> Ansible has tty detection which controls it's prompt behaviour, that
> might be affecting your playbook.
>
>
> --
> Brian Coca
>
> --
>
Hi,
This has to do how we are managing inventory as per project requirements.
We have some quite elaborate structure and it is now tried and tested. What
i am doing now is automating routines stuff with Ansible and this cannot
result in changing the existing structure. I gotta find ways with
Why wouldn't you have a single repo in that case?
You can have multiple inventory folders under the playbooks e.g.
.├── roles < - common roles
│ ├── bar
│ └── foo
├── site.yml <- common playbooks
├── dev <- dev inventory
│ ├── group_vars
│ │ └── all
│ └── hosts
├── prod <-
Hi,
I am running a playbook with a task that calls a handler like so:
- name: "Configure zabbix-agent"
win_template:
src: zabbix_agentd.conf.j2
dest: C:\Program Files\Zabbix Agent\zabbix_agentd.conf
newline_sequence: '\n'
trim_blocks: no
notify: restart zabbix-agent
The
Ansible has tty detection which controls it's prompt behaviour, that
might be affecting your playbook.
--
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,
As Phillippe states, this is a PLAY level keyword (true by default),
also the 'gathering' setting in ansible.cfg can change the behaviour.
http://docs.ansible.com/ansible/intro_configuration.html#gathering
So it does not matter how many files nor roles are included, just the
number of Plays and
Hmm. That seems rather complex. Do you happen to know what the prescribed
method of doing this is? Does Ansible recommend using add_hosts http://docs.ansible.com/ansible/add_host_module.html> module?
On Tuesday, June 20, 2017 at 8:21:59 PM UTC-5, Michael Bushey wrote:
>
> I don't think this
fact gathering is a play level directive
(see http://docs.ansible.com/ansible/playbooks_keywords.html#play)
from the doc:
*gather_facts:* A boolean that controls if the play will automatically run
the ‘setup’ task to gather facts for the hosts
and one can run the setup module at anytime
Hi,
I am using ansible-playbook at a script and passing password to t. Below is
how i used it:
run.sh
#!/bin/bash
...
/bin/expect <<- DONE
spawn ansible-playbook -i $1 $2 -u $Username -k --become-user root
--become-method sudo --become
expect "SSH password: "
send
On 21.06.2017 02:44, Michael Bushey wrote:
- name: AWS Bucket get last SQL dunp
hosts: localhost
gather_facts: no
connection: local
vars:
bucket: myuniquebucketname
tasks:
- name: AWS get bucket list
s3:
bucket: "{{ bucket }}"
mode: list
register:
On 06/21/2017 11:01 AM, jean-y...@lenhof.eu.org wrote:
Hi Frank,
21 juin 2017 10:29 "Frank Thommen" a écrit:
Hi,
from ansible's documentation I don't understand how ansible handles fact
gathering when using
roles: Are a host's facts gathered at each single
# ansible --version
ansible 2.4.0 (devel d79315e19e) last updated 2017/06/21 08:47:41 (GMT +000)
config file = /root/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location =
All changes go through `devel`.
--
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 ansible-project+unsubscr...@googlegroups.com.
To post
Hi Frank,
21 juin 2017 10:29 "Frank Thommen" a écrit:
> Hi,
>
> from ansible's documentation I don't understand how ansible handles fact
> gathering when using
> roles: Are a host's facts gathered at each single playbook run? Or at each
> "role" run? Or only
>
Hi all,
I am trying to use Ansible vmware_guest module to clone template to VM but
having the following issue:
fatal: [localhost -> localhost]: FAILED! => {
"changed": true,
"failed": true,
"invocation": {
"module_args": {
"annotation": null,
Hi,
from ansible's documentation I don't understand how ansible handles fact
gathering when using roles: Are a host's facts gathered at each single
playbook run? Or at each "role" run? Or only once?
In most cases one would want to gather facts only once in the beginning,
but is this the
62 matches
Mail list logo