This playbook installs Bacula components and performs basic daemon validation.
- name: Configure Bacula host
hosts: bacula
become: true
tasks:
- name: Install Bacula packages
ansible.builtin.package:
name:
- bacula-director
- bacula-sd
- bacula-fd
- bacula-console
state: present
- name: Ensure /etc/bacula exists
ansible.builtin.file:
path: /etc/bacula
state: directory
mode: "0755"
- name: Validate Bacula file daemon syntax
ansible.builtin.command: bacula-fd -t -c /etc/bacula/bacula-fd.conf
register: bacula_fd_test
changed_when: false
failed_when: false
- name: Show validation output
ansible.builtin.debug:
var: bacula_fd_test.stdout_lines