Skip to content

Commit

Permalink
chore: add bareos_dir_overwrite_dir_conf option
Browse files Browse the repository at this point in the history
  • Loading branch information
adf-patrickha committed Dec 11, 2024
1 parent f04f512 commit dd6d9eb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# The director has these configuration parameters.

# Backup the configuration files.
bareos_dir_backup_configurations: no
bareos_dir_backup_configurations: false

# Install debug packages. This requires the debug repositories to be enabled.
bareos_dir_install_debug_packages: no
bareos_dir_install_debug_packages: false

# The hostname of the Director.
bareos_dir_hostname: "{{ inventory_hostname }}"
Expand Down
13 changes: 11 additions & 2 deletions meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ argument_specs:
bareos_dir_pam_auth_username:
type: "str"
default: "pam-adduser"
description: >
description: >-
Technical user account for the Bareos Console connection.
Required to be able to add the user resources in Bareos, after a successful PAM authentication.
bareos_dir_pam_auth_password:
Expand All @@ -200,7 +200,16 @@ argument_specs:
bareos_dir_pam_auth_tls_enable:
type: "bool"
default: false
description: >
description: >-
If TLS should be used for the Bareos Console
WebUI does not support pre-shared keys (PSK), so if this is desired,
an actual CA and certificates need to be in place.
bareos_dir_overwrite_dir_conf:
type: "bool"
default: true
description: >-
This variable is used to control the behavior of applying the bareos-dir.conf template
in /etc/bareos/bareos-dir.d/director/bareos-dir.conf everytime.
The bareos_dir role is also intended to deploy the client (Filedaemon) configurations on
the Director. If multiple separate repositories are used then this variable can be set to false,
so not all repositories overwrite the "global" Director configuration.
7 changes: 7 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,10 @@
- bareos_dir_plugin_list is defined
- bareos_dir_plugin_list is iterable
quiet: true

- name: assert | bareos_dir_overwrite_dir_conf
ansible.builtin.assert:
that:
- bareos_dir_overwrite_dir_conf is defined
- bareos_dir_overwrite_dir_conf is boolean
quiet: true
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
group: bareos
mode: "0640"
backup: "{{ bareos_dir_backup_configurations }}"
when:
- bareos_dir_overwrite_dir_conf
notify:
- Check configuration
- Reload bareos-dir
Expand Down

0 comments on commit dd6d9eb

Please sign in to comment.