home-server/roles/dmz_nginx/tasks/opm.yaml

17 lines
596 B
YAML
Raw Normal View History

2023-12-30 16:32:52 +01:00
---
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 20182023 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