Skip to content

Make local restore work with remote host down#22

Merged
raneq merged 4 commits intomasterfrom
local-restore
Jun 18, 2019
Merged

Make local restore work with remote host down#22
raneq merged 4 commits intomasterfrom
local-restore

Conversation

@raneq
Copy link
Collaborator

@raneq raneq commented Jun 17, 2019

Polish the first iteration of the local-restore.

raneq added 4 commits June 17, 2019 16:01
ansible_hostname is the host's hostname, discovered by ansible facts
inventory_hostname is the name used in inventory files, no need to be
resolvable by dns
inventory_hostname_short is the same above but truncated to the first
dot, so mysite.org becomes mysite
* Delegate to playbook the delegation to localhost: instead of doing
"delegate_to" in each task or block, it makes sense to just make sure to
execute it everything in localhost.

* Restic role needs the facts of the actual host being run, not some remote one

* Also, add an assert to ensure it,
@raneq raneq added this to the v1.1.1 milestone Jun 17, 2019
@raneq
Copy link
Collaborator Author

raneq commented Jun 17, 2019

@danypr92 can you have a look at this? You don't need to test it, it's already working.

@raneq
Copy link
Collaborator Author

raneq commented Jun 18, 2019

addresses #20 's item "all tasks must be named"

backups_role_cron_job_at: '45 3 * * *'

backups_role_restic_repo_name: "{{ ansible_hostname }}"
backups_role_restic_repo_name: "{{ inventory_hostname_short }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to name the repo as the entire inventory_hostname and not the short one because this short can generate errors if we reuse the same prefix as in odoo.coopdevs.org and odoo.facto.coop...

@raneq raneq merged commit 359bc0f into master Jun 18, 2019
@raneq raneq deleted the local-restore branch June 18, 2019 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants