Changeset - 0f817823bed7
[Not reviewed]
0 3 3
Branko Majic (branko) - 8 years ago 2016-01-07 11:43:02
branko@majic.rs
MAR-44: Implemented backup support for the common role. Includes back-up of logs and (regular) home directories.
6 files changed with 35 insertions and 0 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -257,6 +257,21 @@ The role implements the following:
 
  IP address, using the ``iptables hashlimit`` module.
 

	
 

	
 
Backups
 
~~~~~~~
 

	
 
If the backup for this role has been enabled, the following paths are backed-up:
 

	
 
**/var/log**
 
  Log files from the system.
 

	
 
**/home**
 
  Home directory for regular users.
 

	
 
**/root**
 
  Root user's home directory.
 

	
 

	
 
Parameters
 
~~~~~~~~~~
 

	
roles/common/defaults/main.yml
Show inline comments
 
---
 

	
 
enable_backup: False
 
common_packages: []
 
os_users: []
 
os_groups: []
roles/common/files/backup_patterns
Show inline comments
 
new file 100644
 
/root
 
/home
 
/var/log
 
\ No newline at end of file
roles/common/meta/main.yml
Show inline comments
 
new file 100644
 
---
 

	
 
dependencies:
 
  - role: backup_client
 
    when: enable_backup
 
\ No newline at end of file
roles/common/tasks/backup.yml
Show inline comments
 
new file 100644
 
---
 

	
 
- name: Deploy include patterns to backup
 
  copy: src="backup_patterns" dest="/etc/duply/main/patterns/common"
 
        owner="root" group="root" mode="700"
 
  notify:
 
    - Assemble Duply include patterns
 
\ No newline at end of file
roles/common/tasks/main.yml
Show inline comments
 
@@ -89,3 +89,7 @@
 

	
 
- name: Enable ferm service
 
  service: name=ferm enabled=yes state=started
 

	
 
- name: Enable backup
 
  include: backup.yml
 
  when: enable_backup
 
\ No newline at end of file
0 comments (0 inline, 0 general)