Skip to content

Instantly share code, notes, and snippets.

@jaimegago
Created June 16, 2015 06:11
Show Gist options
  • Save jaimegago/ed1b242e4c2e0e5a0194 to your computer and use it in GitHub Desktop.
Save jaimegago/ed1b242e4c2e0e5a0194 to your computer and use it in GitHub Desktop.
An ansible playbook to dowwload all the apache access log files
---
- hosts: all
sudo: yes
tasks:
- name: "Get all the access log file paths"
shell: "ls /var/log/apache2/access.log*"
register: ls_output
- name: "Download all the apache logs"
fetch: src={{ item }} dest="logs"
with_items: ls_output.stdout_lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment