32 lines
885 B
YAML
32 lines
885 B
YAML
---
|
|
#
|
|
# Tasks to reconfigure Gnocchi API wsgi service
|
|
#
|
|
|
|
- name: Get internal API address
|
|
become: true
|
|
shell: "grep {{inventory_hostname}}.internalapi.localdomain /etc/hosts | awk '{print $1}'"
|
|
register: internal_api_ip
|
|
|
|
- name: Push new 10-gnocchi_wsgi.conf
|
|
become: true
|
|
template:
|
|
src: gnocchi_wsgi.conf.j2
|
|
dest: "{{gnocchi_api_apache_file}}"
|
|
mode: 0640
|
|
# (akrzos) Commented out Group as to prevent in Pike incorrect permissions on config file
|
|
# owner: root
|
|
# group: root
|
|
backup: true
|
|
|
|
- name: (Newton, Ocata) Restart Gnocchi API (httpd)
|
|
systemd:
|
|
name: httpd
|
|
state: restarted
|
|
when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
|
|
|
|
- name: (Pike) Restart Gnocchi API (httpd)
|
|
become: true
|
|
command: docker restart gnocchi_api
|
|
when: "'Pike' in osp_version['content'] | b64decode"
|