diff --git a/playbooks/install_mqtt_srv.yml b/playbooks/install_mqtt_srv.yml index ef2be21..5d97995 100644 --- a/playbooks/install_mqtt_srv.yml +++ b/playbooks/install_mqtt_srv.yml @@ -7,21 +7,19 @@ ansible.builtin.apt: name: - python3-pip - - python3-pip - - python3-pip - - python3-pip - - python3-pip + when: inventory_hostname not in groups['nas'] - name: Upload service config ansible.builtin.copy: src: services/mqtt_srv.service dest: /etc/systemd/system/ - + when: inventory_hostname not in groups['nas'] - name: Upload service script ansible.builtin.copy: src: scripts/mqtt_srv.py dest: /usr/bin/ mode: '755' owner: root + when: inventory_hostname not in groups['nas'] - name: Install bottle python package ansible.builtin.shell: pip install {{ item }} --break-system-packages loop: @@ -30,10 +28,13 @@ - ping3 - psutil - autorandr + when: inventory_hostname not in groups['nas'] - name: Just force systemd to reread configs (2.4 and above) ansible.builtin.systemd: daemon_reload: true + when: inventory_hostname not in groups['nas'] - name: Restart mqtt_srv service ansible.builtin.service: name: mqtt_srv.service - state: restarted \ No newline at end of file + state: restarted + when: inventory_hostname not in groups['nas'] \ No newline at end of file