-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from adfinis/postgresql_backup
feat(plugin) Setup FD for PostgreSQL backup plugin usage
- Loading branch information
Showing
23 changed files
with
477 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,8 @@ jobs: | |
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: ansible-lint | ||
uses: ansible-community/ansible-lint-action@main | ||
uses: ansible/ansible-lint@main | ||
|
||
test: | ||
needs: | ||
- lint | ||
|
@@ -44,7 +45,7 @@ jobs: | |
- image: "fedora" | ||
tag: "38" | ||
- image: "fedora" | ||
tag: "latest" | ||
tag: "39" | ||
- image: "opensuse" | ||
tag: "latest" | ||
- image: "ubuntu" | ||
|
@@ -56,12 +57,45 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
path: "${{ github.repository }}" | ||
|
||
- name: disable apparmor for mysql | ||
run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
|
||
- name: parse apparmor for mysql | ||
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
|
||
- name: molecule | ||
uses: robertdebock/[email protected] | ||
with: | ||
image: ${{ matrix.config.image }} | ||
tag: ${{ matrix.config.tag }} | ||
scenario: default | ||
|
||
test_postgresql: | ||
needs: | ||
- lint | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- image: "debian11" | ||
- image: "debian12" | ||
- image: "fedora38" | ||
# TODO 39 not yet supported by geerlingguy.postgresql | ||
# - image: "fedora39" | ||
- image: "ubuntu2204" | ||
- image: "rockylinux9" | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
path: "${{ github.repository }}" | ||
|
||
- name: molecule postgresql plugin scenario | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_command: test | ||
molecule_args: "--scenario-name postgresql" | ||
env: | ||
image: ${{ matrix.config.image }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
|
||
- name: Converge | ||
hosts: all | ||
become: true | ||
gather_facts: true | ||
|
||
roles: | ||
- role: ansible-role-bareos_fd | ||
bareos_fd_backup_configurations: true | ||
bareos_fd_install_debug_packages: true | ||
bareos_fd_encryption_enabled: true | ||
bareos_fd_encryption_private_key: | | ||
-----BEGIN PRIVATE KEY----- | ||
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALnT/+JXRTeg0fgk | ||
ef0y3tNGhN45rKoioNi40XVd7OOWzknHIf6Dz7js1c7RxPUJ4hOITZCWjBVQKzQe | ||
MeFr8PUltqxNY7W3JFz4/QlIgF4/hvi8rTFAi2djHsOdNFEk31mh+K6G6LGfchuc | ||
kCG3b86xZGDWaWafnyQicqqHOttjAgMBAAECgYAbZXPuLKuZve32xXnuqFdNkrH4 | ||
CUy5cI2CJg1LXmOUUiFrox4R5eD0BIapDSgacDCSbJ/y1x8j7UPRVTpJX56QZUD/ | ||
FByRAPc5+/nPuiltB9sSNmFx3FlTeF4N0oyglEioz3zM5ilUYkdVetj+vYnQJKkt | ||
LGysJ46ZO7pBdmjsgQJBAO7e3Dj8umZfS9EC3Xr/ykxFKSSSUenFg6qNu1lADCUo | ||
S9iJu5BY0R81ab7uWdgBPUHtW1vp/WhpnfoPMs80dOECQQDHJ2WJyXZtHSqBzXRZ | ||
J/+Ki0E4uuYuJn9CCb2w5Fegq1BW+6FU0759s3RJCEbFt3B2Xy4G+y7QOjglb0DN | ||
bFTDAkBQxshN9RjLmZo32fIvr+QnGpQpK9nLZeF6gWdDbScuQYw0c48b5w0Asr1J | ||
taxoITMn4i4szNnGv0CO2SjjbOfBAkAQEO6REg6auNqgBBoZwy9LVvaZBALjwDlN | ||
84k5BwLGtGtTyRL3y+k3LM35wlArTSQmeIE3EPZy1++FnZcFu3KPAkEAtIZOonLt | ||
EtRs4axJi3vnPnPCje92Usdd3QOCCJHt4zA5GITp866aiO0bW5lLc7ZzUNEUk3jt | ||
ICo3CGGSXV7yiA== | ||
-----END PRIVATE KEY----- | ||
bareos_fd_encryption_master_public_key: | | ||
-----BEGIN CERTIFICATE----- | ||
MIICSjCCAbOgAwIBAgIUd8WfhMKbB1MSc47VEsokPgViZKIwDQYJKoZIhvcNAQEL | ||
BQAwNzELMAkGA1UEBhMCQ0gxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoM | ||
CkFkZmluaXMgQUcwHhcNMjQwNTEzMTIwMDMwWhcNMjQwNjEyMTIwMDMwWjA3MQsw | ||
CQYDVQQGEwJDSDETMBEGA1UECAwKU29tZS1TdGF0ZTETMBEGA1UECgwKQWRmaW5p | ||
cyBBRzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAudP/4ldFN6DR+CR5/TLe | ||
00aE3jmsqiKg2LjRdV3s45bOScch/oPPuOzVztHE9QniE4hNkJaMFVArNB4x4Wvw | ||
9SW2rE1jtbckXPj9CUiAXj+G+LytMUCLZ2Mew500USTfWaH4robosZ9yG5yQIbdv | ||
zrFkYNZpZp+fJCJyqoc622MCAwEAAaNTMFEwHQYDVR0OBBYEFK/HMqCU8j2Dqj0R | ||
/c2Xrl/MGaq8MB8GA1UdIwQYMBaAFK/HMqCU8j2Dqj0R/c2Xrl/MGaq8MA8GA1Ud | ||
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAUO7icu1fG+mXUfJoMEpdhGCr | ||
Zn0Ll4hplw9eANrGYnbC2FIWdh7tj23dFhm/kb0YRqI2arpPyYYagmu7eK89/22g | ||
wyrW5xc17ivohUS+sN8lPqrKcXrRBveQ0FnvUbkjEmtmgHSYgjdCxoGMIcqpn8BC | ||
m/1hu95J5z6/IZEm7oM= | ||
-----END CERTIFICATE----- | ||
bareos_fd_directors: | ||
- name: "bareos-dir" | ||
password: "secretpassword" | ||
monitor: false | ||
connection_from_client_to_director: true | ||
connection_from_director_to_client: false | ||
tls_enable: true | ||
tls_verify_peer: false | ||
- name: "disabled-director" | ||
enabled: false | ||
bareos_fd_messages: | ||
- name: "Standard" | ||
director: | ||
server: bareos-dir | ||
messages: | ||
- all | ||
- "!skipped" | ||
- "!restored" | ||
description: "Send relevant messages to the Director." | ||
append: | ||
file: "/var/log/bareos/bareos.log" | ||
messages: | ||
- all | ||
- "!skipped" | ||
- "!terminate" | ||
console: | ||
- all | ||
- "!skipped" | ||
- "!saved" | ||
- name: "disabled-message" | ||
enabled: false | ||
bareos_fd_plugins: | ||
- postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
|
||
dependency: | ||
name: galaxy | ||
options: | ||
role-file: molecule/postgresql/requirements.yml | ||
requirements-file: molecule/postgresql/requirements.yml | ||
lint: | | ||
set -e | ||
yamllint . | ||
ansible-lint | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: "bareosfd-${image:-fedora38}${TOX_ENVNAME}" | ||
image: "geerlingguy/docker-${image:-fedora38}-ansible:latest" | ||
command: /sbin/init | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: yes | ||
pre_build_image: yes | ||
systemd: true | ||
provisioner: | ||
name: ansible | ||
verifier: | ||
name: ansible |
Oops, something went wrong.