Skip to content

Commit

Permalink
Merge pull request #34 from mila-iqia/FixIssue/33
Browse files Browse the repository at this point in the history
Allow multiple sto devices, max concurrent jobs conf
  • Loading branch information
btravouillon authored Apr 19, 2024
2 parents 6bf88d3 + 5095326 commit e34b3b4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ bareos_dir_storage:
device: FileStorageFoo
bareos_dir_ip: 10.0.0.1
media_type: File2 # optional, defaults to 'File'
max_concurrent_jobs: 42 # optional, defaults to '50'
```
`device` can also become `devices` if you have multiple devices :
```
bareos_dir_storage:
- name: FileFoo
devices:
- FileStorageFoo
- FileStorageBar
bareos_dir_ip: 10.0.0.1
media_type: File2 # optional, defaults to 'File'
max_concurrent_jobs: 42 # optional, defaults to '50'
```

`bareos_devices`: List of devices in following format:
Expand All @@ -99,6 +111,7 @@ bareos_devices:
opts: '' # optional, for ansible.posix.mount
state: 'mounted' # default, for ansible.posix.mount
media_type: File2 # optional, defaults to 'File'
max_concurrent_jobs: 42 # optional, defaults to '50'
```

> [!WARNING]
Expand Down
8 changes: 7 additions & 1 deletion templates/bareos-dir/storage/storage.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Storage {
Address = "{{ item.bareos_dir_ip }}"
Password = "{{ bareos_storage_password }}"
Media Type = {{ item.media_type | default('File') }}
{% if item.devices is defined %}
{% for device in item.devices %}
Device = {{ device }}
{% endfor %}
{% else %}
Device = {{ item.device }}
Maximum Concurrent Jobs = 50
{% endif %}
Maximum Concurrent Jobs = {{ item.max_concurrent_jobs | default('50') }}
}
2 changes: 1 addition & 1 deletion templates/bareos-sd/device/device.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Device {
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
Maximum Concurrent Jobs = 50
Maximum Concurrent Jobs = {{ item.max_concurrent_jobs | default('50') }}
}

0 comments on commit e34b3b4

Please sign in to comment.