Skip to content

Commit

Permalink
Add filename to taskname, cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed May 22, 2023
1 parent 3f4ad2e commit c91d165
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ exclude_paths:

skip_list:
- yaml[truthy]

enable_list:
- name[prefix]
18 changes: 9 additions & 9 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---

- name: Test if hashicorp_installation_method is set correctly
- name: assert | Test if hashicorp_installation_method is set correctly
ansible.builtin.assert:
that:
- hashicorp_installation_method is defined
- hashicorp_installation_method in [ "package", "manual" ]
quiet: yes

- name: Test if hashicorp_products is set correctly
- name: assert | Test if hashicorp_products is set correctly
ansible.builtin.assert:
that:
- hashicorp_products is iterable
quiet: yes
when:
- hashicorp_products is defined

- name: Test if item in hashicorp_products is set correctly (package)
- name: assert | Test if item in hashicorp_products is set correctly (package)
ansible.builtin.assert:
that:
- item.name is string
Expand All @@ -28,7 +28,7 @@
- hashicorp_products is defined
- hashicorp_installation_method == "package"

- name: Test if item in hashicorp_products is set correctly (package with version)
- name: assert | Test if item in hashicorp_products is set correctly (package with version)
ansible.builtin.assert:
that:
- item.name is string
Expand All @@ -42,7 +42,7 @@
- hashicorp_installation_method == "package"
- item.version is defined

- name: Test if item in hashicorp_products is set correctly (manual)
- name: assert | Test if item in hashicorp_products is set correctly (manual)
ansible.builtin.assert:
that:
- item.name is string
Expand All @@ -59,28 +59,28 @@
- hashicorp_products is defined
- hashicorp_installation_method == "manual"

- name: Test if hashicorp_destination is set correctly
- name: assert | Test if hashicorp_destination is set correctly
ansible.builtin.assert:
that:
- hashicorp_destination is defined
- hashicorp_destination is string
quiet: yes

- name: Test if hashicorp_group is set correctly
- name: assert | Test if hashicorp_group is set correctly
ansible.builtin.assert:
that:
- hashicorp_group is defined
- hashicorp_group is string
quiet: yes

- name: Test if hashicorp_owner is set correctly
- name: assert | Test if hashicorp_owner is set correctly
ansible.builtin.assert:
that:
- hashicorp_owner is defined
- hashicorp_owner is string
quiet: yes

- name: Test if hashicorp_mode is set correctly
- name: assert | Test if hashicorp_mode is set correctly
ansible.builtin.assert:
that:
- hashicorp_mode is defined
Expand Down

0 comments on commit c91d165

Please sign in to comment.