windmill-backup/playbooks/borg-server.yaml
Paul Belanger cc7f5fae14 Rename roles from openstack to windmill
Now that opendev.org is live, we can now use the proper name for our
roles.

Change-Id: I44699d0cf7569122181ba10ad7aee76dcf253a43
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-20 15:39:37 -04:00

43 lines
1.3 KiB
YAML

# Copyright 2019 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install borg-server
hosts: borg-server:!disabled
tasks:
- name: Setup windmill.borgbackup role
include_role:
name: windmill.borgbackup
- name: Ensure /opt/backups exists
become: true
file:
path: /opt/backups
state: directory
mode: 0755
- name: Setup windmill.borgbackup role
include_role:
name: windmill.borgbackup
vars:
borgbackup_task_manager:
- pre
- config
borgbackup_user_name: "borg_{{ hostvars[borg_client].inventory_hostname_short }}"
borgbackup_user_home: "/opt/backups/borg_{{ hostvars[borg_client].inventory_hostname_short }}"
with_inventory_hostnames:
- borg-client:!disabled
loop_control:
loop_var: borg_client