diff --git a/roles/bluetooth/tasks/main.yml b/roles/bluetooth/tasks/main.yml index a792ac4..59cb004 100644 --- a/roles/bluetooth/tasks/main.yml +++ b/roles/bluetooth/tasks/main.yml @@ -33,17 +33,29 @@ become_user: "{{ user.name }}" - name: Unblock the bluetooth service - service: name="rfkill-block@bluetooth.service" enabled=no state=stopped + service: + name: rfkill-block@bluetooth.service + enabled: no + state: stopped when: bluetooth.disable == False - name: Enable and start the bluetooth service - service: name=bluetooth.service enabled=yes state=started + service: + name: bluetooth.service + enabled: yes + state: started when: bluetooth.disable == False - name: Disable and stop the bluetooth service - service: name=bluetooth.service enabled=no state=stopped + service: + name: bluetooth.service + enabled: no + state: stopped when: bluetooth.disable == True - name: Block the bluetooth service - service: name="rfkill-block@bluetooth.service" enabled=yes state=started + service: + name: rfkill-block@bluetooth.service + enabled: yes + state: started when: bluetooth.disable == True