Created
June 16, 2015 06:11
-
-
Save jaimegago/ed1b242e4c2e0e5a0194 to your computer and use it in GitHub Desktop.
An ansible playbook to dowwload all the apache access log files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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