Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
831 B

  1. ---
  2. - name: 'install borgbackup'
  3. apt:
  4. pkg: 'borgbackup'
  5. state: 'latest'
  6. update_cache: true
  7. cache_valid_time: 3600
  8. - name: 'create backup group'
  9. group:
  10. name: 'backup'
  11. state: 'present'
  12. - name: 'create backup user'
  13. user:
  14. name: 'backup'
  15. shell: '/bin/bash'
  16. home: '/home/backup'
  17. createhome: true
  18. group: 'backup'
  19. state: 'present'
  20. - name: 'create home folder'
  21. file:
  22. path: '/home/backup/repos'
  23. owner: 'backup'
  24. group: 'backup'
  25. mode: '0700'
  26. state: 'directory'
  27. - name: 'create .ssh folder'
  28. file:
  29. path: '/home/backup/repos'
  30. owner: 'backup'
  31. group: 'backup'
  32. mode: '0700'
  33. state: 'directory'
  34. - name: 'create repos folder'
  35. file:
  36. path: '/home/backup/repos'
  37. owner: 'backup'
  38. group: 'backup'
  39. mode: '0700'
  40. state: 'directory'
  41. ...