diff --git a/.github/workflows/collection.yml b/.github/workflows/collection.yml index cb87cde..c5863ca 100644 --- a/.github/workflows/collection.yml +++ b/.github/workflows/collection.yml @@ -1,16 +1,28 @@ --- -name: Build and Deploy Collection - +name: Build and deploy Collection on Ansible Galaxy on: push: - + branches: + - main + tags: + - 'v*' jobs: deploy: - runs-on: "Ubuntu-20.04" + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Deploy Ansible Galaxy Collection - uses: artis3n/ansible_galaxy_collection@v2.9.0 + + - name: Checkout repository and submodules + uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: Set version in galaxy.yml + run: | + VERSION=${GITHUB_REF#refs/tags/v} + sed -re "s/^version:.*$/version: ${VERSION}/" -i galaxy.yml + + - name: Upload collection to Ansible Galaxy + uses: ansible/ansible-publish-action@v1.0.0 with: - api_key: '${{ secrets.GALAXY_API_KEY }}' + api_key: ${{ secrets.GALAXY_API_KEY }} diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml new file mode 100644 index 0000000..2f229ed --- /dev/null +++ b/.github/workflows/semantic-release.yml @@ -0,0 +1,27 @@ +--- + +# runs on each push to main and is responsible for creating new tags/releases +name: Create Semantic Release + +on: + push: + branches: + - main + +jobs: + semantic-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run go-semantic-release + id: semrel + uses: go-semantic-release/action@v1.23 + with: + allow-initial-development-versions: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7153802 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,18 @@ +[submodule "roles/bareos_repository"] + path = roles/bareos_repository + url = https://github.com/adfinis/ansible-role-bareos_repository +[submodule "roles/bareos_webui"] + path = roles/bareos_webui + url = https://github.com/adfinis/ansible-role-bareos_webui +[submodule "roles/bareos_dir"] + path = roles/bareos_dir + url = https://github.com/adfinis/ansible-role-bareos_dir +[submodule "roles/bareos_sd"] + path = roles/bareos_sd + url = https://github.com/adfinis/ansible-role-bareos_sd +[submodule "roles/bareos_fd"] + path = roles/bareos_fd + url = https://github.com/adfinis/ansible-role-bareos_fd +[submodule "roles/bareos_console"] + path = roles/bareos_console + url = https://github.com/adfinis/ansible-role-bareos_console diff --git a/README.md b/README.md index 129f3e7..43a616f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ collections: ## Using playbooks in this collection The collection includes multiple playbooks to use with the individual roles. Playbooks from collections can be called by their FQCN directly. +The playbooks aid to minimize the amount of necessary configuration and try to declare as much as possible in the form of defaults. In most scenarios stuff like client settings, backup file sets/excludes, retention are universally applicable for all (or most) clients. +Therefore the playbooks rely heavly on group_vars, as a lot of data has to be shared between the Bareos components. +For example: For every client/FD there needs to be some shared config data on both the Director (`/etc/bareos/bareos-dir.d/clients/`) and the FD (`/etc/bareos/bareos-fd.d/`) so a connection between them is possible. The playbooks try to ease the management of lots of backup clients and jobs, by adding default values that are applied for all hosts. These defaults can be applied in the from of group vars (`group_vars/all/defaults.yml`): @@ -51,7 +54,7 @@ job_defaults: messages: Messages jobdefs: JobDef_StandardIncremental schedule: Daily2300_Incremental - storage: "{{ bareos_storagedaemon }}" + storage: "Storage_bareosStorageDaemon.example.com" # list has to be defined here, to be able to add clients later bareos_dir_clients: [] @@ -117,4 +120,3 @@ Playbook fetches the individual Filedaemon encryption keys, so that they can be ``` bash ansible-playbook adfinis.bareos.fetch_encryption_keys -i inventory --check ``` - diff --git a/UPDATING.md b/UPDATING.md index 193bfb9..df3c8d7 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -1,17 +1,5 @@ # Updating the roles -1. Delete the roles: - -```shell -rm -Rf roles/* -``` - -2. Copy the roles in: - -```shell -./UPDATING.sh -``` - -3. Update galaxy.yml - -Bump version. +Roles in collection are managed as [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules). +* Changes can be fetched with `git fetch`. +* To pull changes for specific role, run: `git submodule update --remote ` (Example: `git submodule update --remote roles/bareos_repository`). diff --git a/UPDATING.sh b/UPDATING.sh deleted file mode 100755 index 4941e03..0000000 --- a/UPDATING.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Copy all roles. -for role in ../ansible-role-bareos_* ; do - short=$(echo ${role} | cut -d\- -f3) - if [ ! -d roles/${short} ] ; then - mkdir "roles/${short}" - echo "Copying ${role} to roles/${short}." - for object in LICENSE README.md defaults files handlers meta requirements.yml tasks templates vars ; do - if [ -d "${role}/${object}" ] ; then - cp -Rip "${role}/${object}" "roles/${short}/${object}" - elif [ -f "${role}/${object}" ] ; then - cp "${role}/${object}" "roles/${short}/${object}" - fi - done - fi -done - -# Use proper role FQCNs in README example playbooks -sed -i '' 's|- role: adfinis\.|- role: adfinis.roles.|' roles/*/README.md - -# Use proper role FQCNs in role `dependencies:` -sed -i '' 's|- adfinis\.|- adfinis.roles.|' roles/*/meta/main.yml - -# Regenerate all used collections. -echo "---" > requirements.yml -echo "collections:" >> requirements.yml -cat roles/*/requirements.yml | grep ' - name: ' | grep -v adfinis | sort | uniq >> requirements.yml diff --git a/galaxy.yml b/galaxy.yml index dccf563..7ae7fc4 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: adfinis name: bareos -version: 1.0.0 +version: 1.0.5 readme: README.md authors: - Adfinis diff --git a/playbooks/fetch_client_encryption_keys_playbook.yml b/playbooks/fetch_client_encryption_keys_playbook.yml new file mode 100644 index 0000000..b065084 --- /dev/null +++ b/playbooks/fetch_client_encryption_keys_playbook.yml @@ -0,0 +1,17 @@ +--- + +- name: Fetch encryption key-pair string from filedaemons + hosts: filedaemons + gather_facts: false + become: true + tasks: + - name: Fetch key-pair from filedaemons + ansible.builtin.slurp: + src: "/etc/bareos/{{ inventory_hostname }}.pem" + register: _keypair + tags: fetch_keys + + - name: Print key-pair string + ansible.builtin.debug: + msg: "{{ _keypair['content'] | b64decode }}" + tags: fetch_keys diff --git a/playbooks/manage_clients_playbook.yml b/playbooks/manage_clients_playbook.yml new file mode 100644 index 0000000..5bc3759 --- /dev/null +++ b/playbooks/manage_clients_playbook.yml @@ -0,0 +1,93 @@ +--- + +- name: Gather facts from all hosts + hosts: all + become: true + gather_facts: true + tags: always + +- name: Setup clients from host_group filedaemons + hosts: filedaemons + become: true + pre_tasks: + - name: Fetch facts from director + ansible.builtin.setup: + delegate_to: "{{ item }}" + delegate_facts: true + run_once: true + loop: "{{ groups['directors'] }}" + tags: + - manage_clients + - manage_clients::setup + roles: + - role: robertdebock.bootstrap # prepare host for ansible runs + tags: + - manage_clients + - manage_clients::setup + - role: bareos_repository + tags: + - manage_clients + - manage_clients::setup + - role: bareos_fd + tags: + - manage_clients + - manage_clients::setup + +- name: Deploy Filedaemons on Director with the bareos_dir role + hosts: directors + become: true + vars: + _fd_list: [] + pre_tasks: + - name: Gather Ansible facts for all Filedaemons + ansible.builtin.setup: + delegate_to: "{{ item }}" + delegate_facts: true + loop: "{{ groups['filedaemons'] }}" + tags: + - manage_clients + - manage_clients::deployment + + - name: Create list of Filedaemons to deploy on Director + ansible.builtin.set_fact: + _fd_list: >- + {{ _fd_list + [{ + 'name': item, + 'address': client_defaults.address, + 'password': client_defaults.password, + 'maximum_concurrent_jobs': client_defaults.maximum_concurrent_jobs, + 'connection_from_director_to_client': client_defaults.connection_from_dir, + 'connection_from_client_to_director': client_defaults.connection_from_fd, + 'heartbeat': client_defaults.heartbeat, + 'enabled': client_defaults.enabled}] + }} + loop: "{{ groups['filedaemons'] }}" + tags: + - manage_clients + - manage_clients::deployment + when: + - hostvars[item].bareos_fd_configuration is undefined # let's you set exceptions on host_vars level + + - name: Add Filedaemons to list which have separate host_vars defined + ansible.builtin.set_fact: + _fd_list: >- + {{ _fd_list + [ hostvars[item].bareos_fd_configuration ] }} + loop: "{{ groups['filedaemons'] }}" + tags: + - manage_clients + - manage_clients::deployment + when: + - hostvars[item].bareos_fd_configuration is defined # use host_vars instead and add host to client list + + - name: Register client list + ansible.builtin.set_fact: + bareos_dir_clients: "{{ _fd_list }}" # var is used in bareos_dir role + tags: + - manage_clients + - manage_clients::deployment + + roles: + - role: bareos_dir + tags: + - manage_clients + - manage_clients::deployment diff --git a/playbooks/manage_jobs_playbook.yml b/playbooks/manage_jobs_playbook.yml new file mode 100644 index 0000000..fcb8d44 --- /dev/null +++ b/playbooks/manage_jobs_playbook.yml @@ -0,0 +1,49 @@ +--- + +- name: Gather facts from all hosts + hosts: all + become: true + gather_facts: true + tags: always + +- name: Create jobs on Director for every client in host_group filedaemons + hosts: directors + become: true + vars: + _job_list: [] + pre_tasks: + - name: Create job list for all FDs with defined standard values (group_vars) + ansible.builtin.set_fact: + _job_list: >- + {{ _job_list + [{ + 'name': item+'_'+job_defaults.name, + 'client': item, + 'pool': job_defaults.pool, + 'type': job_defaults.type, + 'messages': job_defaults.messages, + 'jobdefs': job_defaults.jobdefs, + 'storage': job_defaults.storage, + 'schedule': job_defaults.schedule}] + }} + loop: "{{ groups['filedaemons'] }}" + tags: manage_jobs + when: # if job(s) are defined in host_vars, standards will be skipped + - hostvars[item].bareos_fd_jobs is undefined + + - name: Add dedicated jobs defined in host_vars + ansible.builtin.set_fact: + _job_list: >- + {{ _job_list + hostvars[item].bareos_fd_jobs }} + loop: "{{ groups['filedaemons'] }}" + tags: manage_jobs + when: + - hostvars[item].bareos_fd_jobs is defined # use job(s) from host_vars instead + + - name: Register job list + ansible.builtin.set_fact: + bareos_dir_jobs: "{{ _job_list }}" + tags: manage_jobs + + roles: + - role: bareos_dir + tags: manage_jobs diff --git a/requirements.yml b/requirements.yml index 63e42e6..702212f 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,4 +1,5 @@ --- + collections: - name: ansible.posix - name: community.crypto diff --git a/roles/bareos_console b/roles/bareos_console new file mode 160000 index 0000000..82160a9 --- /dev/null +++ b/roles/bareos_console @@ -0,0 +1 @@ +Subproject commit 82160a9bff37c624471422b03c4f631d40477038 diff --git a/roles/bareos_console/LICENSE b/roles/bareos_console/LICENSE deleted file mode 100644 index 454a191..0000000 --- a/roles/bareos_console/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Adfinis Copyright (C) 2023 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/roles/bareos_console/README.md b/roles/bareos_console/README.md deleted file mode 100644 index 09331fa..0000000 --- a/roles/bareos_console/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# Ansible role [bareos_console](#bareos_console) - -Install and configure [Bareos](https://www.bareos.com/) Console (bconsole) on your system. - -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/adfinis/ansible-role-bareos_console/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_console/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_console/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_console)|[![downloads](https://img.shields.io/ansible/role/d/)](https://galaxy.ansible.com/adfinis/bareos_console)|[![Version](https://img.shields.io/github/release/adfinis/ansible-role-bareos_console.svg)](https://github.com/adfinis/ansible-role-bareos_console/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from [`molecule/default/converge.yml`](https://github.com/adfinis/ansible-role-bareos_console/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. - -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - role: adfinis.roles.bareos_console - bareos_console_directors: - - name: bareos-dir - address: localhost - password: "MySuperSecretPassword" - description: "Bareos Console credentials for local Director" - tls_enable: yes - tls_verify_peer: no -``` - -The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/adfinis/ansible-role-bareos_console/blob/master/molecule/default/prepare.yml): - -```yaml ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - role: robertdebock.bootstrap - - role: adfinis.roles.bareos_repository -``` - -These roles are provided as is, without warranty of any kind. Use it at your own risk. - -## [Role Variables](#role-variables) - -The default values for the variables are set in [`defaults/main.yml`](https://github.com/adfinis/ansible-role-bareos_console/blob/master/defaults/main.yml): - -```yaml ---- -# defaults file for bareos_console - -bareos_console_directors: [] -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/adfinis/ansible-role-bareos_console/blob/master/requirements.txt). - -## [State of used roles](#state-of-used-roles) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/adfinis/robertdebock.bootstrap)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap)| -|[adfinis.bareos_repository](https://galaxy.ansible.com/adfinis/bareos_repository)|[![Build Status GitHub](https://github.com/adfinis/ansible-role-bareos_repository/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_repository/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://adfinis.com/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/adfinis/ansible-role-bareos_console/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|bookworm, bullseye, buster| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|7, 8, 9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|37, 38| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal| - -The minimum version of Ansible required is 2.12, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -If you find issues, please register them in [GitHub](https://github.com/adfinis/ansible-role-bareos_console/issues). - -## [License](#license) - -[Apache-2.0](https://github.com/adfinis/ansible-role-bareos_console/blob/master/LICENSE). - -## [Author Information](#author-information) - -[Adfinis](https://adfinis.com/) - diff --git a/roles/bareos_console/defaults/main.yml b/roles/bareos_console/defaults/main.yml deleted file mode 100644 index fc4bcaf..0000000 --- a/roles/bareos_console/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# defaults file for bareos_console - -bareos_console_directors: [] diff --git a/roles/bareos_console/meta/argument_specs.yml b/roles/bareos_console/meta/argument_specs.yml deleted file mode 100644 index 30f78a9..0000000 --- a/roles/bareos_console/meta/argument_specs.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -# # bareos_dir_messages: Daemon - -argument_specs: - main: - short_description: "Install and configure BareOS Console (bconsole) on your system." - description: > - Install and configure BareOS Console (bconsole) on your system. - author: Adfinis - options: - bareos_console_directors: - type: "list" - description: "A list of directors to connect to." diff --git a/roles/bareos_console/meta/main.yml b/roles/bareos_console/meta/main.yml deleted file mode 100644 index e5df543..0000000 --- a/roles/bareos_console/meta/main.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -galaxy_info: - author: adfinis - role_name: bareos_console - description: Install and configure [Bareos](https://www.bareos.com/) Console (bconsole) on your system. - license: Apache-2.0 - company: none - min_ansible_version: "2.12" - - platforms: - - name: Debian - versions: - - bookworm - - bullseye - - buster - - name: EL - versions: - - "7" - - "8" - - "9" - - name: Fedora - versions: - - "37" - - "38" - - name: opensuse - versions: - - all - - name: Ubuntu - versions: - - jammy - - focal - - galaxy_tags: - - backup - - bareos - - infrastructure - - linux - - storage - - system - - tools - -dependencies: [] diff --git a/roles/bareos_console/requirements.yml b/roles/bareos_console/requirements.yml deleted file mode 100644 index bcfbda7..0000000 --- a/roles/bareos_console/requirements.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -roles: - - name: robertdebock.bootstrap - - name: adfinis.bareos_repository diff --git a/roles/bareos_console/tasks/assert.yml b/roles/bareos_console/tasks/assert.yml deleted file mode 100644 index 30c8b5a..0000000 --- a/roles/bareos_console/tasks/assert.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- - -- name: assert | Test bareos_console_directors - ansible.builtin.assert: - that: - - bareos_console_directors is iterable - quiet: yes - when: - - bareos_console_directors is defined - -- name: assert | Test items in bareos_console_directors are set correctly - ansible.builtin.assert: - that: - - item.name is defined - - item.name is string - - item.name != "" - - item.address is defined - - item.address is string - - item.address != "" - - item.password is defined - - item.password is string - - item.password != "" - - item.description is defined - - item.description is string - - item.description != "" - quiet: yes - loop: "{{ bareos_console_directors }}" - loop_control: - label: "{{ item.name }}" - when: - - bareos_console_directors is defined - -- name: assert | Test item tls_enable in bareos_console_directors - ansible.builtin.assert: - that: - - item.tls_enable is boolean - quiet: yes - loop: "{{ bareos_console_directors }}" - loop_control: - label: "{{ item.name }}" - when: - - item.tls_enable is defined - -- name: assert | Test item tls_verify_peer in bareos_console_directors - ansible.builtin.assert: - that: - - item.tls_verify_peer is boolean - quiet: yes - loop: "{{ bareos_console_directors }}" - loop_control: - label: "{{ item.name }}" - when: - - item.tls_verify_peer is defined diff --git a/roles/bareos_console/tasks/main.yml b/roles/bareos_console/tasks/main.yml deleted file mode 100644 index 3e84827..0000000 --- a/roles/bareos_console/tasks/main.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# tasks file for bareos_console - -- name: Import assert.yml - ansible.builtin.import_tasks: - file: assert.yml - run_once: yes - delegate_to: localhost - -- name: Install bareos-console - ansible.builtin.package: - name: bareos-bconsole - state: present - -- name: Place bconsole.conf - ansible.builtin.template: - src: bconsole.conf.j2 - dest: /etc/bareos/bconsole.conf - owner: root - group: bareos - mode: "0640" - validate: /usr/sbin/bconsole --test-config --config %s - when: - - bareos_console_directors is defined diff --git a/roles/bareos_console/templates/.gitkeep b/roles/bareos_console/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/roles/bareos_console/templates/bconsole.conf.j2 b/roles/bareos_console/templates/bconsole.conf.j2 deleted file mode 100644 index 3a3c77d..0000000 --- a/roles/bareos_console/templates/bconsole.conf.j2 +++ /dev/null @@ -1,24 +0,0 @@ -{{ ansible_managed | comment }} - -{% if bareos_console_directors is defined %} -{% for director in bareos_console_directors %} -Director { - Name = "{{ director.name }}" -{% if director.description is defined %} - Description = "{{ director.description }}" -{% endif %} -{% if director.address is defined %} - Address = "{{ director.address }}" -{% endif %} -{% if director.password is defined %} - Password = "[md5]{{ director.password | md5 }}" -{% endif %} -{% if director.tls_enable is defined %} - TLS Enable = {{ director.tls_enable | ternary('Yes', 'No') }} -{% endif %} -{% if director.tls_verify_peer is defined %} - TLS Verify Peer = {{ director.tls_verify_peer | ternary('Yes', 'No') }} -{% endif %} -} -{% endfor %} -{% endif %} diff --git a/roles/bareos_dir b/roles/bareos_dir new file mode 160000 index 0000000..ad09b38 --- /dev/null +++ b/roles/bareos_dir @@ -0,0 +1 @@ +Subproject commit ad09b38c7c83e01220e05aad0b653d49b4dd807c diff --git a/roles/bareos_dir/LICENSE b/roles/bareos_dir/LICENSE deleted file mode 100644 index 454a191..0000000 --- a/roles/bareos_dir/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Adfinis Copyright (C) 2023 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/roles/bareos_dir/README.md b/roles/bareos_dir/README.md deleted file mode 100644 index acd9407..0000000 --- a/roles/bareos_dir/README.md +++ /dev/null @@ -1,389 +0,0 @@ -# Ansible role [bareos_dir](#bareos_dir) - -Install and configure [Bareos](https://www.bareos.com/) Director. - -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/adfinis/ansible-role-bareos_dir/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_dir/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_dir/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_dir)|[![downloads](https://img.shields.io/ansible/role/d/)](https://galaxy.ansible.com/adfinis/bareos_dir)|[![Version](https://img.shields.io/github/release/adfinis/ansible-role-bareos_dir.svg)](https://github.com/adfinis/ansible-role-bareos_dir/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from [`molecule/default/converge.yml`](https://github.com/adfinis/ansible-role-bareos_dir/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. - -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - role: adfinis.roles.bareos_dir - bareos_dir_backup_configurations: yes - bareos_dir_install_debug_packages: yes - bareos_dir_catalogs: - - name: MyCatalog - dbname: bareos - dbuser: bareos - dbpassword: "" - bareos_dir_consoles: - - name: bareos-mon - description: "Restricted console used by tray-monitor to get the status of the director." - password: "MySecretPassword" - commandacl: - - status - - .status - jobacl: - - "*all" - bareos_dir_clients: - - name: bareos-fd - address: 127.0.0.1 - password: "MySecretPassword" - maximum_concurrent_jobs: 3 - - name: "disabled-client" - enabled: no - bareos_dir_filesets: - - name: LinuxAll - description: "Backup all regular filesystems, determined by filesystem type." - include: - files: - - / - exclude_dirs_containing: nobackup - options: - signature: MD5 - one_fs: no - fs_types: - - btrfs - - ext2 - - ext3 - - ext4 - - reiserfs - - jfs - - vfat - - xfs - - zfs - compression: GZIP - exclude: - files: - - /var/lib/bareos - - /var/lib/bareos/storage - - /proc - - /tmp - - /var/tmp - - /.journal - - /.fsck - - name: disabled-fileset - enabled: no - bareos_dir_jobdefs: - - name: DefaultJob-1 - type: Backup - level: Incremental - fileset: SelfTest - schedule: WeeklyCycle - storage: File-1 - messages: Standard - pool: Full - priority: 10 - write_bootstrap: "/var/lib/bareos/%c.bsr" - full_backup_pool: Full - differential_backup_pool: Differential - incremental_backup_pool: Incremental - - name: "disabled-jobdef" - enabled: no - bareos_dir_jobs: - - name: my_job - description: "My backup job" - pool: Full - type: Backup - client: bareos-fd - fileset: LinuxAll - storage: File-1 - messages: Standard - - name: disabled_job - enabled: no - - name: BackupCatalog - description: "Backup the catalog database (after the nightly save)" - jobdefs: DefaultJob - level: Full - fileset: Catalog - client: bareos-fd - schedule: WeeklyCycleAfterBackup - runbeforejob: "/usr/lib/bareos/scripts/make_catalog_backup MyCatalog" - runafterjob: "/usr/lib/bareos/scripts/delete_catalog_backup MyCatalog" - write_bootstrap: '|/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root' - priority: 11 - maximum_concurrent_jobs: 2 - bareos_dir_messages: - - name: "Standard" - description: "Send relevant messages to the Director." - append: - - file: "/var/log/bareos/bareos.log" - messages: - - all - - "!skipped" - - "!terminate" - catalog: - - all - - "!skipped" - - "!saved" - - "!audit" - console: - - all - - "!skipped" - - "!saved" - - name: "disabled-message" - enabled: no - - name: Daemon - description: "Message delivery for daemon messages (no job)." - mailcommand: '/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r' - mail: - - to: root - messages: - - all - - "!skipped" - - "!audit" - console: - - all - - "!skipped" - - "!saved" - - "!audit" - append: - - file: "/var/log/bareos/bareos.log" - messages: - - all - - "!skipped" - - "!audit" - - file: "/var/log/bareos/bareos-audit.log" - messages: - - audit - - name: RestoreFiles - description: "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..." - type: Restore - client: bareos-fd - fileset: LinuxAll - storage: File-1 - pool: Incremental - messages: Standard - where: "/tmp/bareos-restores" - bareos_dir_pools: - - name: Full - pool_type: Backup - recycle: yes - autoprune: yes - volume_retention: 365 days - maximum_volume_bytes: 50G - maximum_volumes: 100 - label_format: "Full-" - - name: "disabled-pool" - enabled: no - bareos_dir_profiles: - - name: webui-admin - jobacl: - - "*all*" - clientacl: - - "*all*" - storageacl: - - "*all*" - scheduleacl: - - "*all*" - poolacl: - - "*all*" - commandacl: - - "!.bvfs_clear_cache" - - "!.exit" - - "!.sql" - - "!configure" - - "!create" - - "!delete" - - "!purge" - - "!prune" - - "!sqlquery" - - "!umount" - - "!unmount" - - "*all*" - filesetacl: - - "*all*" - catalogacl: - - "*all*" - whereacl: - - "*all*" - pluginoptionsacl: - - "*all*" - - name: "disabled-message" - enabled: no - bareos_dir_schedules: - - name: WeeklyCycle - run: - - Full 1st sat at 21:00 - - Differential 2nd-5th sat at 21:00 - - Incremental mon-fri at 21:00 - - name: WeeklyCycleAfterBackup - description: This schedule does the catalog. It starts after the WeeklyCycle. - run: - - Full mon-fri at 21:10 - - name: "disabled-schedule" - enabled: no - bareos_dir_storages: - - name: File-1 - address: dir-1 - password: "MySecretPassword" - device: FileStorage - media_type: File - tls_enable: yes - tls_verify_peer: no - maximum_concurrent_jobs: 3 - - name: "disabled-storage" - enabled: no -``` - -The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/adfinis/ansible-role-bareos_dir/blob/master/molecule/default/prepare.yml): - -```yaml ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - role: robertdebock.bootstrap - # The roles buildtools, python_pip and postgres are required. - # bareos-dir needs to connect to a database. - - role: robertdebock.buildtools - # EPEL is required for RHEL7. - - role: robertdebock.epel - - role: robertdebock.python_pip - - role: robertdebock.postgres - # The roles core_dependencies and postfix are required for the `bareos_role`: "dir". - # bareos-dir needs to send emails. - # - role: robertdebock.core_dependencies - # - role: robertdebock.postfix - - role: adfinis.roles.bareos_repository - bareos_repository_enable_tracebacks: yes -``` - -These roles are provided as is, without warranty of any kind. Use it at your own risk. - -## [Role Variables](#role-variables) - -The default values for the variables are set in [`defaults/main.yml`](https://github.com/adfinis/ansible-role-bareos_dir/blob/master/defaults/main.yml): - -```yaml ---- -# defaults file for bareos_dir - -# The director has these configuration parameters. - -# Backup the configuration files. -bareos_dir_backup_configurations: no - -# Install debug packages. This requires the debug repositories to be enabled. -bareos_dir_install_debug_packages: no - -# The hostname of the Director. -bareos_dir_hostname: "{{ inventory_hostname }}" - -# The password for the Director. -bareos_dir_password: "secretpassword" - -# The query file. -bareos_dir_queryfile: "/usr/lib/bareos/scripts/query.sql" - -# The maximum number of concurrent jobs. -bareos_dir_max_concurrent_jobs: 100 - -# The messages configuration to use. -bareos_dir_message: Daemon - -# Enable TLS. -bareos_dir_tls_enable: yes - -# Verify the peer. -bareos_dir_tls_verify_peer: no - -# A list of catalogs to configure. -bareos_dir_catalogs: [] - -# A list of consoled to configure. -bareos_dir_consoles: [] - -# A list of clients to configure. -bareos_dir_clients: [] - -# A list of filesets to configure. -bareos_dir_filesets: [] - -# A list of jobdefs to configure -bareos_dir_jobdefs: [] - -# A list of jobs to configure. -bareos_dir_jobs: [] - -# A list of messages to configure. -bareos_dir_messages: [] - -# A list of pools to configure. -bareos_dir_pools: [] - -# A list of profiles to configure. -bareos_dir_profiles: [] - -# A list of schedules to configure. -bareos_dir_schedules: [] - -# A list of storages to configure. -bareos_dir_storages: [] -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/adfinis/ansible-role-bareos_dir/blob/master/requirements.txt). - -## [State of used roles](#state-of-used-roles) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/adfinis/robertdebock.bootstrap)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap)| -|[adfinis.bareos_repository](https://galaxy.ansible.com/adfinis/bareos_repository)|[![Build Status GitHub](https://github.com/adfinis/ansible-role-bareos_repository/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_repository/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository)| -|[robertdebock.buildtools](https://galaxy.ansible.com/adfinis/robertdebock.buildtools)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.buildtools/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.buildtools)| -|[robertdebock.epel](https://galaxy.ansible.com/adfinis/robertdebock.epel)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.epel/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.epel/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.epel)| -|[robertdebock.python_pip](https://galaxy.ansible.com/adfinis/robertdebock.python_pip)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.python_pip/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.python_pip/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.python_pip)| -|[robertdebock.postgres](https://galaxy.ansible.com/adfinis/robertdebock.postgres)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.postgres/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.postgres/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.postgres/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.postgres)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://adfinis.com/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/adfinis/ansible-role-bareos_dir/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|bookworm, bullseye, buster| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|7, 8, 9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|37, 38| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal| - -The minimum version of Ansible required is 2.12, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -If you find issues, please register them in [GitHub](https://github.com/adfinis/ansible-role-bareos_dir/issues). - -## [License](#license) - -[Apache-2.0](https://github.com/adfinis/ansible-role-bareos_dir/blob/master/LICENSE). - -## [Author Information](#author-information) - -[Adfinis](https://adfinis.com/) - diff --git a/roles/bareos_dir/defaults/main.yml b/roles/bareos_dir/defaults/main.yml deleted file mode 100644 index d5c21ac..0000000 --- a/roles/bareos_dir/defaults/main.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -# defaults file for bareos_dir - -# The director has these configuration parameters. - -# Backup the configuration files. -bareos_dir_backup_configurations: no - -# Install debug packages. This requires the debug repositories to be enabled. -bareos_dir_install_debug_packages: no - -# The hostname of the Director. -bareos_dir_hostname: "{{ inventory_hostname }}" - -# The password for the Director. -bareos_dir_password: "secretpassword" - -# The query file. -bareos_dir_queryfile: "/usr/lib/bareos/scripts/query.sql" - -# The maximum number of concurrent jobs. -bareos_dir_max_concurrent_jobs: 100 - -# The messages configuration to use. -bareos_dir_message: Daemon - -# Enable TLS. -bareos_dir_tls_enable: yes - -# Verify the peer. -bareos_dir_tls_verify_peer: no - -# A list of catalogs to configure. -bareos_dir_catalogs: [] - -# A list of consoled to configure. -bareos_dir_consoles: [] - -# A list of clients to configure. -bareos_dir_clients: [] - -# A list of filesets to configure. -bareos_dir_filesets: [] - -# A list of jobdefs to configure -bareos_dir_jobdefs: [] - -# A list of jobs to configure. -bareos_dir_jobs: [] - -# A list of messages to configure. -bareos_dir_messages: [] - -# A list of pools to configure. -bareos_dir_pools: [] - -# A list of profiles to configure. -bareos_dir_profiles: [] - -# A list of schedules to configure. -bareos_dir_schedules: [] - -# A list of storages to configure. -bareos_dir_storages: [] diff --git a/roles/bareos_dir/handlers/main.yml b/roles/bareos_dir/handlers/main.yml deleted file mode 100644 index 5dabb70..0000000 --- a/roles/bareos_dir/handlers/main.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# handlers file for bareos_dir - -- name: Write results of database setup to file - ansible.builtin.copy: - content: "{{ item.stdout }}" - dest: "/var/log/bareos/{{ item.cmd[0] | basename }}.log" - mode: "0640" - loop: "{{ bareos_setup_database.results }}" - loop_control: - label: "{{ item.cmd[0] | basename | default('Command was skipped') }}" - when: - - item.stdout is defined - -- name: Check configuration - ansible.builtin.command: "bareos-dir --test-config" - changed_when: false - become_user: bareos - -- name: Reload bareos-dir - ansible.builtin.service: - name: bareos-dir - state: reloaded diff --git a/roles/bareos_dir/meta/argument_specs.yml b/roles/bareos_dir/meta/argument_specs.yml deleted file mode 100644 index 7e63205..0000000 --- a/roles/bareos_dir/meta/argument_specs.yml +++ /dev/null @@ -1,89 +0,0 @@ ---- - -argument_specs: - main: - short_description: "Install and configure BareOS Director on your system." - description: > - Install and configure BareOS Director on your system. - author: Adfinis - options: - bareos_dir_backup_configurations: - type: "bool" - default: no - description: "Backup the configuration files." - bareos_dir_hostname: - type: "str" - default: "{{ inventory_hostname }}" - description: "The hostname of the Director." - bareos_dir_password: - type: "str" - default: "secretpassword" - description: "The password for the Director." - bareos_dir_queryfile: - type: "str" - default: "/usr/lib/bareos/scripts/query.sql" - description: "The query file." - bareos_dir_max_concurrent_jobs: - type: "int" - default: 10 - description: "The maximum number of concurrent jobs." - bareos_dir_message: - type: "str" - default: "Daemon" - description: "The messages configuration to use." - bareos_dir_tls_enable: - type: "bool" - default: yes - description: "Enable TLS." - bareos_dir_tls_verify_peer: - type: "bool" - default: no - description: "Verify the peer." - bareos_dir_catalogs: - type: "list" - default: [] - description: "A list of catalogs to configure." - bareos_dir_consoles: - type: "list" - default: [] - description: "A list of consoled to configure." - bareos_dir_clients: - type: "list" - default: [] - description: "A list of clients to configure." - bareos_dir_filesets: - type: "list" - default: [] - description: "A list of filesets to configure." - bareos_dir_jobdefs: - type: "list" - default: [] - description: "A list of jobdefs to configure." - bareos_dir_jobs: - type: "list" - default: [] - description: "A list of jobs to configure." - bareos_dir_messages: - type: "list" - default: [] - description: "A list of messages to configure." - bareos_dir_pools: - type: "list" - default: [] - description: "A list of pools to configure." - bareos_dir_profiles: - type: "list" - default: [] - description: "A list of profiles to configure." - bareos_dir_schedules: - type: "list" - default: [] - description: "A list of schedules to configure." - bareos_dir_storages: - type: "list" - default: [] - description: "A list of storages to configure." - bareos_dir_install_debug_packages: - type: "bool" - default: no - description: "Install debug packages. This requires the debug repositories to be enabled." diff --git a/roles/bareos_dir/meta/main.yml b/roles/bareos_dir/meta/main.yml deleted file mode 100644 index f8502f4..0000000 --- a/roles/bareos_dir/meta/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -galaxy_info: - author: adfinis - role_name: bareos_dir - description: Install and configure [Bareos](https://www.bareos.com/) Director. - license: Apache-2.0 - company: none - min_ansible_version: "2.12" - - platforms: - - name: Debian - versions: - - bookworm - - bullseye - - buster - - name: EL - versions: - - "7" - - "8" - - "9" - - name: Fedora - versions: - - "37" - - "38" - - name: opensuse - versions: - - all - - name: Ubuntu - versions: - - jammy - - focal - - galaxy_tags: - - bareos - - infrastructure - - linux - - storage - - system - - tools - -dependencies: [] diff --git a/roles/bareos_dir/requirements.yml b/roles/bareos_dir/requirements.yml deleted file mode 100644 index d593422..0000000 --- a/roles/bareos_dir/requirements.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -roles: - - name: robertdebock.bootstrap - - name: adfinis.bareos_repository - # The `buildtools`, `python_pip` and `postgres` roles provide a database. - - name: robertdebock.buildtools - # EPEL is required for python-pip on RHEL7. - - name: robertdebock.epel - - name: robertdebock.python_pip - - name: robertdebock.postgres - # The `core_dependencies` and `postfix` roles provide mailing capabilities for the `bareos_role`: "dir". - # - name: robertdebock.core_dependencies - # - name: robertdebock.postfix diff --git a/roles/bareos_dir/tasks/assert.yml b/roles/bareos_dir/tasks/assert.yml deleted file mode 100644 index eac8912..0000000 --- a/roles/bareos_dir/tasks/assert.yml +++ /dev/null @@ -1,145 +0,0 @@ ---- - -- name: assert | Test bareos_dir_backup_configurations - ansible.builtin.assert: - that: - - bareos_dir_backup_configurations is defined - - bareos_dir_backup_configurations is boolean - quiet: yes - -- name: assert | Test bareos_dir_hostname - ansible.builtin.assert: - that: - - bareos_dir_hostname is defined - - bareos_dir_hostname is string - - bareos_dir_hostname != "" - quiet: yes - -- name: assert | Test bareos_dir_password - ansible.builtin.assert: - that: - - bareos_dir_password is defined - - bareos_dir_password is string - - bareos_dir_password != "" - quiet: yes - -- name: assert | Test bareos_dir_queryfile - ansible.builtin.assert: - that: - - bareos_dir_queryfile is defined - - bareos_dir_queryfile is string - - bareos_dir_queryfile != "" - quiet: yes - -- name: assert | Test bareos_dir_max_concurrent_jobs - ansible.builtin.assert: - that: - - bareos_dir_max_concurrent_jobs is defined - - bareos_dir_max_concurrent_jobs is number - quiet: yes - -- name: assert | Test bareos_dir_message - ansible.builtin.assert: - that: - - bareos_dir_message is defined - - bareos_dir_message is string - - bareos_dir_message != "" - quiet: yes - -- name: assert | Test bareos_dir_tls_enable - ansible.builtin.assert: - that: - - bareos_dir_tls_enable is defined - - bareos_dir_tls_enable is boolean - quiet: yes - -- name: assert | Test bareos_dir_tls_verify_peer - ansible.builtin.assert: - that: - - bareos_dir_tls_verify_peer is defined - - bareos_dir_tls_verify_peer is boolean - quiet: yes - -- name: assert | Test bareos_dir_catalogs - ansible.builtin.assert: - that: - - bareos_dir_catalogs is defined - - bareos_dir_catalogs is iterable - quiet: yes - -- name: assert | Test bareos_dir_consoles - ansible.builtin.assert: - that: - - bareos_dir_consoles is defined - - bareos_dir_consoles is iterable - quiet: yes - -- name: assert | Test bareos_dir_clients - ansible.builtin.assert: - that: - - bareos_dir_clients is defined - - bareos_dir_clients is iterable - quiet: yes - -- name: assert | Test bareos_dir_filesets - ansible.builtin.assert: - that: - - bareos_dir_filesets is defined - - bareos_dir_filesets is iterable - quiet: yes - -- name: assert | Test bareos_dir_jobdefs - ansible.builtin.assert: - that: - - bareos_dir_jobdefs is defined - - bareos_dir_jobdefs is iterable - quiet: yes - -- name: assert | Test bareos_dir_jobs - ansible.builtin.assert: - that: - - bareos_dir_jobs is defined - - bareos_dir_jobs is iterable - quiet: yes - -- name: assert | Test bareos_dir_messages - ansible.builtin.assert: - that: - - bareos_dir_messages is defined - - bareos_dir_messages is iterable - quiet: yes - -- name: assert | Test bareos_dir_pools - ansible.builtin.assert: - that: - - bareos_dir_pools is defined - - bareos_dir_pools is iterable - quiet: yes - -- name: assert | Test bareos_dir_profiles - ansible.builtin.assert: - that: - - bareos_dir_profiles is defined - - bareos_dir_profiles is iterable - quiet: yes - -- name: assert | Test bareos_dir_schedules - ansible.builtin.assert: - that: - - bareos_dir_schedules is defined - - bareos_dir_schedules is iterable - quiet: yes - -- name: assert | Test bareos_dir_storages - ansible.builtin.assert: - that: - - bareos_dir_storages is defined - - bareos_dir_storages is iterable - quiet: yes - -- name: assert | Test bareos_dir_install_debug_packages - ansible.builtin.assert: - that: - - bareos_dir_install_debug_packages is defined - - bareos_dir_install_debug_packages is boolean - quiet: yes diff --git a/roles/bareos_dir/tasks/main.yml b/roles/bareos_dir/tasks/main.yml deleted file mode 100644 index d5ce507..0000000 --- a/roles/bareos_dir/tasks/main.yml +++ /dev/null @@ -1,234 +0,0 @@ ---- -# tasks file for bareos_dir - -- name: Import assert.yml - ansible.builtin.import_tasks: - file: assert.yml - run_once: yes - delegate_to: localhost - -- name: Prevent db installation (apt) - ansible.builtin.debconf: - name: bareos-database-common - question: bareos-database-common/dbconfig-install - value: "false" - vtype: boolean - when: - - ansible_pkg_mgr in [ "apt" ] - -- name: Install requirements - ansible.builtin.package: - name: "{{ bareos_dir_requirements }}" - -- name: Install packages - ansible.builtin.package: - name: "{{ bareos_dir_packages }}" - -- name: Install debug packages - ansible.builtin.package: - name: "{{ bareos_dir_debug_packages }}" - when: - - bareos_dir_install_debug_packages - -- name: Run database setup scripts - ansible.builtin.command: - cmd: "{{ item }}" - creates: "/var/log/bareos/{{ item | basename }}.log" - become_user: postgres - become: yes - register: bareos_setup_database - loop: "{{ bareos_dir_install_scripts }}" - loop_control: - label: "{{ item | basename }}" - notify: - - Write results of database setup to file - -- name: Run handlers - ansible.builtin.meta: flush_handlers - -- name: Place bareos-dir.conf - ansible.builtin.template: - src: bareos-dir.conf.j2 - dest: "/etc/bareos/bareos-dir.d/director/bareos-dir.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place catalog - ansible.builtin.template: - src: catalog.conf.j2 - dest: "/etc/bareos/bareos-dir.d/catalog/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_catalogs }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place console - ansible.builtin.template: - src: console.conf.j2 - dest: "/etc/bareos/bareos-dir.d/console/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0644" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_consoles }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place client - ansible.builtin.template: - src: client.conf.j2 - dest: "/etc/bareos/bareos-dir.d/client/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_clients }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place fileset - ansible.builtin.template: - src: fileset.conf.j2 - dest: "/etc/bareos/bareos-dir.d/fileset/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_filesets }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place job - ansible.builtin.template: - src: job.conf.j2 - dest: "/etc/bareos/bareos-dir.d/job/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - vars: - bareos_dir_template_type: Job - loop: "{{ bareos_dir_jobs }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place jobdef - ansible.builtin.template: - src: job.conf.j2 - dest: "/etc/bareos/bareos-dir.d/jobdefs/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - vars: - bareos_dir_template_type: JobDefs - loop: "{{ bareos_dir_jobdefs }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place message - ansible.builtin.template: - src: message.conf.j2 - dest: "/etc/bareos/bareos-dir.d/messages/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_messages }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place pool - ansible.builtin.template: - src: pool.conf.j2 - dest: "/etc/bareos/bareos-dir.d/pool/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_pools }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place profile - ansible.builtin.template: - src: profile.conf.j2 - dest: "/etc/bareos/bareos-dir.d/profile/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0644" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_profiles }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place schedule - ansible.builtin.template: - src: schedule.conf.j2 - dest: "/etc/bareos/bareos-dir.d/schedule/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0644" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_schedules }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Place storage - ansible.builtin.template: - src: storage.conf.j2 - dest: "/etc/bareos/bareos-dir.d/storage/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_dir_backup_configurations }}" - loop: "{{ bareos_dir_storages }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Reload bareos-dir - -- name: Start bareos-dir - ansible.builtin.service: - name: bareos-dir - state: started - enabled: yes diff --git a/roles/bareos_dir/templates/.gitkeep b/roles/bareos_dir/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/roles/bareos_dir/templates/bareos-dir.conf.j2 b/roles/bareos_dir/templates/bareos-dir.conf.j2 deleted file mode 100644 index 263d18f..0000000 --- a/roles/bareos_dir/templates/bareos-dir.conf.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{{ ansible_managed | comment }} - -Director { - Name = "{{ bareos_dir_hostname }}" - Password = "{{ bareos_dir_password }}" - QueryFile = "{{ bareos_dir_queryfile }}" -{% if bareos_dir_max_concurrent_jobs != 1 %} - Maximum Concurrent Jobs = {{ bareos_dir_max_concurrent_jobs }} -{% endif %} - Messages = "{{ bareos_dir_message }}" -{% if not bareos_dir_tls_enable %} - TLS Enable = No -{% endif %} -{% if bareos_dir_tls_verify_peer %} - TLS Verify Peer = Yes -{% endif %} -} diff --git a/roles/bareos_dir/templates/catalog.conf.j2 b/roles/bareos_dir/templates/catalog.conf.j2 deleted file mode 100644 index 0a50ca8..0000000 --- a/roles/bareos_dir/templates/catalog.conf.j2 +++ /dev/null @@ -1,12 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Catalog { - Name = {{ item.name }} - dbname = "{{ item.dbname }}" - dbuser = "{{ item.dbuser }}" - dbpassword = "{{ item.dbpassword }}" -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/client.conf.j2 b/roles/bareos_dir/templates/client.conf.j2 deleted file mode 100644 index dc37175..0000000 --- a/roles/bareos_dir/templates/client.conf.j2 +++ /dev/null @@ -1,29 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Client { - Name = "{{ item.name }}" - Address = "{{ item.address }}" - Password = "{{ item.password }}" -{% if item.maximum_concurrent_jobs is defined %} - Maximum Concurrent Jobs = {{ item.maximum_concurrent_jobs }} -{% endif %} -{% if item.connection_from_client_to_director is defined %} - Connection From Client To Director = {{ item.connection_from_client_to_director | ternary('Yes', 'No') }} -{% endif %} -{% if item.connection_from_director_to_client is defined %} - Connection From Director To Client = {{ item.connection_from_director_to_client | ternary('Yes', 'No') }} -{% endif %} -{% if item.heartbeat_interval is defined %} - Heartbeat Interval = {{ item.heartbeat_interval }} -{% endif %} -{% if item.tls_enable is defined %} - TLS Enable = {{ item.tls_enable | ternary('Yes', 'No') }} -{% endif %} -{% if item.tls_verify_peer is defined %} - TLS Verify Peer = {{ item.tls_verify_peer | ternary('Yes', 'No') }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/console.conf.j2 b/roles/bareos_dir/templates/console.conf.j2 deleted file mode 100644 index 14fdb1d..0000000 --- a/roles/bareos_dir/templates/console.conf.j2 +++ /dev/null @@ -1,25 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Console { - Name = "{{ item.name }}" -{% if item.description is defined %} - Description = "{{ item.description }}" -{% endif %} - Password = "{{ item.password }}" -{% if item.commandacl is defined %} - CommandACL = {{ item.commandacl | join(', ') }} -{% endif %} -{% if item.jobacl is defined %} - JobACL = {{ item.jobacl | join(', ') }} -{% endif %} -{% if item.profile is defined %} - Profile = "{{ item.profile }}" -{% endif %} -{% if item.tlsenable is defined %} - TlsEnable = {{ item.tlsenable | ternary('Yes', 'No') }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/fileset.conf.j2 b/roles/bareos_dir/templates/fileset.conf.j2 deleted file mode 100644 index 5ccce2d..0000000 --- a/roles/bareos_dir/templates/fileset.conf.j2 +++ /dev/null @@ -1,40 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -FileSet { - Name = "{{ item.name }}" - Description = "{{ item.description }}" - Include { - Options { - Signature = {{ item.include.options.signature }} -{% if item.include.options.one_fs is defined %} - One FS = {{ item.include.options.one_fs | ternary('Yes', 'No') }} -{% endif %} -{% if item.include.options.fs_types is defined %} -{% for fs_type in item.include.options.fs_types %} - FS Type = {{ fs_type }} -{% endfor %} -{% endif %} -{% if item.include.options.compression is defined %} - Compression = {{ item.include.options.compression }} -{% endif %} - } -{% if item.include.exclude_dirs_containing is defined %} - Exclude Dir Containing = {{ item.include.exclude_dirs_containing }} -{% endif %} - -{% for file in item.include.files %} - File = {{ file }} -{% endfor %} - } -{% if item.exclude is defined %} - Exclude { -{% for file in item.exclude.files %} - File = {{ file }} -{% endfor %} - } -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/job.conf.j2 b/roles/bareos_dir/templates/job.conf.j2 deleted file mode 100644 index 6c40609..0000000 --- a/roles/bareos_dir/templates/job.conf.j2 +++ /dev/null @@ -1,51 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -{{ bareos_dir_template_type }} { - Name = "{{ item.name }}" -{% if item.messages is defined %} - Messages = "{{ item.messages }}" -{% endif %} -{% if item.pool is defined %} - Pool = {{ item.pool }} -{% endif %} -{% if item.type is defined %} - Type = {{ item.type }} -{% endif %} -{% if item.description is defined %} - Description = "{{ item.description }}" -{% endif %} -{% if item.client is defined %} - Client = "{{ item.client }}" -{% endif %} -{% if item.fileset is defined %} - FileSet = "{{ item.fileset }}" -{% endif %} -{% if item.storage is defined %} - Storage = "{{ item.storage }}" -{% endif %} -{% if item.jobdefs is defined %} - Job Defs = "{{ item.jobdefs }}" -{% endif %} -{% if item.level is defined %} - Level = {{ item.level }} -{% endif %} -{% if item.schedule is defined %} - Schedule = "{{ item.schedule }}" -{% endif %} -{% if item.runbeforejob is defined %} - Run Before Job = "{{ item.runbeforejob }}" -{% endif %} -{% if item.runafterjob is defined %} - Run After Job = "{{ item.runafterjob }}" -{% endif %} -{% if item.where is defined %} - Where = "{{ item.where }}" -{% endif %} -{% if item.maximum_concurrent_jobs is defined %} - Maximum Concurrent Jobs = {{ item.maximum_concurrent_jobs }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/message.conf.j2 b/roles/bareos_dir/templates/message.conf.j2 deleted file mode 100644 index 7253ae2..0000000 --- a/roles/bareos_dir/templates/message.conf.j2 +++ /dev/null @@ -1,29 +0,0 @@ -{{ ansible_managed | comment}} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Messages { - Name = "{{ item.name }}" - Description = "{{ item.description }}" -{% if item.append is defined %} -{% for append in item.append %} - Append = "{{ append.file }}" = {{ append.messages | join(', ') }} -{% endfor %} -{% endif %} -{% if item.catalog is defined %} - Catalog = {{ item.catalog | join(', ') }} -{% endif %} -{% if item.console is defined %} - Console = {{ item.console | join(', ') }} -{% endif %} -{% if item.mailcommand is defined %} - mailcommand = "{{ item.mailcommand }}" -{% endif %} -{% if item.mail is defined %} -{% for mail in item.mail %} - mail = {{ mail.to }} = {{ mail.messages | join(', ') }} -{% endfor %} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/pool.conf.j2 b/roles/bareos_dir/templates/pool.conf.j2 deleted file mode 100644 index a45cf51..0000000 --- a/roles/bareos_dir/templates/pool.conf.j2 +++ /dev/null @@ -1,28 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Pool { - Name = {{ item.name }} - Pool Type = {{ item.pool_type }} -{% if item.recycle is defined %} - Recycle = {{ item.recycle | ternary('Yes', 'No') }} -{% endif %} -{% if item.autoprune is defined %} - AutoPrune = {{ item.autoprune | ternary('Yes', 'No') }} -{% endif %} -{% if item.volume_retention is defined %} - Volume Retention = {{ item.volume_retention }} -{% endif %} -{% if item.maximum_volume_bytes is defined %} - Maximum Volume Bytes = {{ item.maximum_volume_bytes }} -{% endif %} -{% if item.maximum_volumes is defined %} - Maximum Volumes = {{ item.maximum_volumes }} -{% endif %} -{% if item.label_format is defined %} - Label Format = "{{ item.label_format }}" -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/profile.conf.j2 b/roles/bareos_dir/templates/profile.conf.j2 deleted file mode 100644 index fd35c67..0000000 --- a/roles/bareos_dir/templates/profile.conf.j2 +++ /dev/null @@ -1,19 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Profile { - Name = "{{ item.name }}" - JobAcl = "{{ item.jobacl | join('", "') }}" - ClientAcl = "{{ item.clientacl | join('", "') }}" - StorageAcl = "{{ item.storageacl | join('", "') }}" - ScheduleAcl = "{{ item.scheduleacl | join('", "') }}" - PoolAcl = "{{ item.poolacl | join('", "') }}" - CommandAcl = "{{ item.commandacl | join('", "') }}" - FileSetAcl = "{{ item.filesetacl | join('", "') }}" - CatalogAcl = "{{ item.catalogacl | join('", "') }}" - WhereAcl = "{{ item.whereacl | join('", "') }}" - PluginOptionsAcl = "{{ item.pluginoptionsacl | join('", "') }}" -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/schedule.conf.j2 b/roles/bareos_dir/templates/schedule.conf.j2 deleted file mode 100644 index 2a41234..0000000 --- a/roles/bareos_dir/templates/schedule.conf.j2 +++ /dev/null @@ -1,15 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Schedule { - Name = "{{ item.name }}" -{% if item.description is defined %} - Description = "{{ item.description }}" -{% endif %} -{% for run in item.run %} - Run = {{ run }} -{% endfor %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/templates/storage.conf.j2 b/roles/bareos_dir/templates/storage.conf.j2 deleted file mode 100644 index df1de97..0000000 --- a/roles/bareos_dir/templates/storage.conf.j2 +++ /dev/null @@ -1,22 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Storage { - Name = "{{ item.name }}" - Address = "{{ item.address }}" - Password = "{{ item.password }}" - Device = "{{ item.device }}" - Media Type = "{{ item.media_type }}" -{% if item.tls_enable is defined %} - TLS Enable = {{ item.tls_enable | ternary('Yes', 'No') }} -{% endif %} -{% if item.tls_verify_peer is defined %} - TLS Verify Peer = {{ item.tls_verify_peer | ternary('Yes', 'No') }} -{% endif %} -{% if item.maximum_concurrent_jobs is defined %} - Maximum Concurrent Jobs = {{ item.maximum_concurrent_jobs }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_dir/vars/main.yml b/roles/bareos_dir/vars/main.yml deleted file mode 100644 index d5d6730..0000000 --- a/roles/bareos_dir/vars/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# vars file for bareos_dir - -# The requirements for bareos-dir. -_bareos_dir_requirements: - default: [] - Debian: - - procps -bareos_dir_requirements: "{{ _bareos_dir_requirements[ansible_os_family] | default(_bareos_dir_requirements['default']) }}" - -# The packages to install. -bareos_dir_packages: - - bareos-database-postgresql - - bareos-database-tools - - bareos-director - -# A list of script to setup the database. -bareos_dir_install_scripts: - - /usr/lib/bareos/scripts/create_bareos_database - - /usr/lib/bareos/scripts/make_bareos_tables - - /usr/lib/bareos/scripts/grant_bareos_privileges - -_bareos_dir_debug_packages: - default: - - "bareos-director-debuginfo" - - gdb - Debian: - - "bareos-dbg" - - gdb - RedHat-7: - - "bareos-debuginfo" - - gdb -bareos_dir_debug_packages: "{{ _bareos_dir_debug_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_bareos_dir_debug_packages[ansible_os_family] | default(_bareos_dir_debug_packages['default'])) }}" diff --git a/roles/bareos_fd b/roles/bareos_fd new file mode 160000 index 0000000..c819bf5 --- /dev/null +++ b/roles/bareos_fd @@ -0,0 +1 @@ +Subproject commit c819bf5cf74370cb6ca6efde59e1641c2654f237 diff --git a/roles/bareos_fd/LICENSE b/roles/bareos_fd/LICENSE deleted file mode 100644 index 454a191..0000000 --- a/roles/bareos_fd/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Adfinis Copyright (C) 2023 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/roles/bareos_fd/README.md b/roles/bareos_fd/README.md deleted file mode 100644 index 5aa964e..0000000 --- a/roles/bareos_fd/README.md +++ /dev/null @@ -1,267 +0,0 @@ -# Ansible role [bareos_fd](#bareos_fd) - -Install and configure [Bareos](https://www.bareos.com/) File Daemon. - -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/adfinis/ansible-role-bareos_fd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_fd/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_fd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_fd)|[![downloads](https://img.shields.io/ansible/role/d/)](https://galaxy.ansible.com/adfinis/bareos_fd)|[![Version](https://img.shields.io/github/release/adfinis/ansible-role-bareos_fd.svg)](https://github.com/adfinis/ansible-role-bareos_fd/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from [`molecule/default/converge.yml`](https://github.com/adfinis/ansible-role-bareos_fd/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. - -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - role: adfinis.roles.bareos_fd - bareos_fd_backup_configurations: yes - bareos_fd_install_debug_packages: yes - bareos_fd_encryption_enabled: yes - bareos_fd_encryption_private_key: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAvFS5DDxBm2Hgf6LM2QnU3eKTw6PHpCBESjuqoKDnwnjL9wXH - GAO77b3lPXKFPZfrXUH41FxJt1wWuRXWjJfR4XI7RLmG5XGgbvKamnhCK48aZelN - oFa2Midto1Gydnb/I2I7GTA2fmx65mS4DTlXPn/phZJx9akUwJ1kRWVJgzuzimJ8 - 0YPqKbLPBRz86PWjAfTmYP4a7iuCTOlPqNIxGgCFUi5KIeFQZ3V8eO4iwVE8FhSK - /d1ykdiKlPAWjhcjDsTaQmWQd+IGi20bdzDrOevNUvaR7xGYbPczHDRVYveuEddl - 4up8teWGczQxiIYhIR6n0F9wqFK2AzZGbXOKBLkiPKocKQ/X1glEgLc1jy16YYA4 - vNXc3D+wxKNgnEcZ/YtDOZ746/k+4y8QuLaycA62BaD0hV/UxRHhJX1/gCkjkuU/ - F4ZFP52nMDlyB9uMY1rkUJgNWvgT/GyycPDHFJl04rAM+zl/wFHajy9Dfi8WxzKl - NILvDmSpoyZJww1mhKAFzkRf9ThtoZvs9ctA12QQJdSWWL9kPjJjw0RlBAwKnmBu - C/1wzBL3O9z8OSbJh9LixtfzR6X96ojgUxwQYsXcvcUopCHIAti6INRghbx4AWY8 - 5Jq4C8/OiY2LdHDBoxHY3gnqyKnzCqHZRbE2XUxkPkHXjoOlFX6KqYy49CkCAwEA - AQKCAgAAnUlyA4l5oEr8E3MEcxVR2E7nXi2SMNlKtLEskYwd7irk+S7lhCZJj4TF - iUUv639MZD/CB4ui2ytKV8LE4zue7y7ua0AFi6Nq829KAhHKs3UbMhw9J/vPqwq7 - 5fNIIo3plCLAnLZc6LyaB5BQfnu8DHCKblOx4i77nFYV4jbpMRJpmvX8Em+FZSIa - OT1r3GMf2FzLl5ZUK+ScgmknikFLZ26V8Rncp6jxZ+3XoF/xiRCpm2+Vgm5MK1aK - StsWEFSp6THmSBgt6iK5BaWuLam40crvWYrKrHxMgwIC/x9o44CXOORlN8l2XH6F - T+uxYTqrS7pbuHeo6ZOzMhXZbP5CCpNQdMrJMgtOJsdxoC9viKfAvSbvl+tlwMeb - pAcSxBQ69DRcxbR/Mb5AdZ0KQObdxeeRdHfJBcZypzuARfhxIKqGKVKtxUSE+Gc1 - kq7X9rdqxEBmDHULxnDfqjtf2LVqZao3moCbMqs+sX2rP7pD7TSlnsLNdsDx3yud - X1583lSxSCWIt4i74Elep1BEelO1S+cv0n60czT6IPkpkhr+/X8Vzu48oaGwFvoO - XUFMvzjNZbUv4/FcbISjcnuuXFGQZY9vXvhGtgnwQ+twOyllaGMvogEg0gNSOy1+ - 8yLNrN3QiZlKjFhIBNsJLCvmq5l3u09ijlGl5AxNoYE4wyLg/QKCAQEA4XVLlYeR - zYXibWlYJHdxf7rHnnbUwdww8NRdi6If/48MjEkHrHHK1K+4j/JoKuaKT1kOT9Mk - DgFQJYWXYPo6gFEXLqmjrAVDrHUFPi0Va5F6u/6I18jVmwJzvAkdO79LGNewmawL - mluA/SZAq12nnncbJGA1zn2nTri1Ld/2az1IztYEZGpJf6SU7HQIGqV5hKYTS1NV - TL9wehaCht0RiZh+xOZTENpuCgslBPI7NN82kAAD3/jtbOf37QJ7pkVYhC38r8Vo - dhdOR1STC/30IybiPYacHFTOIhtpbAD5CMkH6/Y5+40LAboqP9uO1rKHSJamj2kn - NqUHIhoi3nz87QKCAQEA1dfisgifNE25MsS5QvFMffuJwe7fyrZlDPnfxuqjEYfw - /Oi/FJ8Ov1tu/9FSkDzFuu+gKHLQ06OVKLJXCdsKSz4uVK+5LLAxbHn8APEarHU/ - ZjC8NV0g+lJhSOAEHnYAZOBipCt0eBZA0eoxDLk3U7ZpvdgUA3VwaWxsSCfGdkcs - CtS3GVLKX5IvufY0DXEHTOXdM0lN0F7lzN2lNeqW/7eBItSUACmT5zaljhpRXWBO - ivdicD6jX5v8egwxRS1hIQr+8XRtY7xILBMlOw0y3oxtjv6jPdX0wpc1TdjyN2eB - RlyP5ifNMrve+3e5640rhtoAUdheSner6ncvexEorQKCAQBaE8sHCwst2fgFTrlw - mGg4aB+pKEEI0ziaf76AM14ldLnGssbmFvC62RocKPWFbmaEHUiii/Ezx0KGO0Gn - 9VG6QqvIcO57o/7NwFM/7DNKru0ifyedTxhIvkoPLnUHkf4nBsYAH8Ti/vwiKE5e - KST3Iw8tEWNuBLX7tcBte7WwUuPr/4XxuKV04gS+E/3I56QNY20CA2FpMHN309aC - m4COQOclNACsExkz2hAIUd9l2GisT9U8fvAdOvDLONq+K6aZ6OW0NGLwC4+y4A+A - Ew6fnMF3Y3iruRZCekE8bYcSA3+uvsmbv1ZOclq++LGxBdMXJVmWoqSQKI8ZCOg1 - jCphAoIBAEmpLuaiv6x1pXjOeP6NPgsbjW1nSmF6iL56iFHt2zQbvrBvv/pre9oA - tfCa+zTCKl5lUqb8PeDZNXUqUX8Mm7QlfDIhwciZ/LxgHKV6Z/TGAovB9+Lt7IEt - xWMj/2c6wJH/FRt1+I2xJKzqXfEDEALfD/ecKfCzEIDQH1CPmvZ9N7eXZGbttNZM - 9fG51F5Y8+nSOGsFMi+3sLLsGo/C+jal0G7eCQkxSUhY85hKioJ+vS9zXc5KVV6G - zeaAsqwgoJeQQReNQm0bm0TLZ4S63C3683ZRUovnWoN5MJxbQbxCBC7njY37Ydy7 - CGlY6YsxOrAeAgQvYvOF24tNeOaMl5UCggEBAJ7LRUjNlGZ4xcCLNRIV9imXxo48 - eQiDC298h+wPzKOjFNp7c/+QQZRsVaKJLIY2FnsEA4ZJZx+oT4wL/3smYCBP/aMD - vLWTarp6unKnzvopBMarFpk3RTqzv8txMjz3kr8WiIhr8geFagjE/ujcuBOu17k8 - /qc6HNLy0e4bK648oBAq4C5qxid33zc06eRed2EOSqXdHwHgfBKlRwqCIYkiWlq/ - SWAk+9svFT9HvziCtFzH5GdsM24W0KtOsTxUiil89ybQW2uWWm5HB3OuATmb0JZA - cz+WiXCcYLVId8gl/hXkKBjRVEhhKsmnab8Jg2HlwGXuAdwqP5/GwxsM41g= - -----END RSA PRIVATE KEY----- - bareos_fd_encryption_master_public_key: | - -----BEGIN CERTIFICATE----- - MIIDyjCCArKgAwIBAgIJAIAjOIGqAGRwMA0GCSqGSIb3DQEBCwUAMIGSMQswCQYD - VQQGEwJOTDEQMA4GA1UECAwHVVRSRUNIVDESMBAGA1UEBwwJQnJldWtlbGVuMSIw - IAYDVQQKDBlBZGZpbmlzIElUIE5lZGVybGFuZCBCLlYuMQ8wDQYDVQQDDAZiYXJl - b3MxKDAmBgkqhkiG9w0BCQEWGXJvYmVydC5kZWJvY2tAYWRmaW5pcy5jb20wHhcN - MjMwOTExMDg1MzA0WhcNMjMxMDExMDg1MzA0WjCBkjELMAkGA1UEBhMCTkwxEDAO - BgNVBAgMB1VUUkVDSFQxEjAQBgNVBAcMCUJyZXVrZWxlbjEiMCAGA1UECgwZQWRm - aW5pcyBJVCBOZWRlcmxhbmQgQi5WLjEPMA0GA1UEAwwGYmFyZW9zMSgwJgYJKoZI - hvcNAQkBFhlyb2JlcnQuZGVib2NrQGFkZmluaXMuY29tMIIBIjANBgkqhkiG9w0B - AQEFAAOCAQ8AMIIBCgKCAQEAxFjcLKHDTf8dcT4kKtyZlIh4Zh7zNglaa6SJNBGW - pmcvtgfR9aBCDbcEphcssdytrXIiLsCEfv1h63o58UXePKYJMtNzbn6NNyzamxB9 - CM4oHWr/td8i6fYaYXmqOxOimX707joWPlTB9+/rKWFrxwyg08oVGFdBNR6GmWek - Y5aRaEMwRBhh+bSVR9/Rj/QmqlF9pCB9/TtY3hhBdQkcy1tLTDo7Mf/Z4gLpk7d2 - vRmpvVY8JloXjzuJNgVNbzY09pylqe78m9UsrJGBlzocZO5+AnO7wsqMAtUvplOM - oE7GHrg1FpfLjY3bqTQka/fVd1bDt5eDjAJnPqO1RYpKjQIDAQABoyEwHzAdBgNV - HQ4EFgQURTeY0pPxExJwTelsdBXr5PxgOdAwDQYJKoZIhvcNAQELBQADggEBALCi - urw+j1Yg2QDkOzMxmr6r0O/kF3WfrfpcevOCGVN0GxdxP/nGcfAh8feq4xj4oAnS - 2CyhNfPPi+rIO1T0EkZWwL/kTByMGoR9Qc+juMgJ1HTYP6nEnBOXPMo1OyUdK5K3 - MefQpNgHdWNSjWtLuW3YW8rkIeF8ZjmlXOSmBdOmqFi7p3OwwF8FnuXze1RLTgPL - VeI8D8DtzbX+mocuYxfIAFEmRXAmMeimXgwrVyI+w8+3IRGw8rDje0pFZX5X2aED - Gcz2IVF2cw5k1ryYW5kN027oK9igd8qc6dcJC6nMJw1kLbBdo68Eq3EOx92Fljlg - Wa7Dw2pD6yQGl/dfgQg= - -----END CERTIFICATE----- - bareos_fd_directors: - - name: "bareos-dir" - password: "secretpassword" - monitor: no - connection_from_client_to_director: yes - connection_from_director_to_client: no - tls_enable: yes - tls_verify_peer: no - - name: "disabled-director" - enabled: no - 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: no -``` - -The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/adfinis/ansible-role-bareos_fd/blob/master/molecule/default/prepare.yml): - -```yaml ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - role: robertdebock.bootstrap - - role: adfinis.roles.bareos_repository - bareos_repository_enable_tracebacks: yes -``` - -These roles are provided as is, without warranty of any kind. Use it at your own risk. - -## [Role Variables](#role-variables) - -The default values for the variables are set in [`defaults/main.yml`](https://github.com/adfinis/ansible-role-bareos_fd/blob/master/defaults/main.yml): - -```yaml ---- -# defaults file for bareos_fd - -# The client has these configuration parameters. - -# Backup existing configurations. -bareos_fd_backup_configurations: no - -# Install debug packages. This requires the debug repositories to be enabled. -bareos_fd_install_debug_packages: no - -# The hostname of the File Daemon. -bareos_fd_hostname: "{{ inventory_hostname }}" - -# The maximum bandwidth to use. -bareos_fd_max_job_bandwidth: "10 mb/s" - -# The message to use. -bareos_fd_message: "Standard" - -# The maximum number of concurrent jobs. -bareos_fd_maximum_concurrent_jobs: 20 - -# Enable TLS. -bareos_fd_tls_enable: yes - -# Verify the peer. -bareos_fd_tls_verify_peer: no - -# The inteval in seconds to send a heartbeat. -bareos_fd_heartbeat_interval: 0 - -# The Directors to connect to. -bareos_fd_directors: - - name: "bareos-dir" - password: "secretpassword" - monitor: no - description: "Allow the configured Director to access this file daemon." - - name: bareos-mon - password: "secretpassword" - monitor: yes - description: "Restricted Director, used by tray-monitor to get the status of this file daemon." - -# The Messages to configure. -bareos_fd_messages: - - name: "Standard" - director: - server: bareos-dir - messages: - - all - - "!skipped" - - "!restored" - description: "Send relevant messages to the Director." - -# For encryption of data, set this to `yes`. -bareos_fd_encryption_enabled: no - -# You may bring your own private key. If not specified, a new one will be generated. -bareos_fd_encryption_private_key: "" - -# The master public key to use. -bareos_fd_encryption_master_public_key: "" -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/adfinis/ansible-role-bareos_fd/blob/master/requirements.txt). - -## [State of used roles](#state-of-used-roles) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/adfinis/robertdebock.bootstrap)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap)| -|[adfinis.bareos_repository](https://galaxy.ansible.com/adfinis/bareos_repository)|[![Build Status GitHub](https://github.com/adfinis/ansible-role-bareos_repository/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_repository/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://adfinis.com/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/adfinis/ansible-role-bareos_fd/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|bookworm, bullseye, buster| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|7, 8, 9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|37, 38| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal| - -The minimum version of Ansible required is 2.12, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -If you find issues, please register them in [GitHub](https://github.com/adfinis/ansible-role-bareos_fd/issues). - -## [License](#license) - -[Apache-2.0](https://github.com/adfinis/ansible-role-bareos_fd/blob/master/LICENSE). - -## [Author Information](#author-information) - -[Adfinis](https://adfinis.com/) - diff --git a/roles/bareos_fd/defaults/main.yml b/roles/bareos_fd/defaults/main.yml deleted file mode 100644 index 0fe9ab8..0000000 --- a/roles/bareos_fd/defaults/main.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -# defaults file for bareos_fd - -# The client has these configuration parameters. - -# Backup existing configurations. -bareos_fd_backup_configurations: no - -# Install debug packages. This requires the debug repositories to be enabled. -bareos_fd_install_debug_packages: no - -# The hostname of the File Daemon. -bareos_fd_hostname: "{{ inventory_hostname }}" - -# The maximum bandwidth to use. -bareos_fd_max_job_bandwidth: "10 mb/s" - -# The message to use. -bareos_fd_message: "Standard" - -# The maximum number of concurrent jobs. -bareos_fd_maximum_concurrent_jobs: 20 - -# Enable TLS. -bareos_fd_tls_enable: yes - -# Verify the peer. -bareos_fd_tls_verify_peer: no - -# The inteval in seconds to send a heartbeat. -bareos_fd_heartbeat_interval: 0 - -# The Directors to connect to. -bareos_fd_directors: - - name: "bareos-dir" - password: "secretpassword" - monitor: no - description: "Allow the configured Director to access this file daemon." - - name: bareos-mon - password: "secretpassword" - monitor: yes - description: "Restricted Director, used by tray-monitor to get the status of this file daemon." - -# The Messages to configure. -bareos_fd_messages: - - name: "Standard" - director: - server: bareos-dir - messages: - - all - - "!skipped" - - "!restored" - description: "Send relevant messages to the Director." - -# For encryption of data, set this to `yes`. -bareos_fd_encryption_enabled: no - -# You may bring your own private key. If not specified, a new one will be generated. -bareos_fd_encryption_private_key: "" - -# The master public key to use. -bareos_fd_encryption_master_public_key: "" diff --git a/roles/bareos_fd/handlers/main.yml b/roles/bareos_fd/handlers/main.yml deleted file mode 100644 index 73dea73..0000000 --- a/roles/bareos_fd/handlers/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# handlers file for bareos_fd - -- name: Check configuration - ansible.builtin.command: "/usr/sbin/bareos-fd --test-config" - changed_when: false - -- name: Restart bareos-filedaemon - ansible.builtin.service: - name: "{{ bareos_fd_service }}" - state: restarted diff --git a/roles/bareos_fd/meta/argument_specs.yml b/roles/bareos_fd/meta/argument_specs.yml deleted file mode 100644 index 8ab0944..0000000 --- a/roles/bareos_fd/meta/argument_specs.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- - -# # bareos_dir_messages: Daemon - -argument_specs: - main: - short_description: "Install and configure BareOS File Daemon on your system." - description: > - Install and configure BareOS File Daemon on your system. - author: Adfinis - options: - bareos_fd_backup_configurations: - type: "bool" - default: no - description: "Backup existing configurations." - bareos_fd_install_debug_packages: - type: "bool" - default: no - description: "Install debug packages. This requires the debug repositories to be enabled." - bareos_fd_hostname: - type: "str" - default: "{{ inventory_hostname }}" - description: "The hostname of the File Daemon." - bareos_fd_max_job_bandwidth: - type: "str" - default: "10 mb/s" - description: "The maximum bandwidth to use." - bareos_fd_message: - type: "str" - default: "Standard" - description: "The message to use." - bareos_fd_maximum_concurrent_jobs: - type: "int" - default: 20 - description: "The maximum number of concurrent jobs." - bareos_fd_tls_enable: - type: "bool" - default: yes - description: "Enable TLS." - bareos_fd_tls_verify_peer: - type: "bool" - default: no - description: "Verify the peer." - bareos_fd_heartbeat_interval: - type: "int" - default: 0 - description: "The inteval in seconds to send a heartbeat." - bareos_fd_directors: - type: "list" - default: [] - description: "The Directors to connect to." - bareos_fd_messages: - type: "list" - default: [] - description: "The Messages to configure." - bareos_fd_encryption_enabled: - type: "bool" - default: no - description: "For encryption of data, set this to `yes`." - bareos_fd_encryption_private_key: - type: "str" - default: "" - description: "You may bring your own private key. If not specified, a new one will be generated." - bareos_fd_encryption_master_public_key: - type: "str" - default: "" - description: "The master public key to use." diff --git a/roles/bareos_fd/meta/main.yml b/roles/bareos_fd/meta/main.yml deleted file mode 100644 index 195d18e..0000000 --- a/roles/bareos_fd/meta/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -galaxy_info: - author: adfinis - role_name: bareos_fd - description: Install and configure [Bareos](https://www.bareos.com/) File Daemon. - license: Apache-2.0 - company: none - min_ansible_version: "2.12" - - platforms: - - name: Debian - versions: - - bookworm - - bullseye - - buster - - name: EL - versions: - - "7" - - "8" - - "9" - - name: Fedora - versions: - - "37" - - "38" - - name: opensuse - versions: - - all - - name: Ubuntu - versions: - - jammy - - focal - - galaxy_tags: - - bareos - - infrastructure - - linux - - storage - - system - - tools - -dependencies: [] diff --git a/roles/bareos_fd/requirements.yml b/roles/bareos_fd/requirements.yml deleted file mode 100644 index bb33858..0000000 --- a/roles/bareos_fd/requirements.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -roles: - - name: robertdebock.bootstrap - - name: adfinis.bareos_repository - -collections: - - name: community.crypto diff --git a/roles/bareos_fd/tasks/assert.yml b/roles/bareos_fd/tasks/assert.yml deleted file mode 100644 index ca435f5..0000000 --- a/roles/bareos_fd/tasks/assert.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- - -- name: assert | Test bareos_backup_configurations - ansible.builtin.assert: - that: - - bareos_fd_backup_configurations is defined - - bareos_fd_backup_configurations is boolean - quiet: yes - -- name: assert | Test bareos_fd_hostname - ansible.builtin.assert: - that: - - bareos_fd_hostname is defined - - bareos_fd_hostname is string - - bareos_fd_hostname is not none - quiet: yes - -- name: assert | Test bareos_fd_max_job_bandwidth - ansible.builtin.assert: - that: - - bareos_fd_max_job_bandwidth is defined - - bareos_fd_max_job_bandwidth is string - - bareos_fd_max_job_bandwidth is not none - quiet: yes - -- name: assert | Test bareos_fd_message - ansible.builtin.assert: - that: - - bareos_fd_message is defined - - bareos_fd_message is string - - bareos_fd_message is not none - quiet: yes - -- name: assert | Test bareos_fd_tls_enable - ansible.builtin.assert: - that: - - bareos_fd_tls_enable is defined - - bareos_fd_tls_enable is boolean - quiet: yes - -- name: assert | Test bareos_fd_tls_verify_peer - ansible.builtin.assert: - that: - - bareos_fd_tls_verify_peer is defined - - bareos_fd_tls_verify_peer is boolean - quiet: yes - -- name: assert | Test bareos_fd_heartbeat_interval - ansible.builtin.assert: - that: - - bareos_fd_heartbeat_interval is defined - - bareos_fd_heartbeat_interval is number - quiet: yes - -- name: assert | Test bareos_fd_maximum_concurrent_jobs - ansible.builtin.assert: - that: - - bareos_fd_maximum_concurrent_jobs is defined - - bareos_fd_maximum_concurrent_jobs is number - quiet: yes - -- name: assert | Test bareos_fd_directors - ansible.builtin.assert: - that: - - bareos_fd_directors is defined - - bareos_fd_directors is iterable - quiet: yes - -- name: assert | Test bareos_fd_messages - ansible.builtin.assert: - that: - - bareos_fd_messages is defined - - bareos_fd_messages is iterable - quiet: yes - -- name: assert | Test bareos_fd_encryption_enabled - ansible.builtin.assert: - that: - - bareos_fd_encryption_enabled is defined - - bareos_fd_encryption_enabled is boolean - quiet: yes - -- name: assert | Test bareos_fd_encryption_private_key - ansible.builtin.assert: - that: - - bareos_fd_encryption_private_key is defined - - bareos_fd_encryption_private_key is string - quiet: yes - when: - - bareos_fd_encryption_enabled - -- name: assert | Test bareos_fd_encryption_master_public_key - ansible.builtin.assert: - that: - - bareos_fd_encryption_master_public_key is defined - - bareos_fd_encryption_master_public_key is string - - bareos_fd_encryption_master_public_key != "" - quiet: yes - when: - - bareos_fd_encryption_enabled diff --git a/roles/bareos_fd/tasks/encryption.yml b/roles/bareos_fd/tasks/encryption.yml deleted file mode 100644 index 1d118b3..0000000 --- a/roles/bareos_fd/tasks/encryption.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- - -- name: encryption | Install python cryptography package - ansible.builtin.package: - name: "{{ bareos_fd_encryption_packages }}" - -- name: encryption | Generate private key - community.crypto.openssl_privatekey: - path: /etc/bareos/{{ bareos_fd_hostname }}-private.key - owner: bareos - group: bareos - mode: "0600" - return_content: yes - register: bareos_fd_encryption_private_key_generated - when: - - bareos_fd_encryption_private_key == "" - -- name: encryption | Place private key - ansible.builtin.copy: - content: "{{ bareos_fd_encryption_private_key }}" - dest: /etc/bareos/{{ bareos_fd_hostname }}-private.key - owner: bareos - group: bareos - mode: "0600" - when: - - bareos_fd_encryption_private_key != "" - -- name: encryption | Generate csr for public key - community.crypto.openssl_csr: - path: /etc/bareos/{{ bareos_fd_hostname }}-public.csr - privatekey_path: /etc/bareos/{{ bareos_fd_hostname }}-private.key - common_name: "{{ bareos_fd_hostname }}" - owner: bareos - group: bareos - mode: "0644" - -- name: encryption | Generate public key - community.crypto.x509_certificate: - path: /etc/bareos/{{ bareos_fd_hostname }}-public.key - privatekey_path: /etc/bareos/{{ bareos_fd_hostname }}-private.key - csr_path: /etc/bareos/{{ bareos_fd_hostname }}-public.csr - provider: selfsigned - return_content: yes - owner: bareos - group: bareos - mode: "0644" - register: bareos_fd_encryption_public_key - -- name: encryption | Combine private and public key - ansible.builtin.copy: - content: "{{ bareos_fd_encryption_private_key_generated.privatekey | default(bareos_fd_encryption_private_key) }}{{ bareos_fd_encryption_public_key.certificate }}" - dest: /etc/bareos/{{ bareos_fd_hostname }}.pem - owner: bareos - group: bareos - mode: "0600" - notify: - - Check configuration - - Restart bareos-filedaemon - -- name: encryption | Place master public key - ansible.builtin.copy: - content: "{{ bareos_fd_encryption_master_public_key }}" - dest: /etc/bareos/master.pub.key - owner: bareos - group: bareos - mode: "0640" - notify: - - Check configuration - - Restart bareos-filedaemon diff --git a/roles/bareos_fd/tasks/main.yml b/roles/bareos_fd/tasks/main.yml deleted file mode 100644 index 3632bc3..0000000 --- a/roles/bareos_fd/tasks/main.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# tasks file for bareos_fd - -- name: Import assert.yml - ansible.builtin.import_tasks: - file: assert.yml - run_once: yes - delegate_to: localhost - -- name: Install packages - ansible.builtin.package: - name: bareos-filedaemon - -- name: Install debug packages - ansible.builtin.package: - name: "{{ bareos_fd_debug_packages }}" - when: - - bareos_fd_install_debug_packages - -- name: Place myself.conf - ansible.builtin.template: - src: myself.conf.j2 - dest: "/etc/bareos/bareos-fd.d/client/myself.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_fd_backup_configurations }}" - notify: - - Check configuration - - Restart bareos-filedaemon - -- name: Place director - ansible.builtin.template: - src: director.conf.j2 - dest: "/etc/bareos/bareos-fd.d/director/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_fd_backup_configurations }}" - loop: "{{ bareos_fd_directors }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Restart bareos-filedaemon - -- name: Place message - ansible.builtin.template: - src: message.conf.j2 - dest: "/etc/bareos/bareos-fd.d/messages/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_fd_backup_configurations }}" - loop: "{{ bareos_fd_messages }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Restart bareos-filedaemon - -- name: Import encryption tasklist - ansible.builtin.import_tasks: - file: encryption.yml - when: - - bareos_fd_encryption_enabled - -- name: Start bareos-filedaemon - ansible.builtin.service: - name: "{{ bareos_fd_service }}" - state: started - enabled: yes diff --git a/roles/bareos_fd/templates/.gitkeep b/roles/bareos_fd/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/roles/bareos_fd/templates/director.conf.j2 b/roles/bareos_fd/templates/director.conf.j2 deleted file mode 100644 index c731d4d..0000000 --- a/roles/bareos_fd/templates/director.conf.j2 +++ /dev/null @@ -1,31 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Director { - Name = {{ item.name }} -{% if item.description is defined %} - Description = "{{ item.description }}" -{% endif %} - Password = "[md5]{{ item.password | md5 }}" -{% if item.monitor is defined and item.monitor %} - Monitor = Yes -{% endif %} -{% if item.address is defined %} - Address = "{{ item.address }}" -{% endif %} -{% if item.connection_from_client_to_director is defined %} - Connection From Client To Director = {{ item.connection_from_client_to_director | ternary('Yes', 'No') }} -{% endif %} -{% if item.connection_from_director_to_client is defined %} - Connection From Director To Client = {{ item.connection_from_director_to_client | ternary('Yes', 'No') }} -{% endif %} -{% if item.tls_enable is defined %} - TLS Enable = {{ item.tls_enable | ternary('Yes', 'No') }} -{% endif %} -{% if item.tls_verify_peer is defined %} - TLS Verify Peer = {{ item.tls_verify_peer | ternary('Yes', 'No') }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_fd/templates/message.conf.j2 b/roles/bareos_fd/templates/message.conf.j2 deleted file mode 100644 index baebbf2..0000000 --- a/roles/bareos_fd/templates/message.conf.j2 +++ /dev/null @@ -1,19 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Messages { - Name = "{{ item.name }}" - Description = "{{ item.description }}" -{% if item.director is defined %} - Director = {{ item.director.server }} = {{ item.director.messages | join(', ') }} -{% endif %} -{% if item.append is defined %} - Append = "{{ item.append.file }}" = {{ item.append.messages | join(', ') }} -{% endif %} -{% if item.console is defined %} - Console = {{ item.console | join(', ') }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_fd/templates/myself.conf.j2 b/roles/bareos_fd/templates/myself.conf.j2 deleted file mode 100644 index 2637dc3..0000000 --- a/roles/bareos_fd/templates/myself.conf.j2 +++ /dev/null @@ -1,25 +0,0 @@ -{{ ansible_managed | comment }} - -Client { - Name = "{{ bareos_fd_hostname }}" - Messages = "{{ bareos_fd_message }}" -{% if not bareos_fd_tls_enable %} - TLS Enable = No -{% endif %} -{% if bareos_fd_tls_verify_peer %} - TLS Verify Peer = Yes -{% endif %} -{% if bareos_fd_heartbeat_interval != 0 %} - Heartbeat Interval = {{ bareos_fd_heartbeat_interval }} -{% endif %} -{% if bareos_fd_maximum_concurrent_jobs != 20 %} - Maximum Concurrent Jobs = {{ bareos_fd_max_concurrent_jobs }} -{% endif %} -{% if bareos_fd_encryption_enabled %} - PKI Signatures = Yes - PKI Encryption = Yes - PKI Keypair = "/etc/bareos/{{ bareos_fd_hostname }}.pem" - PKI Master Key = "/etc/bareos/master.pub.key" - PKI Cipher = aes128 -{% endif %} -} diff --git a/roles/bareos_fd/vars/main.yml b/roles/bareos_fd/vars/main.yml deleted file mode 100644 index 32f07ee..0000000 --- a/roles/bareos_fd/vars/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# vars file for bareos_fd - -# A map to define the packages to install for encryption. -_bareos_fd_encryption_packages: - default: - - python3-cryptography - Archlinux: - - python-cryptography - RedHat-7: - - python2-cryptography -bareos_fd_encryption_packages: "{{ _bareos_fd_encryption_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_bareos_fd_encryption_packages[ansible_os_family]) | default(_bareos_fd_encryption_packages['default']) }}" - -# A map to define the service name to manage. -_bareos_fd_service: - default: bareos-filedaemon - Archlinux: bareos-fd -bareos_fd_service: "{{ _bareos_fd_service[ansible_os_family] | default(_bareos_fd_service['default']) }}" - -# A map to define the packages to install for debugging. -_bareos_fd_debug_packages: - default: - - bareos-filedaemon-debuginfo - - gdb - Archlinux: - - bareos-devel - Debian: - - bareos-dbg - - gdb - RedHat-7: - - bareos-debuginfo - - gdb -bareos_fd_debug_packages: "{{ _bareos_fd_debug_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_bareos_fd_debug_packages[ansible_os_family]) | default(_bareos_fd_debug_packages['default']) }}" diff --git a/roles/bareos_repository b/roles/bareos_repository new file mode 160000 index 0000000..fb8f585 --- /dev/null +++ b/roles/bareos_repository @@ -0,0 +1 @@ +Subproject commit fb8f585f3a4c24abe4e63731331ab5cdd743e679 diff --git a/roles/bareos_repository/LICENSE b/roles/bareos_repository/LICENSE deleted file mode 100644 index 454a191..0000000 --- a/roles/bareos_repository/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Adfinis Copyright (C) 2023 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/roles/bareos_repository/README.md b/roles/bareos_repository/README.md deleted file mode 100644 index 446a9a2..0000000 --- a/roles/bareos_repository/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# Ansible role [bareos_repository](#bareos_repository) - -Setup the [Bareos](https://www.bareos.com/) repositories. - -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/adfinis/ansible-role-bareos_repository/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_repository/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository)|[![downloads](https://img.shields.io/ansible/role/d/37311)](https://galaxy.ansible.com/adfinis/bareos_repository)|[![Version](https://img.shields.io/github/release/adfinis/ansible-role-bareos_repository.svg)](https://github.com/adfinis/ansible-role-bareos_repository/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from [`molecule/default/converge.yml`](https://github.com/adfinis/ansible-role-bareos_repository/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. - -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - role: adfinis.roles.bareos_repository - bareos_repository_enable_tracebacks: yes -``` - -The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/adfinis/ansible-role-bareos_repository/blob/master/molecule/default/prepare.yml): - -```yaml ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - role: robertdebock.bootstrap -``` - -These roles are provided as is, without warranty of any kind. Use it at your own risk. - -## [Role Variables](#role-variables) - -The default values for the variables are set in [`defaults/main.yml`](https://github.com/adfinis/ansible-role-bareos_repository/blob/master/defaults/main.yml): - -```yaml ---- -# defaults file for bareos_repository - -# What type of Bareos to install, either "community" or "subscription". -bareos_repository_type: community - -# The subscription username for the repository. -bareos_repository_username: "" - -# The subscription password for the repository. -bareos_repository_password: "" - -# What release to use, either "current", "next" or "release". -# When using `bareos_repository_type: community` this can be set to "release" or "testing". -bareos_repository_release: current - -# The version of Bareos to install. -# Only affects `bareos_repository_type: subscription`. -bareos_repository_version: 23 - -# You can enable tracebacks for troubleshooting purposes. -bareos_repository_enable_tracebacks: no -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/adfinis/ansible-role-bareos_repository/blob/master/requirements.txt). - -## [State of used roles](#state-of-used-roles) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/adfinis/robertdebock.bootstrap)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://adfinis.com/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/adfinis/ansible-role-bareos_repository/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|bookworm, bullseye, buster| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|7, 8, 9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|37, 38| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal| - -The minimum version of Ansible required is 2.12, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -If you find issues, please register them in [GitHub](https://github.com/adfinis/ansible-role-bareos_repository/issues). - -## [License](#license) - -[Apache-2.0](https://github.com/adfinis/ansible-role-bareos_repository/blob/master/LICENSE). - -## [Author Information](#author-information) - -[Adfinis](https://adfinis.com/) - diff --git a/roles/bareos_repository/defaults/main.yml b/roles/bareos_repository/defaults/main.yml deleted file mode 100644 index 7aa75a9..0000000 --- a/roles/bareos_repository/defaults/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# defaults file for bareos_repository - -# What type of Bareos to install, either "community" or "subscription". -bareos_repository_type: community - -# The subscription username for the repository. -bareos_repository_username: "" - -# The subscription password for the repository. -bareos_repository_password: "" - -# What release to use, either "current", "next" or "release". -# When using `bareos_repository_type: community` this can be set to "release" or "testing". -bareos_repository_release: current - -# The version of Bareos to install. -# Only affects `bareos_repository_type: subscription`. -bareos_repository_version: 23 - -# You can enable tracebacks for troubleshooting purposes. -bareos_repository_enable_tracebacks: no diff --git a/roles/bareos_repository/meta/argument_specs.yml b/roles/bareos_repository/meta/argument_specs.yml deleted file mode 100644 index 62c947b..0000000 --- a/roles/bareos_repository/meta/argument_specs.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- - -argument_specs: - main: - short_description: "Setup the bareos repositories." - description: > - Install the BareOS repositories. - After applying this role, you can install bareos packages. - author: Adfinis - options: - bareos_repository_type: - type: "str" - default: community - description: "What type of Bareos to install, either 'community' or 'subscription'." - choices: - - community - - subscription - bareos_repository_username: - type: "str" - default: "" - description: "The subscription username for the repository." - bareos_repository_password: - type: "str" - default: "" - description: "The subscription password for the repository." - bareos_repository_release: - type: "str" - default: current - description: "What release to use, either 'current', 'next' or 'release'." - choices: - - current - - next - - release - bareos_repository_version: - type: "int" - default: 23 - description: "The version of Bareos to install. Only affects `bareos_repository_type: subscription`." - bareos_repository_enable_tracebacks: - type: "bool" - default: false - description: "You can enable tracebacks for troubleshooting purposes." diff --git a/roles/bareos_repository/meta/main.yml b/roles/bareos_repository/meta/main.yml deleted file mode 100644 index 74e0237..0000000 --- a/roles/bareos_repository/meta/main.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -galaxy_info: - author: adfinis - role_name: bareos_repository - description: Setup the [Bareos](https://www.bareos.com/) repositories. - license: Apache-2.0 - company: none - min_ansible_version: "2.12" - - platforms: - - name: Debian - versions: - - bookworm - - bullseye - - buster - - name: EL - versions: - - "7" - - "8" - - "9" - - name: Fedora - versions: - - "37" - - "38" - - name: opensuse - versions: - - all - - name: Ubuntu - versions: - - jammy - - focal - - galaxy_tags: - - backup - - bareos - - infrastructure - - linux - - storage - - system - - tools - -dependencies: [] diff --git a/roles/bareos_repository/requirements.yml b/roles/bareos_repository/requirements.yml deleted file mode 100644 index be93678..0000000 --- a/roles/bareos_repository/requirements.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -roles: - - name: robertdebock.bootstrap - -collections: - - name: ansible.posix - - name: community.general diff --git a/roles/bareos_repository/tasks/assert.yml b/roles/bareos_repository/tasks/assert.yml deleted file mode 100644 index 046d9ec..0000000 --- a/roles/bareos_repository/tasks/assert.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- - -- name: assert | Test bareos_repository_type - ansible.builtin.assert: - that: - - bareos_repository_type is defined - - bareos_repository_type in [ "community", "subscription" ] - quiet: yes - -- name: assert | Test bareos_repository_username - ansible.builtin.assert: - that: - - bareos_repository_username is defined - - bareos_repository_username is string - - bareos_repository_username != "" - quiet: yes - when: - - bareos_repository_type == "subscription" - -- name: assert | Test bareos_repository_password - ansible.builtin.assert: - that: - - bareos_repository_password is defined - - bareos_repository_password is string - - bareos_repository_password != "" - quiet: yes - when: - - bareos_repository_type == "subscription" - -- name: assert | Test bareos_repository_release - ansible.builtin.assert: - that: - - bareos_repository_release is defined - - bareos_repository_release in [ "current", "next", "release" ] - quiet: yes - -- name: assert | Test bareos_repository_version - ansible.builtin.assert: - that: - - bareos_repository_version is defined - - bareos_repository_version is number - - bareos_repository_version in [ 20, 21, 22, 23 ] - quiet: yes - when: - - bareos_repository_type == "subscription" - -- name: assert | Test bareos_repository_enable_tracebacks - ansible.builtin.assert: - that: - - bareos_repository_enable_tracebacks is defined - - bareos_repository_enable_tracebacks is boolean - quiet: yes diff --git a/roles/bareos_repository/tasks/main.yml b/roles/bareos_repository/tasks/main.yml deleted file mode 100644 index 0086137..0000000 --- a/roles/bareos_repository/tasks/main.yml +++ /dev/null @@ -1,150 +0,0 @@ ---- -# tasks file for bareos_repository - -- name: Import assert.yml - ansible.builtin.import_tasks: - file: assert.yml - run_once: yes - delegate_to: localhost - -- name: Add repository (rpm) - ansible.builtin.yum_repository: - name: "{{ item.name }}" - description: "{{ item.description }}" - baseurl: "{{ item.baseurl }}" - gpgcheck: yes - gpgkey: "{{ item.gpgkey }}" - username: "{{ item.username | default(omit) }}" - password: "{{ item.password | default(omit) }}" - no_log: yes - loop: "{{ bareos_repository_list }}" - loop_control: - label: "{{ item.name }}" - when: - - ansible_pkg_mgr in [ "dnf", "yum" ] - -- name: Run tasks on apt based distributions - when: - - ansible_pkg_mgr in [ "apt" ] - block: - - name: Install CA certificates (apt) - ansible.builtin.package: - name: ca-certificates - - - name: Download gpg key (apt) - ansible.builtin.get_url: - url: "{{ bareos_repository_gpg_key }}" - dest: /etc/apt/bareos.gpg - username: "{{ bareos_repository_username }}" - password: "{{ bareos_repository_password }}" - owner: root - group: root - mode: "0644" - no_log: yes - - - name: Place credentials file (apt) - ansible.builtin.copy: - content: | - machine download.bareos.com - login {{ bareos_repository_username }} - password {{ bareos_repository_password }} - dest: /etc/apt/auth.conf.d/download_bareos_com.conf - owner: root - group: root - mode: "0600" - no_log: yes - when: - - bareos_repository_type == "subscription" - - - name: Add repository (apt) - ansible.builtin.apt_repository: - repo: "{{ item.deb_repo }}" - state: present - filename: "{{ item.name }}" - update_cache: yes - no_log: yes - loop: "{{ bareos_repository_list }}" - loop_control: - label: "{{ item.name }}" - -- name: Run tasks on zypper based distributions - when: - - ansible_pkg_mgr in [ "zypper" ] - block: - - name: Download gpg key (zypper) - ansible.builtin.get_url: - url: "{{ bareos_repository_gpg_key }}" - dest: /etc/gnupg/bareos.gpg - username: "{{ bareos_repository_username }}" - password: "{{ bareos_repository_password }}" - owner: root - group: root - mode: "0644" - no_log: yes - - - name: Import gpg key (zypper) - ansible.builtin.rpm_key: - key: /etc/gnupg/bareos.gpg - - - name: Place credentials file (zypper) - ansible.builtin.copy: - content: | - username={{ bareos_repository_username }} - password={{ bareos_repository_password }} - dest: /etc/zypp/credentials.d/bareos - owner: root - group: root - mode: "0600" - no_log: yes - when: - - bareos_repository_type == "subscription" - - - name: Add repository (zypper) - community.general.zypper_repository: - name: "{{ item.name }}" - repo: "{{ item.repo }}" - state: present - loop: "{{ bareos_repository_list }}" - loop_control: - label: "{{ item.name }}" - -- name: Enable tracebacks - when: - - bareos_repository_enable_tracebacks - block: - - name: Add debuginfo repository (rpm) - ansible.builtin.yum_repository: - name: "{{ item.name }}" - description: "{{ item.description }}" - baseurl: "{{ item.baseurl }}" - gpgcheck: yes - gpgkey: "{{ item.gpgkey }}" - username: "{{ item.username | default(omit) }}" - password: "{{ item.password | default(omit) }}" - no_log: yes - loop: "{{ bareos_repository_debug_list }}" - loop_control: - label: "{{ item.name }}" - when: - - ansible_pkg_mgr in [ "dnf", "yum" ] - - - name: Add repository (zypper) - community.general.zypper_repository: - name: "{{ item.name }}" - repo: "{{ item.repo }}" - state: present - loop: "{{ bareos_repository_debug_list }}" - loop_control: - label: "{{ item.name }}" - when: - - ansible_pkg_mgr in [ "zypper" ] - - - name: Install required packages - ansible.builtin.package: - name: "{{ bareos_repository_debug_required_packages }}" - - - name: Disable ptrace_scope - ansible.posix.sysctl: - name: kernel.yama.ptrace_scope - value: "0" - sysctl_set: yes diff --git a/roles/bareos_repository/vars/main.yml b/roles/bareos_repository/vars/main.yml deleted file mode 100644 index fed1737..0000000 --- a/roles/bareos_repository/vars/main.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -# vars file for bareos_repository - -# The URL differs for community and subscription versions. -_bareos_repository_base_url: - community: "https://download.bareos.org" - subscription: "https://download.bareos.com/bareos" -bareos_repository_base_url: "{{ _bareos_repository_base_url[bareos_repository_type] }}" - -# Different distributions have different repository URLs. -_bareos_repository_url: - community: - default: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ ansible_distribution }}_{{ ansible_distribution_major_version }}" - Fedora: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ ansible_distribution }}_{{ ansible_distribution_major_version }}" - RedHat: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/EL_{{ ansible_distribution_major_version }}" - Suse: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/SUSE_{{ ansible_distribution_major_version }}" - Ubuntu: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/xUbuntu_{{ ansible_distribution_version }}" - subscription: - default: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ bareos_repository_version }}/{{ ansible_distribution }}_{{ ansible_distribution_major_version }}" - Fedora: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ bareos_repository_version }}/{{ ansible_distribution }}_{{ ansible_distribution_major_version }}" - RedHat: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ bareos_repository_version }}/EL_{{ ansible_distribution_major_version }}" - Suse: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ bareos_repository_version }}/SUSE_{{ ansible_distribution_major_version }}" - Ubuntu: "{{ bareos_repository_base_url }}/{{ bareos_repository_release }}/{{ bareos_repository_version }}/xUbuntu_{{ ansible_distribution_version }}" -bareos_repository_url: "{{ _bareos_repository_url[bareos_repository_type][ansible_distribution] | default(_bareos_repository_url[bareos_repository_type][ansible_os_family] | default(_bareos_repository_url[bareos_repository_type]['default'])) }}" - -# Debian and RedHat use a different structure. -_bareos_repository_gpg_key: - default: "{{ bareos_repository_url }}/RPM-GPG-KEY" - Debian: "{{ bareos_repository_url }}/bareos-keyring.gpg" -bareos_repository_gpg_key: "{{ _bareos_repository_gpg_key[ansible_os_family] | default(_bareos_repository_gpg_key['default']) }}" - -# A list of repositories. The items in this list contains parameters for both dnf/yum, apt and zypperz. -bareos_repository_list: - - name: bareos - description: Backup Archiving Recovery - baseurl: "{{ bareos_repository_url }}" - gpgkey: "{{ bareos_repository_gpg_key }}" - repo: "{{ bareos_repository_url }}" - deb_repo: "deb [signed-by=/etc/apt/bareos.gpg] {{ bareos_repository_url }} /" - username: "{{ bareos_repository_username | default(omit) }}" - password: "{{ bareos_repository_password | default(omit) }}" - -# A list of repositories for debug information. -bareos_repository_debug_list: - - name: bareos-debuginfo - description: Backup Archiving Recovery - Debuginfo - baseurl: "{{ bareos_repository_url }}/debug" - gpgkey: "{{ bareos_repository_gpg_key }}" - repo: "{{ bareos_repository_url }}/debug" - username: "{{ bareos_repository_username | default(omit) }}" - password: "{{ bareos_repository_password | default(omit) }}" - -# Extra packages are required to debug. -_bareos_repository_debug_required_packages: - default: - - procps - RedHat: - - procps-ng -bareos_repository_debug_required_packages: "{{ _bareos_repository_debug_required_packages[ansible_os_family] | default(_bareos_repository_debug_required_packages['default']) }}" diff --git a/roles/bareos_sd b/roles/bareos_sd new file mode 160000 index 0000000..344fab9 --- /dev/null +++ b/roles/bareos_sd @@ -0,0 +1 @@ +Subproject commit 344fab9c460766bd5da08e36320c49c2216a64de diff --git a/roles/bareos_sd/LICENSE b/roles/bareos_sd/LICENSE deleted file mode 100644 index 454a191..0000000 --- a/roles/bareos_sd/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Adfinis Copyright (C) 2023 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/roles/bareos_sd/README.md b/roles/bareos_sd/README.md deleted file mode 100644 index 5cad364..0000000 --- a/roles/bareos_sd/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# Ansible role [bareos_sd](#bareos_sd) - -Install and configure [Bareos](https://www.bareos.com/) Storage Daemon. - -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/adfinis/ansible-role-bareos_sd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_sd/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_sd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_sd)|[![downloads](https://img.shields.io/ansible/role/d/)](https://galaxy.ansible.com/adfinis/bareos_sd)|[![Version](https://img.shields.io/github/release/adfinis/ansible-role-bareos_sd.svg)](https://github.com/adfinis/ansible-role-bareos_sd/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from [`molecule/default/converge.yml`](https://github.com/adfinis/ansible-role-bareos_sd/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. - -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - role: adfinis.roles.bareos_sd - bareos_sd_backup_configurations: yes - bareos_sd_install_debug_packages: yes - bareos_sd_devices: - - name: "FileStorage" - description: "File device. A connecting Director must have the same Name and MediaType." - media_type: "File" - archive_device: "/var/lib/bareos/storage" - label_media: yes - random_access: yes - automatic_mount: yes - removable_media: no - always_open: no - maximum_concurrent_jobs: 1 - - name: "disabled-device" - enabled: no - bareos_sd_directors: - - name: bareos-dir - password: "somepassword" - - name: "disabled-director" - enabled: no - bareos_sd_messages: - - name: "Standard" - description: "Send relevant messages to the Director." - director: - server: bareos-dir - messages: - - all - - "!skipped" - - "!restored" - append: - file: "/var/log/bareos/bareos.log" - messages: - - all - - "!skipped" - - "!terminate" - console: - - all - - "!skipped" - - "!saved" - - name: "disabled-message" - enabled: no - bareos_sd_s3_profiles: - - name: exoscale - host: "sos.exo.io:443" - use_https: yes - access_key: "SomeAPIKey" - secret_key: "SomeSecret" - pricing_dir: "" - backend: "s3" - aws_auth_sign_version: 4 - aws_region: "ch-gva-2" -``` - -The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/adfinis/ansible-role-bareos_sd/blob/master/molecule/default/prepare.yml): - -```yaml ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - role: robertdebock.bootstrap - - role: adfinis.roles.bareos_repository - bareos_repository_enable_tracebacks: yes -``` - -These roles are provided as is, without warranty of any kind. Use it at your own risk. - -## [Role Variables](#role-variables) - -The default values for the variables are set in [`defaults/main.yml`](https://github.com/adfinis/ansible-role-bareos_sd/blob/master/defaults/main.yml): - -```yaml ---- -# defaults file for bareos_sd - -# The Storage Daemon has these configuration parameters. - -# Backup the configuration files. -bareos_sd_backup_configurations: no - -# Install debug packages. This requires the debug repositories to be enabled. -bareos_sd_install_debug_packages: no - -# The hostname of the Storage Daemon. -bareos_sd_hostname: "{{ inventory_hostname }}" - -# The messages configuration to use. -bareos_sd_message: "Standard" - -# The amount of jobs to run concurrently. -bareos_sd_max_concurrent_jobs: 20 - -# Enable TLS. -bareos_sd_tls_enable: yes - -# Verify the peer. -bareos_sd_tls_verify_peer: no - -# A list of devices to configure. -bareos_sd_devices: [] - -# A list of directors to connect to. -bareos_sd_directors: [] - -# A list of messages to send to the director. -bareos_sd_messages: [] - -# A list of S3 profiles to configure. -bareos_sd_s3_profiles: [] -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/adfinis/ansible-role-bareos_sd/blob/master/requirements.txt). - -## [State of used roles](#state-of-used-roles) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/adfinis/robertdebock.bootstrap)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap)| -|[adfinis.bareos_repository](https://galaxy.ansible.com/adfinis/bareos_repository)|[![Build Status GitHub](https://github.com/adfinis/ansible-role-bareos_repository/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_repository/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://adfinis.com/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/adfinis/ansible-role-bareos_sd/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|bookworm, bullseye, buster| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|7, 8, 9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|37, 38| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal| - -The minimum version of Ansible required is 2.12, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -If you find issues, please register them in [GitHub](https://github.com/adfinis/ansible-role-bareos_sd/issues). - -## [License](#license) - -[Apache-2.0](https://github.com/adfinis/ansible-role-bareos_sd/blob/master/LICENSE). - -## [Author Information](#author-information) - -[Adfinis](https://adfinis.com/) - diff --git a/roles/bareos_sd/defaults/main.yml b/roles/bareos_sd/defaults/main.yml deleted file mode 100644 index eaf653c..0000000 --- a/roles/bareos_sd/defaults/main.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# defaults file for bareos_sd - -# The Storage Daemon has these configuration parameters. - -# Backup the configuration files. -bareos_sd_backup_configurations: no - -# Install debug packages. This requires the debug repositories to be enabled. -bareos_sd_install_debug_packages: no - -# The hostname of the Storage Daemon. -bareos_sd_hostname: "{{ inventory_hostname }}" - -# The messages configuration to use. -bareos_sd_message: "Standard" - -# The amount of jobs to run concurrently. -bareos_sd_max_concurrent_jobs: 20 - -# Enable TLS. -bareos_sd_tls_enable: yes - -# Verify the peer. -bareos_sd_tls_verify_peer: no - -# A list of devices to configure. -bareos_sd_devices: [] - -# A list of directors to connect to. -bareos_sd_directors: [] - -# A list of messages to send to the director. -bareos_sd_messages: [] - -# A list of S3 profiles to configure. -bareos_sd_s3_profiles: [] diff --git a/roles/bareos_sd/handlers/main.yml b/roles/bareos_sd/handlers/main.yml deleted file mode 100644 index a026a61..0000000 --- a/roles/bareos_sd/handlers/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# handlers file for bareos_sd - -- name: Check configuration - ansible.builtin.command: "/usr/sbin/bareos-sd --test-config" - changed_when: false - -- name: Restart bareos-sd - ansible.builtin.service: - name: bareos-sd - state: restarted diff --git a/roles/bareos_sd/meta/argument_specs.yml b/roles/bareos_sd/meta/argument_specs.yml deleted file mode 100644 index 718c802..0000000 --- a/roles/bareos_sd/meta/argument_specs.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- - -argument_specs: - main: - short_description: "Install and configure BareOS Storage Daemon on your system." - description: > - Install and configure BareOS Storage Daemon on your system. - author: Adfinis - options: - bareos_sd_backup_configurations: - type: "bool" - default: no - description: "Backup the configuration files." - bareos_sd_hostname: - type: "str" - default: "{{ inventory_hostname }}" - description: "The hostname of the Storage Daemon." - bareos_sd_message: - type: "str" - default: "Standard" - description: "The messages configuration to use." - bareos_sd_max_concurrent_jobs: - type: "int" - default: 20 - description: "The amount of jobs to run concurrently." - bareos_sd_tls_enable: - type: "bool" - default: yes - description: "Enable TLS." - bareos_sd_tls_verify_peer: - type: "bool" - default: no - description: "Verify the peer." - bareos_sd_devices: - type: "list" - default: [] - description: "A list of devices to configure." - bareos_sd_directors: - type: "list" - default: [] - description: "A list of directors to connect to." - bareos_sd_messages: - type: "list" - default: [] - description: "A list of messages to send to the director." - bareos_sd_s3_profiles: - type: "list" - default: [] - description: "A list of S3 profiles to configure." - bareos_sd_install_debug_packages: - type: "bool" - default: no - description: "Install debug packages. This requires the debug repositories to be enabled." diff --git a/roles/bareos_sd/meta/main.yml b/roles/bareos_sd/meta/main.yml deleted file mode 100644 index 3fd8dac..0000000 --- a/roles/bareos_sd/meta/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -galaxy_info: - author: adfinis - role_name: bareos_sd - description: Install and configure [Bareos](https://www.bareos.com/) Storage Daemon. - license: Apache-2.0 - company: none - min_ansible_version: "2.12" - - platforms: - - name: Debian - versions: - - bookworm - - bullseye - - buster - - name: EL - versions: - - "7" - - "8" - - "9" - - name: Fedora - versions: - - "37" - - "38" - - name: opensuse - versions: - - all - - name: Ubuntu - versions: - - jammy - - focal - - galaxy_tags: - - bareos - - infrastructure - - linux - - storage - - system - - tools - -dependencies: [] diff --git a/roles/bareos_sd/requirements.yml b/roles/bareos_sd/requirements.yml deleted file mode 100644 index bcfbda7..0000000 --- a/roles/bareos_sd/requirements.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -roles: - - name: robertdebock.bootstrap - - name: adfinis.bareos_repository diff --git a/roles/bareos_sd/tasks/assert.yml b/roles/bareos_sd/tasks/assert.yml deleted file mode 100644 index 8658810..0000000 --- a/roles/bareos_sd/tasks/assert.yml +++ /dev/null @@ -1,87 +0,0 @@ ---- - -- name: assert | Test bareos_sd_backup_configurations - ansible.builtin.assert: - that: - - bareos_sd_backup_configurations is defined - - bareos_sd_backup_configurations is boolean - quiet: yes - -- name: assert | Test bareos_sd_install_debug_packages - ansible.builtin.assert: - that: - - bareos_sd_install_debug_packages is defined - - bareos_sd_install_debug_packages is boolean - quiet: yes - -- name: assert | Test bareos_sd_hostname - ansible.builtin.assert: - that: - - bareos_sd_hostname is defined - - bareos_sd_hostname is string - - bareos_sd_hostname is not none - quiet: yes - -- name: assert | Test bareos_sd_message - ansible.builtin.assert: - that: - - bareos_sd_message is defined - - bareos_sd_message is string - - bareos_sd_message is not none - quiet: yes - -- name: assert | Test bareos_sd_max_concurrent_jobs - ansible.builtin.assert: - that: - - bareos_sd_max_concurrent_jobs is defined - - bareos_sd_max_concurrent_jobs is number - quiet: yes - -- name: assert | Test bareos_sd_tls_enable - ansible.builtin.assert: - that: - - bareos_sd_tls_enable is defined - - bareos_sd_tls_enable is boolean - quiet: yes - -- name: assert | Test bareos_sd_tls_verify_peer - ansible.builtin.assert: - that: - - bareos_sd_tls_verify_peer is defined - - bareos_sd_tls_verify_peer is boolean - quiet: yes - -- name: assert | Test bareos_sd_directors - ansible.builtin.assert: - that: - - bareos_sd_directors is defined - - bareos_sd_directors is iterable - quiet: yes - -- name: assert | Test bareos_sd_devices - ansible.builtin.assert: - that: - - bareos_sd_devices is defined - - bareos_sd_devices is iterable - quiet: yes - -- name: assert | Test bareos_sd_directors - ansible.builtin.assert: - that: - - bareos_sd_directors is defined - - bareos_sd_directors is iterable - quiet: yes - -- name: assert | Test bareos_sd_messages - ansible.builtin.assert: - that: - - bareos_sd_messages is defined - - bareos_sd_messages is iterable - quiet: yes - -- name: assert | Test bareos_sd_s3_profiles - ansible.builtin.assert: - that: - - bareos_sd_s3_profiles is defined - - bareos_sd_s3_profiles is iterable - quiet: yes diff --git a/roles/bareos_sd/tasks/main.yml b/roles/bareos_sd/tasks/main.yml deleted file mode 100644 index 97508a3..0000000 --- a/roles/bareos_sd/tasks/main.yml +++ /dev/null @@ -1,111 +0,0 @@ ---- -# tasks file for bareos_sd - -- name: Import assert.yml - ansible.builtin.import_tasks: - file: assert.yml - run_once: yes - delegate_to: localhost - -- name: Install packages - ansible.builtin.package: - name: "{{ bareos_sd_packages }}" - -- name: Install debug packages - ansible.builtin.package: - name: "{{ bareos_sd_debug_packages }}" - when: - - bareos_sd_install_debug_packages - -- name: Place bareos-sd.conf - ansible.builtin.template: - src: bareos-sd.conf.j2 - dest: "/etc/bareos/bareos-sd.d/storage/bareos-sd.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_sd_backup_configurations }}" - notify: - - Check configuration - - Restart bareos-sd - -- name: Place device - ansible.builtin.template: - src: device.conf.j2 - dest: "/etc/bareos/bareos-sd.d/device/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_sd_backup_configurations }}" - loop: "{{ bareos_sd_devices }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Restart bareos-sd - -- name: Place director - ansible.builtin.template: - src: director.conf.j2 - dest: "/etc/bareos/bareos-sd.d/director/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_sd_backup_configurations }}" - loop: "{{ bareos_sd_directors }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Restart bareos-sd - -- name: Place message - ansible.builtin.template: - src: message.conf.j2 - dest: "/etc/bareos/bareos-sd.d/messages/{{ item.name }}.conf" - owner: bareos - group: bareos - mode: "0640" - backup: "{{ bareos_sd_backup_configurations }}" - loop: "{{ bareos_sd_messages }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Restart bareos-sd - -- name: Install bareos-storage-droplet. - ansible.builtin.package: - name: bareos-storage-droplet - when: - - bareos_sd_s3_profiles | length > 0 - -- name: Create /etc/bareos/bareos-sd.d/device/droplet - ansible.builtin.file: - path: /etc/bareos/bareos-sd.d/device/droplet - state: directory - owner: bareos - group: bareos - mode: "0755" - when: - - bareos_sd_s3_profiles | length > 0 - -- name: Place S3 profile - ansible.builtin.template: - src: s3.profile.j2 - dest: /etc/bareos/bareos-sd.d/device/droplet/{{ item.name }}.profile - owner: bareos - group: bareos - mode: "0600" - loop: "{{ bareos_sd_s3_profiles }}" - loop_control: - label: "{{ item.name }}" - notify: - - Check configuration - - Restart bareos-sd - -- name: Start bareos-sd - ansible.builtin.service: - name: bareos-sd - state: started - enabled: yes diff --git a/roles/bareos_sd/templates/.gitkeep b/roles/bareos_sd/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/roles/bareos_sd/templates/bareos-sd.conf.j2 b/roles/bareos_sd/templates/bareos-sd.conf.j2 deleted file mode 100644 index f1ae704..0000000 --- a/roles/bareos_sd/templates/bareos-sd.conf.j2 +++ /dev/null @@ -1,15 +0,0 @@ -{{ ansible_managed | comment }} - -Storage { - Name = "{{ bareos_sd_hostname }}" - Messages = "{{ bareos_sd_message }}" -{% if bareos_sd_max_concurrent_jobs != 20 %} - Maximum Concurrent Jobs = {{ bareos_sd_max_concurrent_jobs }} -{% endif %} -{% if not bareos_sd_tls_enable %} - TLS Enable = No -{% endif %} -{% if bareos_sd_tls_verify_peer %} - TLS Verify Peer = Yes -{% endif %} -} diff --git a/roles/bareos_sd/templates/device.conf.j2 b/roles/bareos_sd/templates/device.conf.j2 deleted file mode 100644 index 990287e..0000000 --- a/roles/bareos_sd/templates/device.conf.j2 +++ /dev/null @@ -1,28 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Device { - Name = "{{ item.name }}" -{% if item.description is defined %} - Description = "{{ item.description }}" -{% endif %} -{% if item.maximum_concurrent_jobs is defined %} - Maximum Concurrent Jobs = {{ item.maximum_concurrent_jobs }} -{% endif %} - Media Type = "{{ item.media_type }}" - Archive Device = "{{ item.archive_device }}" -{% if item.device_type is defined %} - Device Type = "{{ item.device_type }}" -{% endif %} -{% if item.device_options is defined %} - Device Options = "{{ item.device_options }}" -{% endif %} - LabelMedia = {{ item.label_media | ternary('yes', 'No') }} - Random Access = {{ item.random_access | ternary('yes', 'No') }} - AutomaticMount = {{ item.automatic_mount | ternary('yes', 'No') }} - RemovableMedia = {{ item.removable_media | ternary('yes', 'No') }} - AlwaysOpen = {{ item.always_open | ternary('yes', 'No') }} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_sd/templates/director.conf.j2 b/roles/bareos_sd/templates/director.conf.j2 deleted file mode 100644 index 6a1be4c..0000000 --- a/roles/bareos_sd/templates/director.conf.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Director { - Name = "{{ item.name }}" - Password = "{{ item.password }}" -{% if item.tls_enable is defined %} - TLS Enable = {{ item.tls_enable | ternary('Yes', 'No') }} -{% endif %} -{% if item.tls_verify_peer is defined %} - TLS Verify Peer = {{ item.tls_verify_peer | ternary('Yes', 'No') }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_sd/templates/message.conf.j2 b/roles/bareos_sd/templates/message.conf.j2 deleted file mode 100644 index baebbf2..0000000 --- a/roles/bareos_sd/templates/message.conf.j2 +++ /dev/null @@ -1,19 +0,0 @@ -{{ ansible_managed | comment }} - -{% if item.enabled is defined and item.enabled or item.enabled is not defined %} -Messages { - Name = "{{ item.name }}" - Description = "{{ item.description }}" -{% if item.director is defined %} - Director = {{ item.director.server }} = {{ item.director.messages | join(', ') }} -{% endif %} -{% if item.append is defined %} - Append = "{{ item.append.file }}" = {{ item.append.messages | join(', ') }} -{% endif %} -{% if item.console is defined %} - Console = {{ item.console | join(', ') }} -{% endif %} -} -{% else %} -# This file is not enabled. -{% endif %} diff --git a/roles/bareos_sd/templates/s3.profile.j2 b/roles/bareos_sd/templates/s3.profile.j2 deleted file mode 100644 index c5a2b63..0000000 --- a/roles/bareos_sd/templates/s3.profile.j2 +++ /dev/null @@ -1,10 +0,0 @@ -{{ ansible_managed | comment }} - -host = "{{ item.host }}" -use_https = {{ item.use_https | ternary("true", "false") }} -access_key = {{ item.access_key }} -secret_key = {{ item.secret_key }} -pricing_dir = "{{ item.pricing_dir }}" -backend = {{ item.backend }} -aws_auth_sign_version = {{ item.aws_auth_sign_version }} -aws_region = {{ item.aws_region }} diff --git a/roles/bareos_sd/vars/main.yml b/roles/bareos_sd/vars/main.yml deleted file mode 100644 index c577c38..0000000 --- a/roles/bareos_sd/vars/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# vars file for bareos_sd - -bareos_sd_packages: - - bareos-storage - - bareos-storage-tape - -# A map to define the packages to install for debugging. -_bareos_sd_debug_packages: - default: - - bareos-storage-debuginfo - - gdb - Debian: - - bareos-dbg - - gdb - RedHat-7: - - bareos-debuginfo - - gdb -bareos_sd_debug_packages: "{{ _bareos_sd_debug_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_bareos_sd_debug_packages[ansible_os_family] | default(_bareos_sd_debug_packages['default'])) }}" diff --git a/roles/bareos_webui b/roles/bareos_webui new file mode 160000 index 0000000..107f9a9 --- /dev/null +++ b/roles/bareos_webui @@ -0,0 +1 @@ +Subproject commit 107f9a99480aa7c676bcac38f7008ac19665e5f0 diff --git a/roles/bareos_webui/LICENSE b/roles/bareos_webui/LICENSE deleted file mode 100644 index 454a191..0000000 --- a/roles/bareos_webui/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Adfinis Copyright (C) 2023 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/roles/bareos_webui/README.md b/roles/bareos_webui/README.md deleted file mode 100644 index 8ba737e..0000000 --- a/roles/bareos_webui/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# Ansible role [bareos_webui](#bareos_webui) - -Install and configure [Bareos](https://www.bareos.com/) WebUI on your system. - -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/adfinis/ansible-role-bareos_webui/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_webui/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_webui/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_webui)|[![downloads](https://img.shields.io/ansible/role/d/)](https://galaxy.ansible.com/adfinis/bareos_webui)|[![Version](https://img.shields.io/github/release/adfinis/ansible-role-bareos_webui.svg)](https://github.com/adfinis/ansible-role-bareos_webui/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from [`molecule/default/converge.yml`](https://github.com/adfinis/ansible-role-bareos_webui/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. - -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - role: adfinis.roles.bareos_webui - bareos_webui_directors: - - name: localhost-dir - enabled: yes - diraddress: localhost - - name: disabled-dir - enabled: no -``` - -The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/adfinis/ansible-role-bareos_webui/blob/master/molecule/default/prepare.yml): - -```yaml ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - role: robertdebock.bootstrap - - role: adfinis.roles.bareos_repository -``` - -These roles are provided as is, without warranty of any kind. Use it at your own risk. - -## [Role Variables](#role-variables) - -The default values for the variables are set in [`defaults/main.yml`](https://github.com/adfinis/ansible-role-bareos_webui/blob/master/defaults/main.yml): - -```yaml ---- -# defaults file for bareos_webui - -bareos_webui_configuration: - - section: session - option: timeout - value: 3600 - -bareos_webui_directors: [] -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/adfinis/ansible-role-bareos_webui/blob/master/requirements.txt). - -## [State of used roles](#state-of-used-roles) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/adfinis/robertdebock.bootstrap)|[![Build Status GitHub](https://github.com/adfinis/robertdebock.bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/robertdebock.bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/robertdebock.bootstrap)| -|[adfinis.bareos_repository](https://galaxy.ansible.com/adfinis/bareos_repository)|[![Build Status GitHub](https://github.com/adfinis/ansible-role-bareos_repository/workflows/Ansible%20Molecule/badge.svg)](https://github.com/adfinis/ansible-role-bareos_repository/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bareos_repository)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://adfinis.com/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/adfinis/ansible-role-bareos_webui/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|bookworm, bullseye, buster| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|8, 9| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|37, 38| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|jammy, focal| - -The minimum version of Ansible required is 2.12, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -If you find issues, please register them in [GitHub](https://github.com/adfinis/ansible-role-bareos_webui/issues). - -## [License](#license) - -[Apache-2.0](https://github.com/adfinis/ansible-role-bareos_webui/blob/master/LICENSE). - -## [Author Information](#author-information) - -[Adfinis](https://adfinis.com/) - diff --git a/roles/bareos_webui/defaults/main.yml b/roles/bareos_webui/defaults/main.yml deleted file mode 100644 index de86fb8..0000000 --- a/roles/bareos_webui/defaults/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# defaults file for bareos_webui - -bareos_webui_configuration: - - section: session - option: timeout - value: 3600 - -bareos_webui_directors: [] diff --git a/roles/bareos_webui/handlers/main.yml b/roles/bareos_webui/handlers/main.yml deleted file mode 100644 index b5a6a95..0000000 --- a/roles/bareos_webui/handlers/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# handlers file for bareos_webui - -- name: Restart httpd - ansible.builtin.service: - name: "{{ bareos_webui_httpd_service }}" - state: restarted diff --git a/roles/bareos_webui/meta/argument_specs.yml b/roles/bareos_webui/meta/argument_specs.yml deleted file mode 100644 index c3b4b42..0000000 --- a/roles/bareos_webui/meta/argument_specs.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- - -# # bareos_dir_messages: Daemon - -argument_specs: - main: - short_description: "Install and configure BareOS WebUI on your system." - description: > - Install and configure BareOS WebUI on your system. - author: Adfinis - options: - bareos_webui_directors: - type: "list" - description: "A list of directors to connect to.." - bareos_webui_configuration: - type: "list" - description: "Configuration for the webui." diff --git a/roles/bareos_webui/meta/main.yml b/roles/bareos_webui/meta/main.yml deleted file mode 100644 index 914991e..0000000 --- a/roles/bareos_webui/meta/main.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -galaxy_info: - author: adfinis - role_name: bareos_webui - description: Install and configure [Bareos](https://www.bareos.com/) WebUI on your system. - license: Apache-2.0 - company: none - min_ansible_version: "2.12" - - platforms: - - name: Debian - versions: - - bookworm - - bullseye - - buster - - name: EL - versions: - - "8" - - "9" - - name: Fedora - versions: - - "37" - - "38" - - name: Ubuntu - versions: - - jammy - - focal - - galaxy_tags: - - backup - - bareos - - infrastructure - - linux - - storage - - system - - tools - -dependencies: [] diff --git a/roles/bareos_webui/requirements.yml b/roles/bareos_webui/requirements.yml deleted file mode 100644 index 3f83ca7..0000000 --- a/roles/bareos_webui/requirements.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -roles: - - name: robertdebock.bootstrap - - name: adfinis.bareos_repository -collections: - - name: ansible.posix - - name: community.general diff --git a/roles/bareos_webui/tasks/assert.yml b/roles/bareos_webui/tasks/assert.yml deleted file mode 100644 index 5b69704..0000000 --- a/roles/bareos_webui/tasks/assert.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- - -- name: assert | Test bareos_webui_directors - ansible.builtin.assert: - that: - - bareos_webui_directors is defined - - bareos_webui_directors is iterable - quiet: yes - -- name: assert | Test items in bareos_webui_directors are set correctly when enabled - ansible.builtin.assert: - that: - - item.name is defined - - item.name is string - - item.enabled is defined - - item.enabled is boolean - - item.diraddress is defined - - item.diraddress is string - quiet: yes - loop: "{{ bareos_webui_directors }}" - loop_control: - label: "{{ item.name }}" - when: - - item.enabled - -- name: assert | Test items in bareos_webui_directors are set correctly when not enabled - ansible.builtin.assert: - that: - - item.name is defined - - item.name is string - - item.enabled is defined - - item.enabled is boolean - quiet: yes - loop: "{{ bareos_webui_directors }}" - loop_control: - label: "{{ item.name }}" - when: - - not item.enabled - -- name: assert | Test bareos_webui_configuration - ansible.builtin.assert: - that: - - bareos_webui_configuration is defined - - bareos_webui_configuration is iterable - quiet: yes - -- name: assert | Test items in bareos_webui_configuration are set correctly - ansible.builtin.assert: - that: - - item.section is defined - - item.section is string - - item.option is defined - - item.option is string - - item.value is defined - quiet: yes - loop: "{{ bareos_webui_configuration }}" - loop_control: - label: "{{ item.section }}:{{ item.option }}" diff --git a/roles/bareos_webui/tasks/main.yml b/roles/bareos_webui/tasks/main.yml deleted file mode 100644 index 4a6aacd..0000000 --- a/roles/bareos_webui/tasks/main.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -# tasks file for bareos_webui - -- name: Import assert.yml - ansible.builtin.import_tasks: - file: assert.yml - run_once: yes - delegate_to: localhost - -- name: Install requirements - ansible.builtin.package: - name: "{{ bareos_webui_requirements }}" - -- name: Install bareos-webui - ansible.builtin.package: - name: bareos-webui - notify: - - Restart httpd - -- name: Set "enabled" in directors.ini - community.general.ini_file: - path: /etc/bareos-webui/directors.ini - section: "{{ item.name }}" - option: enabled - value: "{{ item.enabled | ternary('Yes', 'No') }}" - owner: root - group: root - mode: "0644" - loop: "{{ bareos_webui_directors }}" - loop_control: - label: "{{ item.name }}" - -- name: Set "diraddress" in directors.ini - community.general.ini_file: - path: /etc/bareos-webui/directors.ini - section: "{{ item.name }}" - option: diraddress - value: "{{ item.diraddress }}" - owner: root - group: root - mode: "0644" - loop: "{{ bareos_webui_directors }}" - loop_control: - label: "{{ item.name }}" - when: - - item.enabled - -- name: Set settings for configuration.ini - community.general.ini_file: - path: /etc/bareos-webui/configuration.ini - section: "{{ item.section }}" - option: "{{ item.option }}" - value: "{{ item.value }}" - owner: root - group: root - mode: "0644" - loop: "{{ bareos_webui_configuration }}" - loop_control: - label: "{{ item.section }}:{{ item.option }}" - -- name: Set SELinux boolean httpd_can_network_connect - ansible.posix.seboolean: - name: httpd_can_network_connect - state: yes - persistent: yes - when: - - ansible_selinux.status is defined - - ansible_selinux.status == "enabled" diff --git a/roles/bareos_webui/vars/main.yml b/roles/bareos_webui/vars/main.yml deleted file mode 100644 index d27562f..0000000 --- a/roles/bareos_webui/vars/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# vars file for bareos_webui - -_bareos_webui_requirements: - default: [] - Debian: - - libapache2-mod-php - -bareos_webui_requirements: "{{ _bareos_webui_requirements[ansible_os_family] | default(_bareos_webui_requirements['default']) }}" - -_bareos_webui_httpd_service: - default: httpd - Alpine: apache2 - Debian: apache2 - RedHat: httpd - -bareos_webui_httpd_service: "{{ _bareos_webui_httpd_service[ansible_os_family] | default(_bareos_webui_httpd_service['default']) }}"