Skip to content

Commit

Permalink
feat(plugins): argument specs, replace yes to true
Browse files Browse the repository at this point in the history
  • Loading branch information
adf-patrickha committed Jan 17, 2024
1 parent a84f210 commit b559ddb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
4 changes: 4 additions & 0 deletions meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ argument_specs:
type: "str"
default: ""
description: "The master public key to use."
bareos_fd_plugins:
type: "list"
default: []
description: "Bareos plugins to install on the FD"
33 changes: 20 additions & 13 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,87 @@
that:
- bareos_fd_backup_configurations is defined
- bareos_fd_backup_configurations is boolean
quiet: yes
quiet: true

- 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
quiet: true

- 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
quiet: true

- 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
quiet: true

- 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
quiet: true

- 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
quiet: true

- 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
quiet: true

- 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
quiet: true

- name: assert | Test bareos_fd_directors
ansible.builtin.assert:
that:
- bareos_fd_directors is defined
- bareos_fd_directors is iterable
quiet: yes
quiet: true

- name: assert | Test bareos_fd_messages
ansible.builtin.assert:
that:
- bareos_fd_messages is defined
- bareos_fd_messages is iterable
quiet: yes
quiet: true

- 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
quiet: true

- 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
quiet: true
when:
- bareos_fd_encryption_enabled

Expand All @@ -95,6 +95,13 @@
- bareos_fd_encryption_master_public_key is defined
- bareos_fd_encryption_master_public_key is string
- bareos_fd_encryption_master_public_key != ""
quiet: yes
quiet: true
when:
- bareos_fd_encryption_enabled

- name: assert | Test bareos_fd_plugins
ansible.builtin.assert:
that:
- bareos_fd_plugins is defined
- bareos_fd_plugins is iterable
quiet: true

0 comments on commit b559ddb

Please sign in to comment.