aboutsummaryrefslogblamecommitdiffstats
path: root/roles/space_server/tasks/blackhole.yml
blob: 7c3b510bc86b698db2c0c600f24185fd10078a23 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                   
                                
                    


               

                                
                                             
                               

               

              
                     


                                 
                                                 
                                    


               






                                

                          


                                                                            
              

                        
---
- name: Create /etc/systemd/scripts
  file:
    dest: '/etc/systemd/scripts'
    state: directory
    owner: root
    group: root
    mode: 0755
- name: Install blackhole script
  copy:
    dest: '/etc/systemd/scripts/blackhole.sh'
    src: blackhole/blackhole.sh
    owner: root
    group: root
    mode: 0755
  notify:
  - restart blackhole

- name: Install blackhole service
  copy:
    dest: '/etc/systemd/system/blackhole.service'
    src: blackhole/blackhole.service
    owner: root
    group: root
    mode: 0644

- name: Enable blackhole service
  systemd:
    name: blackhole.service
    enabled: yes
    masked: no
    state: started
  when: not chroot
- name: '- when in chroot'
  command: systemctl enable blackhole.service
  args:
    creates: '/etc/systemd/system/multi-user.target.wants/blackhole.service'
  when: chroot

# vim: set ts=2 sw=2 et: