[ansible-project] Re: Using shell or command to do git operation fails half the time

2017-12-05 Thread Michael Bushey
Sourcing this script fixes the problem: https://github.com/wwalker/ssh-find-agent On Friday, December 1, 2017 at 11:55:20 AM UTC-8, Michael Bushey wrote: > > I am doing a git fetch (also git merge master) on the remote machines. It > seems random whether it will work or not. I get er

[ansible-project] Using shell or command to do git operation fails half the time

2017-12-01 Thread Michael Bushey
I am doing a git fetch (also git merge master) on the remote machines. It seems random whether it will work or not. I get errors like: "error fetching identities for protocol 2: communication with agent failed" or "fatal: 'ef' does not appear to be a git repository\nfatal: Could not read from

Re: [ansible-project] Using with_items with a dictionary

2017-08-28 Thread Michael Bushey
.txt - system - vendor tags: grav, grav-sites On Mon, Aug 28, 2017 at 12:52 PM, Uwe Sauter wrote: > I'm not quiet sure I understand your data model but instead of with_items > have a look at with_dict. > > Am 28.08.2017 um 21:51 schrieb Michael Bushey: > > Hello, >

[ansible-project] Using with_items with a dictionary

2017-08-28 Thread Michael Bushey
Hello, I have a dict that contains a list of sites. For each of these sites I would like to provide a list of symlinks to create provided by with_items. Is this possible? I have Ansible 2.3.1.0. Thanks! Michael -- You received this message because you are subscribed to the Google Groups "An

[ansible-project] Looping for find results

2017-08-02 Thread Michael Bushey
On Ansible 2.3.1.0 this works: - name: Identify logs find: paths=/var/log/nginx patterns="*.log" ignore_errors: true register: files_to_delete - name: Remove debug file log file: path=/tmp/test.log state=absent - name: Log matched files s

Re: [ansible-project] s3 module can create a bucket, but cannot list bucket contents

2017-06-21 Thread Michael Bushey
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 >

[ansible-project] Re: referencing the instance id of an EC2 resource just created

2017-06-20 Thread Michael Bushey
I don't think this works in Ansible. The ec2 functionality seems very marginal and defective. I split the playbooks into two parts. The first spins up the instance. Then I go to the aws console to assign the correct IAM role to the instance as I can't figure out how to do this in Ansible. Then

[ansible-project] s3 module can create a bucket, but cannot list bucket contents

2017-06-20 Thread Michael Bushey
I'm unable to get a list of an s3 bucket, Ansible says OK but no data is retrieved. ╰─➤ dpkg -l | grep boto ii python-boto 2.40.0-1ubuntu1all Python interface to Amazon's Web Services - Python 2.x ii python-boto3

[ansible-project] iam_policy does nothing, just echos OK on nonexistant policy

2017-06-20 Thread Michael Bushey
ok=1changed=0unreachable=0failed=0 Thanks for reading this. :) Michael Bushey -- 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-p

Re: [ansible-project] Module ec2_ami_find does not return data

2017-06-14 Thread Michael Bushey
If I spell 'available' correct I also get the template error. On Wed, Jun 14, 2017 at 11:38 AM, Michael Bushey wrote: > I am able to spin up servers with the 'ec2' module. I'm running Ansible > 2.3.1.0 from source on Ubuntu.

[ansible-project] Module ec2_ami_find does not return data

2017-06-14 Thread Michael Bushey
I am able to spin up servers with the 'ec2' module. I'm running Ansible 2.3.1.0 from source on Ubuntu. ╰─➤ dpkg -l | grep -i boto

[ansible-project] Re: ec2 inventory script broke with 'module' object has no attribute 'boto3_inventory_conn'

2017-06-05 Thread Michael Bushey
/etc/ansible/ec2.py --list works, but if I try to run from ansible I get this: ~/ansible/playbooks$ ansible -i /etc/ansible/ec2.py -u ubuntu us-east-1d -m ping Traceback (most recent call last): File "/usr/local/bin/ansible", line 4, in __import__('pkg_resources').run_script('ansible==2.

[ansible-project] Re: ec2 inventory script broke with 'module' object has no attribute 'boto3_inventory_conn'

2017-06-05 Thread Michael Bushey
"./ec2.py --list" is now working. The correct ec2.py was from ansible-2.3.1.0/contrib/inventory/ Thanks for your help Matt. :) Michael -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] Re: ec2 inventory script broke with 'module' object has no attribute 'boto3_inventory_conn'

2017-06-05 Thread Michael Bushey
I installed the latest Ansible (2.3.1.0) from source and now I get: /etc/ansible$ ./ec2.py --list --refresh-cache {"msg": "Error: Module unable to decode valid JSON on stdin. Unable to figure out what parameters were passed", "failed": true} -- You received this message because you are subsc

[ansible-project] ec2 inventory script broke with 'module' object has no attribute 'boto3_inventory_conn'

2017-06-05 Thread Michael Bushey
Hello, I am running Ubuntu 16.04 w/Ansible 2.0.0.2-2ubuntu1. /etc/ansible$ wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.py /etc/ansible$ wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.ini /etc/ansible$ chmod +x /etc/ansi

[ansible-project] Re: [ansible-devel] How to use dict keys as items?

2015-05-19 Thread Michael Bushey
s, to prevent any > naming collision with internal variables. > > On Tue, May 19, 2015 at 4:25 PM, Michael Bushey > wrote: > >> I have a dict: >> >> hosts: >> web01: >> int_ip: 192.168.1.1 >> ext_ip: 1.2.3.4 >> web02: >>int_

Re: [ansible-project] Re: linode_module not working

2015-03-23 Thread Michael Bushey
en one calls SDK/APIs through localhost. > > Can you perhaps show how and where you include this create_web.yml of yours? > Perhaps the scope is not set right. > > Cheers, > Dan. > > > On Monday, 23 March 2015 18:14:40 UTC+1, Michael Bushey wrote: >> >> Dan

Re: [ansible-project] Re: linode_module not working

2015-03-23 Thread Michael Bushey
a good explanation: http://yaml.org/spec/current.html#id2519916 > > On Wednesday, 18 March 2015 19:38:02 UTC+1, Michael Bushey wrote: >> >> I'm attempting to use the first example on page: >> http://docs.ansible.com/linode_module.html >> >> ⇒ ansible-play

Re: [ansible-project] Re: Ansible bug - IP of servers change to 127.0.0.1 mid way through playbook

2015-03-18 Thread Michael Bushey
On Wednesday, March 18, 2015 at 2:44:02 PM UTC-7, Brian Coca wrote: > > By default synchronize runs as a local action to copy files from the > ansible host to the remote server, do you have localhost or 127.0.0.1 > defined in your hosts file and connection variables set? > > Thank you Brian!!!

Re: [ansible-project] Re: Ansible bug - IP of servers change to 127.0.0.1 mid way through playbook

2015-03-18 Thread Michael Bushey
> > but on the task that is hitting localhost, do you have a > delegate_to/connection: local there? > No, that's the bug I'm reporting. If I comment out 153 #- name: PHP | Copy over fpm-php pools 154 # synchronize: src=/obsidian/ansible/files/etc-php5/fpm/pool.d dest=/e

[ansible-project] Re: lineinfile task fails on missing file, doesn't add line when it should

2015-03-18 Thread Michael Bushey
> I would have expected ansible to create the file instead of erroring out. Do this first to make sure it exists: - name: Create /etc/hosts.deny shell: touch /etc/hosts.deny creates=/etc/hosts.deny -- You received this message because you are subscribed to the Google Groups "Ansible Project

[ansible-project] Re: Ansible bug - IP of servers change to 127.0.0.1 mid way through playbook

2015-03-18 Thread Michael Bushey
Hi Brian. :) > do you have delegate_to or connection: local set on that task? No. Here's the top of web_config.yml 1 --- 2 - name: Ansible config for web servers 3 hosts: webservers 4 user: root 5 sudo: no 6 vars_files: 7 - password.yml 8 - hosts.yml 9 vars:

[ansible-project] Re: Ansible bug - IP of servers change to 127.0.0.1 mid way through playbook

2015-03-18 Thread Michael Bushey
Hi Brian. >From hosts: ... [webservers] web[01:02] web[04:05] ... resolv.conf contains the nameserver of my router. from etc/hosts: 45.56.XXX.XXX web1 104.237.XXX.XXX web2 104.239.XXX.XXX web4 104.130.XXX.XXX web5 Neither the ansible hosts file or /etc/hosts are changing mid run of the ansi

[ansible-project] Re: Ansible bug - IP of servers change to 127.0.0.1 mid way through playbook

2015-03-18 Thread Michael Bushey
using - I get this: TASK: [PHP | Copy over php-fpm.conf] ** ESTABLISH CONNECTION FOR USER: root ESTABLISH CONNECTION FOR USER: root ... ESTABLISH CONNECTION FOR USER: root ESTABLISH CONNECTION FOR USER: root ... TASK: [PHP | Copy over fpm-php

[ansible-project] Ansible bug - IP of servers change to 127.0.0.1 mid way through playbook

2015-03-18 Thread Michael Bushey
⇒ uname -a Linux caine 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux ⇒ ansible-playbook --version ansible-playbook 1.7.2 >From playbook: 149 - name: PHP | Copy over php-fpm.conf 150 copy: src=/ansible/files/etc-php5/fpm/php-fpm.conf dest=/etc/php5/fpm/ mo

[ansible-project] Re: Variable substitution problem in task name

2015-03-18 Thread Michael Bushey
Hi Arbab, That's just the way Ansible works, the '- name' item is not parsed for variable substitution. That's pissed me off too. On Friday, March 13, 2015 at 3:56:47 AM UTC-7, Arbab Nazar wrote: > > Hi, > > I have a problem with the Variable substitution in task name, like: > > - name: VPC |

[ansible-project] linode_module not working

2015-03-18 Thread Michael Bushey
I'm attempting to use the first example on page: http://docs.ansible.com/linode_module.html ⇒ ansible-playbook --version ansible-playbook 1.7.2 ⇒ ansible-playbook -i ../hosts create_web.yml ERROR: datacenter is not a legal parameter at this level in an Ansible Playbook ⇒ cat create_web.yml -

Re: [ansible-project] Re: Unable to figure out arrays

2014-10-10 Thread Michael Bushey
ict approach is I can do "when: item.key not in allowed_users_dev" with "user: name={{ item.key }} state=absent". On Fri, Oct 10, 2014 at 9:35 AM, Adam Heath wrote: > - name: foo > shell: echo "{{ users[item].name }}" > with_items: >- alice >

Re: [ansible-project] Re: Unable to figure out arrays

2014-10-09 Thread Michael Bushey
gt; - name: Add user > debug: msg="Add user {{ item.key }} password {{ item.value.pass }}" > with_dict: users > > > Here's the section of the docs you want - > http://docs.ansible.com/playbooks_loops.html#looping-over-hashes > > On Friday, October 10, 20

[ansible-project] Re: Unable to figure out arrays

2014-10-09 Thread Michael Bushey
Please ignore the second mail: under bob -- 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,

[ansible-project] Unable to figure out arrays

2014-10-09 Thread Michael Bushey
I would like to be able to put my users into a list and be able to select what user has access to each machine. --- - name: Set up users hosts: localhost gather_facts: no vars: - alice: name: Alice Appleworth mail: al...@appleworth.com pass: ..hash... - bob