blob: b62a7caf82f88fabf24444226ca08715561d98e8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
---
- name: Create /etc/systemd/scripts
file:
dest: /etc/systemd/scripts
state: directory
- name: Install blackhole script
copy:
src: blackhole/blackhole.sh
dest: '/etc/systemd/scripts/blackhole.sh'
mode: 0755
notify:
- restart blackhole
- name: Install blackhole service
copy:
src: blackhole/blackhole.service
dest: '/etc/systemd/system/blackhole.service'
- name: Enable blackhole service
systemd:
name: blackhole.service
enabled: yes
masked: no
state: started
when: "'container' not in ansible_env"
- name: '- when in nspawn'
command: systemctl enable blackhole.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/blackhole.service'
when: "'container' in ansible_env"
# vim: set ts=2 sw=2 et:
|