# s3example.yml
---
- hosts: localhost
connection: local
user: root
tasks:
- name: download file from s3
s3: bucket=my-bucket object=packages/my-package.tar.gz dest=/my-package.tar.gz mode=get
# Ansible push works OK , the files get's downloaded from S3
ansible-playbook zabbix-agent.yml
# manually running the same playbook in pull mode also works OK
ansible-pull -U g...@github.com:my-company/myRepo.git -d /tmp/testing -o --checkout=test s3example.yml
# The problem is when using ansible-pull from cron
# /etc/cron.d/ansible-pull :
*/5 * * * * root source /opt/ansible/hacking/env-setup >& /dev/null; ansible-pull -U g...@github.com:my-company/myRepo.git -d /tmp/testing -o --checkout=test s3example.yml >>/var/log/test-ansible-pull.log 2>&1
# this is what I see in /var/log/test-ansible-pull.log
TASK: [ download file from s3] **************************************
failed: [localhost] => {"failed": true}
msg: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials
FATAL: all hosts have already failed -- aborting
This is happening in ansible 1.5 (devel 44ca015d87) last updated 2013/11/29 11:20:12 (GMT +000) .