Skip to content

Commit

Permalink
Test is a defined variable is a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Nov 27, 2020
1 parent 7f133a6 commit e334464
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,50 @@
assert:
that:
- ca_passphrase is defined
- ca_passphrase is string
quiet: yes

- name: test if ca_common_name is set correctly
assert:
that:
- ca_common_name is defined
- ca_common_name is string
quiet: yes

- name: test if ca_country_name is set correctly
assert:
that:
- ca_country_name is defined
- ca_country_name is string
- ca_country_name | length <= 2
quiet: yes

- name: test if ca_email_address is set correctly
assert:
that:
- ca_email_address is defined
- ca_email_address is string
quiet: yes

- name: test if ca_organization_name is set correctly
assert:
that:
- ca_organization_name is defined
- ca_organization_name is string
quiet: yes

- name: test if ca_organizational_unit_name is set correctly
assert:
that:
- ca_organizational_unit_name is defined
- ca_organizational_unit_name is string
quiet: yes

- name: test if ca_state_or_province_name is set correctly
assert:
that:
- ca_state_or_province_name is defined
- ca_state_or_province_name is string
quiet: yes

- name: test if ca_requests is set correctly
Expand All @@ -55,6 +62,7 @@
assert:
that:
- item is defined
- item is string
quiet: yes
loop: "{{ ca_requests }}"
when:
Expand All @@ -65,40 +73,47 @@
assert:
that:
- ca_publication_location is defined
- ca_publication_location is string
quiet: yes

- name: test if ca_openssl_path is set correctly
assert:
that:
- ca_openssl_path is defined
- ca_openssl_path is string
quiet: yes

- name: test if ca_private_path is set correctly
assert:
that:
- ca_private_path is defined
- ca_private_path is string
quiet: yes

- name: test if ca_certs_path is set correctly
assert:
that:
- ca_certs_path is defined
- ca_certs_path is string
quiet: yes

- name: test if ca_privatekey_path is set correctly
assert:
that:
- ca_privatekey_path is defined
- ca_privatekey_path is string
quiet: yes

- name: test if ca_csr_path is set correctly
assert:
that:
- ca_csr_path is defined
- ca_csr_path is string
quiet: yes

- name: test if ca_certificate_path is set correctly
assert:
that:
- ca_certificate_path is defined
- ca_certificate_path is string
quiet: yes

0 comments on commit e334464

Please sign in to comment.