diff --git a/playbooks/00_install_zabbix_agent.yml b/playbooks/00_install_zabbix_agent.yml index aa1d8ec..4022049 100644 --- a/playbooks/00_install_zabbix_agent.yml +++ b/playbooks/00_install_zabbix_agent.yml @@ -73,7 +73,7 @@ - zabbix-agent2 - zabbix-agent2-plugin-mongodb - zabbix-agent2-plugin-postgresql - - zabbix-agent2-plugin-mysql + # - zabbix-agent2-plugin-mysql update_cache: yes ignore_errors: true when: inventory_hostname != 'nas.home.lan' diff --git a/playbooks/05_install_autofs.yml b/playbooks/05_install_autofs.yml index 7e67519..dcf152f 100644 --- a/playbooks/05_install_autofs.yml +++ b/playbooks/05_install_autofs.yml @@ -20,7 +20,7 @@ nas-public -fstype=cifs,credentials=/etc/auto.auth,dir_mode=0755,file_mode=0755,uid=jd,rw ://nas.home.lan/Public nas-install -fstype=cifs,credentials=/etc/auto.auth,dir_mode=0755,file_mode=0755,uid=jd,rw ://nas.home.lan/install nas-media -fstype=cifs,credentials=/etc/auto.auth,dir_mode=0755,file_mode=0755,uid=jd,rw ://nas.home.lan/Media - nas-downloads -fstype=cifs,credentials=/etc/auto.auth,dir_mode=0755,file_mode=0755,uid=jd,rw ://nas.home.lan/Download + nas-downloads -fstype=cifs,credentials=/etc/auto.auth,dir_mode=0755,file_mode=0755,uid=jd,rw ://nas.home.lan/downloads - name: Reconfigure zabbix agent Server ansible.builtin.lineinfile: diff --git a/playbooks/install_mqtt_srv.yml b/playbooks/install_mqtt_srv.yml index 6763613..c61ad00 100644 --- a/playbooks/install_mqtt_srv.yml +++ b/playbooks/install_mqtt_srv.yml @@ -3,7 +3,7 @@ ignore_unreachable: false ignore_errors: true vars: - dest_folder: "/tmp/ans_repo" + dest_folder: "/share/Public/ans_repo1" tasks: # - name: Install python3-pip # ansible.builtin.apt: @@ -17,7 +17,7 @@ ansible.builtin.include_vars: file: ../jaydee.yml - name: GIT pull - become: true + become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" tags: - git_pull git: @@ -80,16 +80,19 @@ dest: /etc/init.d/ mode: '755' owner: admin + remote_src: true when: inventory_hostname == 'nas.home.lan' become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" - + - debug: + msg: "{{ dest_folder }}" - name: Upload service script2 ansible.builtin.copy: src: "{{ dest_folder }}/mqtt_srv.py" - dest: /usr/bin/ + dest: /usr/bin/mqtt_srv.py mode: '755' owner: admin - when: inventory_hostname == 'router.home.lan' + remote_src: true + when: inventory_hostname == 'nas.home.lan' become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" - name: Install bottle python package @@ -103,7 +106,6 @@ when: inventory_hostname != 'nas.home.lan' become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" - - name: Just force systemd to reread configs (2.4 and above) ansible.builtin.systemd: daemon_reload: true @@ -123,6 +125,6 @@ ansible.builtin.shell: "(/etc/init.d/mqtt_srv.sh restart >/dev/null 2>&1 &)" async: 10 poll: 0 - when: inventory_hostname != 'nas.home.lan' + when: inventory_hostname == 'nas.home.lan' become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"