Skip to content
Snippets Groups Projects
Commit 3ab96908 authored by Baptiste DE RENZO's avatar Baptiste DE RENZO
Browse files

Merge branch 't34302-remove-msmonitor-orphan-role' into 'master'

Remove msmonitor orphan role,  Refs #34302

See merge request mediaserver/envsetup!69
parents 9f3a9496 3b024a65
No related branches found
No related tags found
No related merge requests found
---
monitor_packages:
- ubicast-monitor
- ubicast-monitor-runtime
monitor_shell_pwd: "{{ envsetup_monitor_shell_pwd }}"
monitor_hostname: "{{ envsetup_monitor_server_name }}"
monitor_firewall_enabled: true
monitor_ferm_rules_filename: monitor
monitor_ferm_input_rules:
- proto:
- tcp
dport:
- 80
- 443
monitor_ferm_output_rules: []
monitor_ferm_global_settings:
...
---
- name: restart nginx
service:
name: nginx
state: restarted
...
---
dependencies:
- role: base
- role: nginx
...
---
- name: monitor install
apt:
force_apt_get: true
install_recommends: false
name: "{{ monitor_packages }}"
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: set msmonitor account password
user:
name: msmonitor
password: "{{ monitor_shell_pwd | password_hash('sha512', 'monitor') }}"
- name: configure domain name in nginx conf
notify: restart nginx
replace:
path: /etc/nginx/sites-available/msmonitor.conf
regexp: '^(\s*server_name).*;$'
replace: '\1 {{ monitor_hostname }};'
backup: true
- name: resolve domain name to localhost ipv4
when: not in_docker
notify: restart nginx
lineinfile:
path: /etc/hosts
line: '127.0.1.1 {{ monitor_hostname }}'
backup: true
- name: ensure monitor is running
service:
name: msmonitor
enabled: true
state: started
- name: fix directory permissions
file:
path: /home/msmonitor/msmonitor
mode: 0755
state: directory
# FIREWALL
- name: firewall
when: monitor_firewall_enabled
vars:
ferm_rules_filename: "{{ monitor_ferm_rules_filename }}"
ferm_input_rules: "{{ monitor_ferm_input_rules }}"
ferm_output_rules: "{{ monitor_ferm_output_rules }}"
ferm_global_settings: "{{ monitor_ferm_global_settings }}"
include_role:
name: ferm-configure
- meta: flush_handlers
...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment