Skip to content

Commit

Permalink
ensure there is a jason user, added crontab to backup website
Browse files Browse the repository at this point in the history
  • Loading branch information
compscidr committed Apr 10, 2021
1 parent 5adf03b commit 7dbb98c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Deploy to ubuntu-server:

Deploy to entire lan:

Deploy to www.jasonernst.com:
`ansible-playbook -i ansible/inventories/production/hosts.yml ansible/site.yml -u root --vault-password-file=.vault_pass --limit www.jasonernst.com`

## Todo:
- setup local dns on lan (so we can reach devices by hostname instead of ip)
Expand Down
13 changes: 13 additions & 0 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@
apply:
become: true

- name: Add the user 'jason'
become: true
ansible.builtin.user:
name: jason
comment: Jason Ernst

- name: adding jason to group sudo
become: true
user:
name: jason
groups: sudo
append: true

- name: adding jason to group docker
become: true
user:
Expand Down
7 changes: 7 additions & 0 deletions ansible/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
LETSENCRYPT_HOST: "www.jasonernst.com,jasonernst.com"
LETSENCRYPT_EMAIL: "ernstjason1@gmail.com"

- name: Adds a crontab entry to to backup website
ansible.builtin.cron:
name: "backup www.jasonernst.com"
minute: "0"
hour: "3"
job: "rsync -av --delete /opt/goblog/prod/ home.jasonernst.com:/storage/backup/www.jasonernst.com/"

- name: Create Ombi Directories
file:
path: /etc/ombi
Expand Down

0 comments on commit 7dbb98c

Please sign in to comment.