main.yml 1003 Bytes
Newer Older
1
---
rgaudin's avatar
rgaudin committed
2
3
- name: Unblock RF
  command: rfkill unblock all
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
33
34
35
36
37
38
39
  ignore_errors: yes
  tags: master

- name: Install hostapd
  apt:
    name: hostapd
    state: latest
    autoremove: yes
    autoclean: yes
  tags: master

- name: Remove sysVinit startup file
  file:
    path: /etc/init.d/hostapd
    state: absent
  tags: master

- name: Copy hostapd.conf file
  template:
    src: hostapd.conf.j2
    dest: /etc/hostapd/hostapd.conf
    owner: root
    group: root
    mode: 0755
  notify: restart hostapd
  tags: ['master', 'rename']

- name: Copy startup script
  copy:
    src: hostapd
    dest: /etc/systemd/system/hostapd.service
    owner: root
    group: root
    mode: 0664
  tags: master

40
41
42
43
- name: reload systemd
  systemd:
    daemon-reload: yes

rgaudin's avatar
rgaudin committed
44
45
46
47
48
49
50
51
52
53
54
55
- name: unmask hostapd
  become: true
  command: systemctl unmask hostapd
  tags: master

- name: unmask hostapd
  become: true
  systemd:
    masked: no
    name: hostapd
  tags: master

56
57
- include_tasks: enable_service.yml service=hostapd
  tags: master