community / community.general / 2.5.9 / module / nomad_job Launch a Nomad Job | "added in version" 1.3.0 of community.general" Authors: FERREIRA Christophe (@chris93111)community.general.nomad_job (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Launch a Nomad job.
Stop a Nomad job.
Force start a Nomad job
- name: Create job community.general.nomad_job: host: localhost state: present content: "{{ lookup('ansible.builtin.file', 'job.hcl') }}" timeout: 120
- name: Stop job community.general.nomad_job: host: localhost state: absent name: api
- name: Force job to start community.general.nomad_job: host: localhost state: present name: api timeout: 120 force_start: true
host: description: - FQDN of Nomad server. required: true type: str name: description: - Name of job for delete, stop and start job without source. - Name of job for delete, stop and start job without source. - Either this or I(content) must be specified. type: str state: choices: - present - absent description: - Deploy or remove job. required: true type: str token: description: - ACL token for authentification. type: str content: description: - Content of Nomad job. - Either this or I(name) must be specified. type: str timeout: default: 5 description: - Timeout (in seconds) for the request to Nomad. type: int use_ssl: default: true description: - Use TLS/SSL connection. type: bool namespace: description: - Namespace for Nomad. type: str client_key: description: - Path of certificate's private key for TLS/SSL. type: path client_cert: description: - Path of certificate for TLS/SSL. type: path force_start: default: false description: - Force job to started. type: bool content_format: choices: - hcl - json default: hcl description: - Type of content of Nomad job. type: str validate_certs: default: true description: - Enable TLS/SSL certificate validation. type: bool