Update README.md

This commit is contained in:
Glenn Y. Rolland 2024-07-12 13:08:55 +00:00
parent d9a2a80b5f
commit efc733d634

113
README.md
View file

@ -1,38 +1,105 @@
Role Name # Ansible Role: duplicity
=========
A brief description of the role goes here. [![CI](https://github.com/glenux/ansible-role-duplicity/workflows/CI/badge.svg?event=push)](https://github.com/glenux/ansible-role-duplicity/actions?query=workflow%3ACI)
Requirements Installs and configures Duplicity backup tool on Debian/Ubuntu servers.
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. ## Requirements
Role Variables This role requires Ansible 2.9 or higher.
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. **Python Dependencies:**
* librsync
* gettext
* python3-pip
* gnupg
Dependencies **OVHcloud:**
------------ This role is designed to work with OVHcloud Public Cloud Object Storage and Cold Archive. You'll need an active OVHcloud account and the necessary credentials.
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. ## Role Variables
Example Playbook ### Mandatory Variables:
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: * **`duplicity_hostname`**: The hostname of the server being backed up.
* **`duplicity_work_directory`**: The directory where Duplicity will store temporary files and caches.
* **`duplicity_backends`**: A list of dictionaries, each defining a backend for both hot (Object Storage) and cold (Cold Archive) storage in OVHcloud.
- hosts: servers ```yaml
duplicity_backends:
- project_domain_name: "your_project_domain_name"
tenantid: "your_tenant_id"
username: "your_username"
password: "your_password"
regionname: "GRA"
```
* **`duplicity_gpg_passphrase`**: The passphrase used to encrypt/decrypt the GPG key. Provide this variable as a file path.
* **`duplicity_gpg_key`**: The GPG secret key used for encryption. Provide this variable as a file path.
* **`duplicity_gpg_pubkey`**: The GPG public key. Provide this variable as a file path.
### Optional Variables:
* **`duplicity_enable`**: Whether to enable actual backups (defaults to `true`). Set to `false` for a dry run.
* **`duplicity_enable_dokku`**: Enable backups for Dokku applications (defaults to `true`).
* **`duplicity_enable_folders`**: Enable backups for specific folders (defaults to `false`).
* You'll need to configure the folders to back up within the role's tasks.
## Dependencies
None
## Example Playbook
```yaml
- hosts: backup_servers
vars_files:
- vars/main.yml
roles: roles:
- { role: username.rolename, x: 42 } - glenux.duplicity
```
License **Inside vars/main.yml:**
-------
BSD ```yaml
duplicity_hostname: "your_server_hostname"
duplicity_work_directory: /mnt/duplicity
duplicity_enable: true
Author Information duplicity_backends:
------------------ - project_domain_name: "your_project_domain_name"
tenantid: "your_tenant_id"
username: "your_username"
password: "your_password"
regionname: "GRA"
An optional section for the role authors to include contact information, or a website (HTML is not allowed). duplicity_gpg_passphrase: /path/to/gpg_passphrase.txt
duplicity_gpg_key: /path/to/gpg_secret.key
duplicity_gpg_pubkey: /path/to/gpg_public.key
```
## Role Usage
1. **Configure Variables:**
* Set mandatory variables in your playbook or vars file as shown in the example.
* Adjust optional variables as needed.
2. **GPG Key:**
* Create a GPG key pair for encryption.
* Provide the passphrase, secret key, and public key file paths in the variables.
3. **OVHcloud Credentials:**
* Ensure you have the correct OVHcloud credentials for object storage and cold archive.
* Update the `duplicity_backends` variable with your project details.
4. **Run the Playbook:**
* Execute the playbook to install, configure, and run Duplicity.
## License
GPL-2.0-or-later
## Author Information
This role was created by glenux.