17 lines
596 B
YAML
17 lines
596 B
YAML
|
---
|
|||
|
# The home-server project produces a multi-purpose setup using Ansible.
|
|||
|
# Copyright © 2018–2023 Y. Gablin, under the GPL-3.0-or-later license.
|
|||
|
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
|
|||
|
|
|||
|
# mandatory parameters: pkg_name
|
|||
|
|
|||
|
- name: OPM → check existence of {{pkg_name}}
|
|||
|
shell: /opt/openresty/bin/opm list | grep -q '^{{pkg_name}}[[:blank:]]'
|
|||
|
ignore_errors: true
|
|||
|
changed_when: false
|
|||
|
register: opm_check
|
|||
|
|
|||
|
- name: OPM → install {{pkg_name}}
|
|||
|
command: /opt/openresty/bin/opm get {{pkg_name}}
|
|||
|
when: opm_check is failed
|