aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/space_server/tasks')
-rw-r--r--roles/space_server/tasks/bird.yml60
-rw-r--r--roles/space_server/tasks/kernel.yml8
-rw-r--r--roles/space_server/tasks/radius.yml19
3 files changed, 29 insertions, 58 deletions
diff --git a/roles/space_server/tasks/bird.yml b/roles/space_server/tasks/bird.yml
index 4ce01eb..c81176d 100644
--- a/roles/space_server/tasks/bird.yml
+++ b/roles/space_server/tasks/bird.yml
@@ -1,68 +1,22 @@
---
-- name: Make sure /etc/bird exists
- file:
- dest: '/etc/bird'
- state: directory
- owner: root
- group: root
- mode: 0755
-- name: Create bird configuration
- copy:
- dest: '/etc/bird/'
- src: '{{ item }}'
- owner: root
- group: root
- mode: 0644
- with_fileglob: 'bird/*'
- loop_control:
- label: '/etc/bird/{{ item|basename }}'
- notify:
- - restart bird
-
-- name: Create bird.conf and bird6.conf symlinks
- file:
- path: '/etc/{{ item }}.conf'
- src: 'bird/{{ item }}.conf'
- state: link
- force: yes
- with_items:
- - bird
- - bird6
-
-# bird6 wants the link to have a link-local address
-# when starting, so wait for it
-- name: Create bird6 service drop-in directory
- file:
- dest: '/etc/systemd/system/bird6.service.d'
- state: directory
- owner: root
- group: root
- mode: 0755
-- name: Start bird6 after networks are configured
+- name: Create /etc/bird.conf
copy:
- dest: '/etc/systemd/system/bird6.service.d/wait-online.conf'
- src: wait-online.conf
+ dest: '/etc/bird.conf'
+ src: 'bird.conf'
owner: root
group: root
mode: 0644
+ notify: restart bird
-- name: Enable bird and bird6
+- name: Enable bird.service
systemd:
- name: '{{ item }}.service'
+ name: 'bird.service'
enabled: yes
masked: no
state: started
- with_items:
- - bird
- - bird6
when: not chroot
- name: '- when in chroot'
- command: 'systemctl enable {{ item }}.service'
- args:
- creates: '/etc/systemd/system/multi-user.target.wants/{{ item }}.service'
- with_items:
- - bird
- - bird6
+ command: 'systemctl enable bird.service'
when: chroot
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/kernel.yml b/roles/space_server/tasks/kernel.yml
index 9354850..db4e5d2 100644
--- a/roles/space_server/tasks/kernel.yml
+++ b/roles/space_server/tasks/kernel.yml
@@ -1,4 +1,12 @@
---
+- name: Make sure /boot/<machine-id> exists
+ file:
+ path: '/boot/{{ ansible_machine_id }}'
+ state: directory
+ owner: root
+ group: root
+ mode: 0755
+
- name: Make sure /etc/kernel/install.d exists
file:
path: '{{ item }}'
diff --git a/roles/space_server/tasks/radius.yml b/roles/space_server/tasks/radius.yml
index a3f4183..2747d31 100644
--- a/roles/space_server/tasks/radius.yml
+++ b/roles/space_server/tasks/radius.yml
@@ -9,7 +9,7 @@
with_items:
- radiusd.conf
- mods-available/eap
- - mods-available/python-assha
+ - mods-available/python3-assha
- sites-available/labitat
- sites-available/labitat-inner
notify:
@@ -17,7 +17,7 @@
- name: Create assha python script
copy:
- dest: '/etc/raddb/mods-config/python/assha.py'
+ dest: '/etc/raddb/mods-config/python3/assha.py'
src: 'radius/assha.py'
owner: root
group: root
@@ -42,6 +42,7 @@
state: '{{ item.state }}'
owner: root
group: radiusd
+ follow: no
force: yes
with_items:
- { name: default, state: absent }
@@ -58,11 +59,11 @@
state: '{{ item.state }}'
owner: root
group: radiusd
+ follow: no
force: yes
with_items:
- - { name: files, state: absent }
- - { name: python, state: absent }
- - { name: python-assha, state: link }
+ - { name: files, state: absent }
+ - { name: python3-assha, state: link }
notify:
- restart radiusd
@@ -116,6 +117,14 @@
group: root
mode: 0644
+- name: Set PYTHONPATH for radiusd
+ copy:
+ dest: '/etc/systemd/system/radiusd.service.d/pythonpath.conf'
+ src: 'radius/pythonpath.conf'
+ owner: root
+ group: root
+ mode: 0644
+
- name: Enable radiusd service
systemd:
name: radiusd.service