nick_invision.required

Required

This is a basic role that checks if certain variables are set and if specific paths exist. It is designed to run first in a playbook to quickly identify issues instead of waiting for tasks that depend on these variables or paths.

Requirements

No additional requirements.

Role Variables

No default variables are defined. However, if any of the following are specified, the corresponding check will be performed:

# If provided, checks that the variable is defined and not empty
required_vars
# If provided, checks for the existence of the path locally
required_local_paths
# If provided, checks for the existence of the path on each remote machine
required_remote_paths

Dependencies

No dependencies.

Example Playbook

- name: Validate Prerequisites
  include_role:
    name: nick_invision.required
  vars:
    required_vars:
      - an_important_var
      - another_important_var
- name: Validate Prerequisites
  include_role:
    name: nick_invision.required
  vars:
    required_local_paths:
      - ~/something/locally/important.txt
      - something/locally/relatively/important.txt
      - /something/locally/absolutely/important.txt
- name: Validate Prerequisites
  include_role:
    name: nick_invision.required
  vars:
    required_remote_paths:
      - ~/something/remote/important.txt
      - something/remote/relatively/important.txt
      - /something/remote/absolutely/important.txt
- name: Validate Prerequisites
  include_role:
    name: nick_invision.required
  vars:
    required_vars:
      - an_important_var
      - another_important_var
    required_local_paths:
      - ~/something/locally/important.txt
      - something/locally/relatively/important.txt
      - /something/locally/absolutely/important.txt
    required_remote_paths:
      - ~/something/remote/important.txt
      - something/remote/relatively/important.txt
      - /something/remote/absolutely/important.txt

License

MIT

Informazioni sul progetto

Asserts that required items exists

Installa
ansible-galaxy install nick_invision.required
Licenza
Unknown
Download
255
Proprietario