community.general.nomad_job – Launch a Nomad Job¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.nomad_job
.
New in version 1.3.0: of community.general
Parameters¶
See Also¶
See also
- Nomad jobs documentation
Complete documentation for Nomad API jobs.
Examples¶
- 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
Authors¶
FERREIRA Christophe (@chris93111)