Skip to content

Commit

Permalink
hardcode backup users home location
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Feb 9, 2024
1 parent c0b4a25 commit 04fa572
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 2 additions & 9 deletions infrastructure/server-setup/backups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,13 @@
name: '{{ external_backup_server_user }}'
state: present
create_home: true
home: '/home/{{ external_backup_server_user }}'
shell: /bin/bash
tags:
- backups

- name: Get external backup server user home directory
getent:
database: passwd
key: '{{ external_backup_server_user }}'
register: getent_passwd_backup
tags:
- backups

- set_fact:
external_backup_server_user_home: '{{ getent_passwd_backup.ansible_facts.getent_passwd[external_backup_server_user][4] }}'
external_backup_server_user_home: '/home/{{ external_backup_server_user }}'
tags:
- backups

Expand Down
1 change: 1 addition & 0 deletions infrastructure/server-setup/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

- name: 'Setup crontab to clean up docker images'
cron:
user: '{{ crontab_user }}'
name: 'cleanup docker images'
minute: '0'
hour: '0'
Expand Down

0 comments on commit 04fa572

Please sign in to comment.