notifs / staging: adjust roles to be more correct in staging

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2022-03-02 12:34:35 -08:00
parent f885bd1ce1
commit a1ff74354d
2 changed files with 39 additions and 37 deletions

View file

@ -12,7 +12,7 @@
# Needed to produce nice long emails about koji builds # Needed to produce nice long emails about koji builds
- koji - koji
when: when:
inventory_hostname.startswith('notifs-backend01') inventory_hostname.startswith('notifs-backend01.iad2')
tags: tags:
- notifs - notifs
- notifs/backend - notifs/backend
@ -28,7 +28,7 @@
# Needed to produce nice long emails about koji builds # Needed to produce nice long emails about koji builds
- koji - koji
when: when:
inventory_hostname.startswith('notifs-backend02') inventory_hostname.startswith('notifs-backend02') or env = 'staging'
tags: tags:
- notifs - notifs
- notifs/backend - notifs/backend
@ -55,7 +55,7 @@
- tasks.py - tasks.py
- util.py - util.py
when: when:
inventory_hostname.startswith('notifs-backend01') inventory_hostname.startswith('notifs-backend01.iad')
tags: tags:
- notifs - notifs
- notifs/backend - notifs/backend

View file

@ -12,7 +12,7 @@
notify: notify:
- restart apache - restart apache
when: when:
inventory_hostname.startswith('notifs-backend01') inventory_hostname.startswith('notifs-backend0.iad2')
tags: tags:
- notifs - notifs
- notifs/frontend - notifs/frontend
@ -27,20 +27,22 @@
- python3-flask-openid - python3-flask-openid
notify: notify:
- restart apache - restart apache
when:
inventory_hostname.startswith('notifs-backend02') or env = 'staging'
tags: tags:
- notifs - notifs
- notifs/frontend - notifs/frontend
- name: Install epel-testing fmn on stage #- name: Install epel-testing fmn on stage
package: name={{ item }} state=present enablerepo=epel-testing # package: name={{ item }} state=present enablerepo=epel-testing
with_items: # with_items:
- python-fmn # - python-fmn
when: env == "staging" # when: env == "staging"
notify: # notify:
- restart apache # - restart apache
tags: # tags:
- notifs # - notifs
- notifs/frontend # - notifs/frontend
- name: copy fmn app configuration - name: copy fmn app configuration
template: > template: >
@ -99,31 +101,31 @@
- notifs - notifs
- notifs/frontend - notifs/frontend
- name: create live docs directory #- name: create live docs directory
file: > # file: >
dest=/usr/lib/python2.6/site-packages/fmn/web/docs/ # dest=/usr/lib/python2.6/site-packages/fmn/web/docs/
state=directory # state=directory
tags: # tags:
- notifs # - notifs
- notifs/frontend # - notifs/frontend
- name: copy live docs #- name: copy live docs
copy: src={{ item }} dest=/usr/lib/python2.6/site-packages/fmn/web/docs # copy: src={{ item }} dest=/usr/lib/python2.6/site-packages/fmn/web/docs
with_fileglob: fedora-sitedocs/*.rst # with_fileglob: fedora-sitedocs/*.rst
tags: # tags:
- notifs # - notifs
- notifs/frontend # - notifs/frontend
- name: apply selinux type to static files #- name: apply selinux type to static files
file: > # file: >
dest=/usr/share/fmn/static # dest=/usr/share/fmn/static
setype=httpd_sys_content_t # setype=httpd_sys_content_t
state=directory # state=directory
recurse=yes # recurse=yes
tags: # tags:
- notifs # - notifs
- notifs/frontend # - notifs/frontend
- selinux # - selinux
- name: ensure selinux lets httpd talk to postgres, memcached, and mail - name: ensure selinux lets httpd talk to postgres, memcached, and mail
seboolean: name={{item}} state=yes persistent=yes seboolean: name={{item}} state=yes persistent=yes