Skip to content

Instantly share code, notes, and snippets.

@pol
Last active December 20, 2015 20:19
Show Gist options
  • Select an option

  • Save pol/6189644 to your computer and use it in GitHub Desktop.

Select an option

Save pol/6189644 to your computer and use it in GitHub Desktop.
ansible error from playbook, used git bisect to find when the problem showed up
git bisect good start: 863b88ba44ac9bb41401d634a2374c7b4d01ff89
git bisect bad start:1c361a99680305097c9b098aeb2413fdfe697064
1a4e6e415ef9fa156aecbd7682d309858542c69b is the first bad commit
commit 1a4e6e415ef9fa156aecbd7682d309858542c69b
Author: Serge van Ginderachter <serge@vanginderachter.be>
Date: Thu Aug 8 16:21:03 2013 +0200
Check for ansible_facts in results for with_ tasks
that loop over a lookup plugin. Fixes #3704 and #3735
# --- SNIP ---
- name: install common Centos packages
yum: name={{ item }}
with_items:
- man
- acpid
- curl
- git
- ntp
- pv
- vim
- zsh
- sudo
- logrotate
- fail2ban
- htop
- wget
- cronie
- libselinux-python
tags:
- packages
# --- SNIP ---
# This fails when running the playbook with the following command:
# ansible-playbook site.yml -i production --tags "packages" -K -c paramiko
# Error Text:
# Traceback (most recent call last):
# File "/usr/local/bin/ansible-playbook", line 259, in <module>
# sys.exit(main(sys.argv[1:]))
# File "/usr/local/bin/ansible-playbook", line 205, in main
# pb.run()
# File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 258, in run
# if not self._run_play(play):
# File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 566, in _run_play
# if not self._run_task(play, task, False):
# File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 368, in _run_task
# facts = res.get('ansible_facts', {})
# AttributeError: 'unicode' object has no attribute 'get'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment