[ansible-project] Lookup plugin that uses SSH agent for decrypting data

2014-04-08 Thread anatoly techtonik
Hi, Is it technically possible to encrypt some sensitive data using available SSH public key, so that only the owner of private key could read them with the help of SSH agent? Why? 1. No need to remember one more password. 2. No need to send the password to a person who needs to read the file.

Re: [ansible-project] Ansible sometime could not get the output from the runner._low_level_exec_command,this would cause the task to fail.

2014-04-08 Thread qiu jiawei
I thought it is hard to set up the example. Because this problem only appear in one of our product environment.We never find this problem in our test environment. We use ansible to monitor the machine's port ,so ansible-playbook may run multiple at the same time . Is it any params that we

[ansible-project] Implementing custom modules

2014-04-08 Thread Marc Tardif
Hi folks, I need a module like wait_for that also checks for something useful returned by a URL. The reason is that a port might be open but the service might not be returning anything useful yet. So, I'd like to know how to implement a custom module that resides outside the ansible project so

[ansible-project] apt module is giving me some very strange behavior: sometimes it works, sometimes it says python-apt is not installed

2014-04-08 Thread chris d
hi everyone, i'm really digging ansible so far, but I keep running into this one strange issue. I have a couple different roles, and for now they all target the same host. In a common role, it ansible uses the apt module to install some apt packages like so: - name: install common apt

[ansible-project] Trying to run a command when a file matching a regex does not exist.

2014-04-08 Thread Michael Kelly
Hi, I'm trying to run a command when a file matching a regex does not exist. My use case is I am unzipping an artifact - ec2-api-tools.zip This will unzip to a directory that includes the version number - e.g. ec2-api-tools-1.6.13.0 I want to check if there is a directory that matches the

[ansible-project] Execute pause module only after EC2 provisioning?

2014-04-08 Thread Christian Kaps
Hi, in the most Playbooks about EC2 provisioning there exists a task which executes the pause module to wait for the instance to be available. Now that the EC2 module supports idempotency it is possible to run a playbook multiple times to add new features to an already provisioned instance.

[ansible-project] Re: Notifying handler only once

2014-04-08 Thread Timur Batyrshin
Hi, I've posted a similar message earlier: https://groups.google.com/forum/#!topic/ansible-project/8FqZwqqyyeU But haven't got any replies to it. And here is a bit earlier ticket with Michael's answer: https://github.com/ansible/ansible/issues/5634 If you find the way to solve your issue

[ansible-project] FATAL execution without any failures?

2014-04-08 Thread Michael Altfield
Hi ansible gurus! I'm writing a python script that uses ansible.playbook to do a rolling update, but I'm very confused by the following output at the end of my execution: FATAL: all hosts have already failed -- aborting {'unreachable': 0, 'skipped': 0, 'ok': 2, 'changed': 1, 'failures': 0}

[ansible-project] AWS prives required aren't documented

2014-04-08 Thread ben lumina
Using ansible to deploy AWS instances, but each time more privs need granted that I would expect. Does anyone know what privs are required for this operation? - name: Launch instance local_action: ec2 keypair= group= instance_profile_name=

[ansible-project] Help creating an ansible playbook

2014-04-08 Thread andrew thornton
Hello everyone, I am new to ansible but I am really enjoying it. I am trying to create a playbook to spin up new droplets (servers) at DigitalOcean. I have the following playbook put together and I need a little help. My first task Create new staging droplets works very well, but I need to

[ansible-project] 1.5.4: apt dist-upgrade fails with No such file or directory

2014-04-08 Thread Jens-Christian Fischer
I am trying to upgrade all our (ubuntu) servers with the following playbook: - hosts: all serial: 2 tasks: - name: apt-get update apt: update_cache=yes - name: apt-get dist-upgrade apt: upgrade=dist dpkg_options='force-confold,force-confdef' - name: reboot

Re: [ansible-project] cannot open `/etc/sudoers' for reading

2014-04-08 Thread James Cammarata
Do you have selinux enforcing? On Tue, Apr 8, 2014 at 5:13 AM, Makimoto Marakatti makim...@gmail.comwrote: Hi all I'm having a weird issue that I can't figure out: I'm making a backup of /etc/sudoers from client boxes, before templating. ansible complains it has no rights to read

Re: [ansible-project] cannot open `/etc/sudoers' for reading

2014-04-08 Thread Makimoto Marakatti
[root@clientbox tmp]# sestatus SELinux status: disabled Same result in both client and master. So I have been doing tests and I cannot read any file which is set 0440 owned by root, through ansible. [root@clientbox tmp]# stat /etc/sudoers File: `/etc/sudoers' Size: 10092

Re: [ansible-project] cannot open `/etc/sudoers' for reading

2014-04-08 Thread James Cammarata
I was curious because ansible is actually executing the commands through python, so I wanted to be sure that no selinux rule was preventing that on your system. Could you also please share the playbook you're running (only the failing step is required) as well as the output run with -?

Re: [ansible-project] Subversion export via Ansible - strange error msg

2014-04-08 Thread James Cammarata
This appears to be a mistake in the documentation, as the export option was actually added in the devel (1.6) branch. I will get that corrected now, thanks for catching it! On Mon, Apr 7, 2014 at 12:55 PM, Slim Slam slimands...@gmail.com wrote: Using Ansible v1.5.4, I'm trying to do a simple

Re: [ansible-project] apt module is giving me some very strange behavior: sometimes it works, sometimes it says python-apt is not installed

2014-04-08 Thread James Cammarata
Is there any chance you could try this with the 1.5.4 release, or with the most up to date devel branch to see if it's still an issue? If so, please open an issue on github so we can keep track of it. Thanks! On Mon, Apr 7, 2014 at 2:42 PM, chris d chrisd1...@gmail.com wrote: hi everyone,

[ansible-project] How to move fresh Debian to systemd with Ansible?

2014-04-08 Thread anatoly techtonik
Hi, apt-get once again too demanding. Trying to move to systemd is presented with a warning that you can not escape from command line: $ apt-get install -y -qq --force-yes systemd-sysv You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!' ?] This

Re: [ansible-project] Lookup plugin that uses SSH agent for decrypting data

2014-04-08 Thread Maciej Delmanowski
You can encrypt data using GPG keys for multiple recipients - each recipient can access the data using his/her GPG key. GPG keys can also be used to authorize SSH access via Monkeysphere Project. - http://web.monkeysphere.info/. 2014-04-08 21:19 GMT+02:00 anatoly techtonik techto...@gmail.com:

Re: [ansible-project] How to move fresh Debian to systemd with Ansible?

2014-04-08 Thread Maciej Delmanowski
Maybe this will work? - shell: yes Yes, do as I say! | apt-get -y -qq --force-yes apt-get install systemd-sysv 2014-04-08 21:26 GMT+02:00 anatoly techtonik techto...@gmail.com: Hi, apt-get once again too demanding. Trying to move to systemd is presented with a warning that you can not

Re: [ansible-project] How to move fresh Debian to systemd with Ansible?

2014-04-08 Thread anatoly techtonik
On Tue, Apr 8, 2014 at 11:00 PM, Serge van Ginderachter se...@vanginderachter.be wrote: On 8 April 2014 21:26, anatoly techtonik techto...@gmail.com wrote: apt-get once again too demanding. Trying to move to systemd is presented with a warning that you can not escape from command line: $

Re: [ansible-project] How to move fresh Debian to systemd with Ansible?

2014-04-08 Thread anatoly techtonik
Looks like this worked. Thanks. - shell: echo Yes, do as I say! | apt-get install -y -q --force-yes systemd-sysv On Tue, Apr 8, 2014 at 10:27 PM, Maciej Delmanowski dryb...@gmail.com wrote: Maybe this will work? - shell: yes Yes, do as I say! | apt-get -y -qq --force-yes apt-get install

[ansible-project] Simple private key setup?

2014-04-08 Thread Martin Streicher
I have an EC2 instance established. My public key is in authorized_keys and I can ssh in from the command-line. I cannot however get Ansible to do anything. [defaults] hostfile = inventory host_key_checking = False private_key_file = /Users/strike/.ssh/id_rsa remote_user =

[ansible-project] Re: FATAL execution without any failures?

2014-04-08 Thread Marc Petrivelli
Any chance you have any local plays in your playbook? something like - hosts: 127.0.0.1 connection: local On Monday, April 7, 2014 11:02:05 PM UTC-4, maltfield wrote: Hi ansible gurus! I’m writing a python script that uses ansible.playbook to do a rolling update, but I’m very

[ansible-project] Cannot iterate over hosts in group of groups inside of a template

2014-04-08 Thread Juergen Brendel
Hello! I don't seem to be able to iterate over the hosts of a group of groups within a template. My inventory file looks similar to this: [group1] [group2] [group3:children] group1 group2 The groups group1 and group2 are initially left empty. However,

[ansible-project] Reliably wait_for SSH connection to go up

2014-04-08 Thread anatoly techtonik
--- - hosts: '{{ host }}' gather_facts: no tasks: - name: reboot machine command: /sbin/reboot - name: waiting for machine to come back local_action: wait_for host={{ ansible_ssh_host }} port={{ ansible_ssh_port }} delay=30 timeout=180 state=started - command: echo X This