December 2017
Intermediate to advanced
364 pages
7h 30m
English
When collecting multiple sets of data from servers, it's important to store them securely with encrypted backups. This can be achieved by backing up the data to storage services such as S3.
The following Ansible playbook allows us to install and copy the collected data to the AWS S3 service with encryption enabled:
- name: backing up the log data hosts: localhost gather_facts: false become: yes vars: s3_access_key: XXXXXXX # Use Ansible-vault to encrypt s3_access_secret: XXXXXXX # Use Ansible-vault to encrypt localfolder: /tmp/LOGS/ # Trailing slash is important remotebucket: secretforensicsdatausingAnsible # This should be unique in s3 tasks: - name: installing s3cmd if not installed apt: name: "{{ item ...Read now
Unlock full access