forked from thunix/ansible
Tweak backup to exempt nobackup, and added user/group cherry
This commit is contained in:
parent
d0bc6877ea
commit
4e8714a5df
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
tar -cvz --exclude "nobackup" --exclude='/home/chuck/*' --exclude='/home/slip/*' --exclude='/home/angelok/*' --exclude='/home/usernameak/*' --exclude='/home/ubergeek/*' --exclude='/home/amcclure/*' --exclude='/home/fosslinux/*' --exclude='/home/zszoke/*' -f /var/backups/`date +%Y%m%d`.tgz /home/
|
||||
tar -cvz --exclude "nobackup" --exclude "/home/irc/*"--exclude='/home/chuck/*' --exclude='/home/slip/*' --exclude='/home/angelok/*' --exclude='/home/usernameak/*' --exclude='/home/ubergeek/*' --exclude='/home/amcclure/*' --exclude='/home/fosslinux/*' --exclude='/home/zszoke/*' -f /var/backups/`date +%Y%m%d`.tgz /home/
|
||||
|
||||
chown root:sudo /var/backups/$(date +%Y%m%d).tgz
|
||||
chmod 640 /var/backups/*.tgz
|
||||
|
|
|
@ -8,15 +8,11 @@
|
|||
name: sudo
|
||||
state: present
|
||||
|
||||
#- group:
|
||||
# name: fortitude
|
||||
# state: present
|
||||
|
||||
#Service accounts
|
||||
- include: users/minecraft.yml
|
||||
- include: users/bzflag.yml
|
||||
- include: users/znc.yml
|
||||
|
||||
- include: users/cherry.yml
|
||||
#Normal Users
|
||||
- include: users/amcclure.yml
|
||||
- include: users/ben.yml
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: add group cherry
|
||||
group:
|
||||
name: cherry
|
||||
system: yes
|
||||
state: present
|
||||
|
||||
- name: Add the user cherry
|
||||
user:
|
||||
name: cherry
|
||||
system: yes
|
||||
shell: /bin/false
|
||||
groups: cherry
|
||||
create_home: yes
|
||||
home: /home/cherry
|
||||
state: present
|
Loading…
Reference in New Issue