From 295d63abb0b821cbc2b3bbdd97a5507fcf926384 Mon Sep 17 00:00:00 2001 From: tpiccioli Date: Tue, 18 Oct 2022 14:35:20 +0200 Subject: [PATCH] initial config --- defaults/main.yml | 14 +++++++++++++- meta/main.yml | 41 +++++++++++++++++++++++++++++++++-------- tasks/main.yml | 23 ++++++++++++++++++++++- 3 files changed, 68 insertions(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 95d3c70..48aeaa3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,14 @@ --- -# defaults file for ansible-role-template \ No newline at end of file +# defaults file for ansible-role-template + +bareos_server_packages: + - bareos-bconsole + - bareos-database-postgresql + - bareos-database-tools + - bareos-storage + +bareos_server_webui_packages: + - bareos-webui + +bareos_server_webui: True + diff --git a/meta/main.yml b/meta/main.yml index 81bda14..949c6ac 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,12 +1,19 @@ galaxy_info: author: your name description: your description - company: your company (optional) + company: ISTI-CNR # If the issue tracker for your role is not on github, uncomment the # next line and provide a value - issue_tracker_url: https://support.d4science.org/projects/automatic-provisioning/issues + issue_tracker_url: https://redmine-s2i2s.isti.cnr.it/projects/provisioning + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY license: EUPL-1.2 min_ansible_version: 2.8 @@ -28,10 +35,17 @@ galaxy_info: # To view available platforms and versions (or releases), visit: # https://galaxy.ansible.com/api/v1/platforms/ # - platforms: - - name: Ubuntu - versions: - - bionic + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 galaxy_tags: [] # List tags for your role here, one per line. A tag is a keyword that describes @@ -41,6 +55,17 @@ galaxy_info: # NOTE: A tag is limited to a single word comprised of alphanumeric characters. # Maximum 20 tags per role. -dependencies: [] +dependencies: # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. \ No newline at end of file + # if you add dependencies to this list. + - src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-apache.git + version: master + name: apache + state: latest + - src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-postgresql.git + version: master + name: postgresql + state: latest + + + diff --git a/tasks/main.yml b/tasks/main.yml index 53c6cae..b41d98d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,2 +1,23 @@ --- -# tasks file for ansible-role-template \ No newline at end of file +# tasks file for ansible-role-template +- name: Install the repository if required, and the packages + block: + + - name: Add an Apt signing key, uses whichever key is at the URL + apt_key: + url: https://download.bareos.org//bareos/release/current/xUbuntu_22.04/bareos-keyring.gpg + state: present + + - name: Install the BareOS repo + apt_repository: repo="https://download.bareos.org/bareos/current/xUbuntu_22.04" state=present update_cache=yes + + - name: Install the BareOS required packages + apt: pkg={{ bareos_server_packages }} state=present update_cache=yes cache_valid_time=3600 + + - name: Install the BareOS webui packages + apt: pkg={{ bareos_server_webui_packages }} state=present update_cache=yes cache_valid_time=3600 + when: bareos_server_webui + + tags: [ 'bareos', 'bareos_packages' ] + +