Commit d083febb authored by Martin van Es's avatar Martin van Es
Browse files

Rename mdserver to mdsigner

parent 1ca680a0
......@@ -7,7 +7,7 @@ hosts:
hostname: srv1
altname: 'server-md2.et2.com'
mdserver:
mdsigner:
test:
signer: hsm_signer
metadir: metadata/test
......@@ -24,7 +24,7 @@ hosts:
hostname: srv2
altname: 'server-md2.et2.com'
mdserver:
mdsigner:
edugain:
signer: hsm_signer
metadir: metadata/edugain
......@@ -50,7 +50,7 @@ hosts:
hostname: srv4
altname: 'server-md.example.com'
mdserver:
mdsigner:
foobar:
signer: normal_signer
metadir: metadata/test
......
......@@ -5,8 +5,8 @@ mdxcdn ansible_host=mdxcdn.pt-38.utr.surfcloud.nl ansible_user=ansible
alternative-mdx ansible_host=alternative-mdx.pt-76.utr.surfcloud.nl ansible_user=ansible ansible_ssh_private_key_file=.ssh/id_ansible
okeanos ansible_host=62.217.72.109 ansible_user=ansible ansible_ssh_private_key_file=.ssh/id_ansible
# Hosts that receive the mdserver role
[mdserver]
# Hosts that receive the mdsigner role
[mdsigner]
et2
mdxcdn
alternative-mdx
......@@ -25,6 +25,6 @@ mdxcdn
# All hosts for base role
[all:children]
mdserver
mdsigner
mdproxy
geodns
......@@ -10,12 +10,12 @@
roles:
- {role: geodns, tags: ['geodns']}
- name: MDServer
hosts: mdserver
- name: MDSigner
hosts: mdsigner
gather_facts: false
roles:
- {role: apache, tags: ['apache']}
- {role: mdserver, tags: ['mdserver']}
- {role: mdsigner, tags: ['mdsigner']}
- name: MDProxy
hosts: mdproxy
......
{% if hosts[inventory_hostname].get('mdserver') %}
{% if hosts[inventory_hostname].get('mdsigner') %}
<VirtualHost *:80>
ServerName {{ hosts[inventory_hostname]['hostname'] }}-signer.{{ tld }}
{% if hosts[inventory_hostname].get('altname') %}
......
---
{{ hosts[inventory_hostname]['mdserver'] | to_yaml }}
---
- name: enable mdserver job
- name: enable mdsigner job
systemd:
name: "mdserver.service"
name: "mdsigner.service"
enabled: true
state: "restarted"
daemon_reload: true
......@@ -4,12 +4,12 @@
import_role:
name: alternate-mdx
- name: Create mdserver config
- name: Create mdsigner config
ansible.builtin.template:
src: "mdserver.yaml.j2"
dest: "{{ altmdx_dir }}/mdserver.yaml"
src: "mdsigner.yaml.j2"
dest: "{{ altmdx_dir }}/mdsigner.yaml"
notify:
- "enable mdserver job"
- "enable mdsigner job"
- name: Create metadata dir
ansible.builtin.file:
......@@ -22,7 +22,7 @@
path: "{{ altmdx_metadir }}/{{ item.key }}"
state: directory
mode: '0755'
with_dict: "{{ hosts[inventory_hostname]['mdserver'] }}"
with_dict: "{{ hosts[inventory_hostname]['mdsigner'] }}"
- name: Check existence of metadata signing cert
stat:
......@@ -39,9 +39,9 @@
creates: "{{ altmdx_dir }}/meta.crt"
when: not mdcert.stat.exists
- name: Copy mdserver service files
- name: Copy mdsigner service files
ansible.builtin.template:
src: "mdserver.service.j2"
dest: "/etc/systemd/system/mdserver.service"
src: "mdsigner.service.j2"
dest: "/etc/systemd/system/mdsigner.service"
notify:
- "enable mdserver job"
- "enable mdsigner job"
[Unit]
Description=MDServer
Description=MDSignerr
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory={{ altmdx_dir }}
ExecStart={{ altmdx_dir }}/bin/python -u mdserver.py
ExecStart={{ altmdx_dir }}/bin/python -u mdsigner.py
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
SyslogIdentifier=mdserver
SyslogIdentifier=mdsigner
[Install]
WantedBy=multi-user.target
---
{{ hosts[inventory_hostname]['mdsigner'] | to_yaml }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment