73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
|
---
|
||
|
|
||
|
- name: Install dependencies
|
||
|
apt:
|
||
|
name:
|
||
|
- alien
|
||
|
- sysvinit-utils
|
||
|
|
||
|
- name: Add i386 architecture
|
||
|
command: dpkg --add-architecture i386
|
||
|
args:
|
||
|
creates: /var/lib/dpkg/arch
|
||
|
when: ansible_architecture != 'i386'
|
||
|
register: add_i386
|
||
|
|
||
|
- name: Install 32bit dependencies
|
||
|
apt:
|
||
|
name:
|
||
|
- libstdc++6:i386
|
||
|
- zlib1g:i386
|
||
|
update_cache: "{{ add_i386.changed }}"
|
||
|
|
||
|
# TODO manual steps
|
||
|
# alien --target=amd64 /tmp/SIP-DECT-OMM-8.1_SP4_GE30-0.i686.rpm
|
||
|
# dpkg -i sip-dect-omm_8.1SP4GE30-1_amd64.deb
|
||
|
# alien --target=amd64 /tmp/SIP-DECT-HANDSET-8.1_SP4_GE30-0.i686.rpm
|
||
|
# dpkg -i sip-dect-handset_8.1SP4GE30-1_amd64.deb
|
||
|
# rm /etc/init.d/sip-dect-omm
|
||
|
# rm /etc/sysconfig/SIP-DECT
|
||
|
|
||
|
- name: Install systemd units
|
||
|
template: src={{ item }}.service.j2 dest=/lib/systemd/system/{{ item }}.service
|
||
|
with_items:
|
||
|
- sip-dect-ics
|
||
|
- sip-dect-omm
|
||
|
notify:
|
||
|
- Reload systemd
|
||
|
- Restart sip-dect-ics
|
||
|
- Restart sip-dect-omm
|
||
|
|
||
|
- name: Enable services
|
||
|
service: name={{ item }} state=started enabled=yes
|
||
|
with_items:
|
||
|
- sip-dect-ics
|
||
|
- sip-dect-omm
|
||
|
|
||
|
- name: Ensure certificates are available
|
||
|
command:
|
||
|
cmd: >
|
||
|
openssl req -x509 -nodes -newkey rsa:2048
|
||
|
-keyout /etc/nginx/ssl/{{ omm_domain }}.key -out /etc/nginx/ssl/{{ omm_domain }}.crt
|
||
|
-days 730 -subj "/CN={{ omm_domain }}"
|
||
|
creates: /etc/nginx/ssl/{{ omm_domain }}.crt
|
||
|
notify: Restart nginx
|
||
|
|
||
|
- name: Request nsupdate key for certificate
|
||
|
include_role: name=acme-dnskey-generate
|
||
|
vars:
|
||
|
acme_dnskey_san_domains:
|
||
|
- "{{ omm_domain }}"
|
||
|
|
||
|
- name: Configure certificate manager for omm
|
||
|
template: src=certs.j2 dest=/etc/acertmgr/{{ omm_domain }}.conf
|
||
|
notify: Run acertmgr
|
||
|
|
||
|
- name: Configure vhost
|
||
|
template: src=vhost.j2 dest=/etc/nginx/sites-available/omm
|
||
|
notify: Restart nginx
|
||
|
|
||
|
- name: Enable vhost
|
||
|
file: src=/etc/nginx/sites-available/omm dest=/etc/nginx/sites-enabled/omm state=link
|
||
|
notify: Restart nginx
|