mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 12:38:11 +00:00
bitwarden
This commit is contained in:
parent
fd5dff813d
commit
aeca83e32d
@ -17,8 +17,8 @@
|
||||
ansible.builtin.copy:
|
||||
src: services/mqtt_srv.service
|
||||
dest: /etc/systemd/system/
|
||||
when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname not in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
|
||||
|
||||
@ -28,34 +28,34 @@
|
||||
dest: /usr/bin/
|
||||
mode: '755'
|
||||
owner: root
|
||||
when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname not in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
- name: Upload service script config
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.cfg
|
||||
dest: /etc/mqtt_srv/
|
||||
mode: '755'
|
||||
owner: root
|
||||
when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
- name: Upload service script1
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.sh
|
||||
dest: /jffs/scripts/mqtt_srv/
|
||||
mode: '755'
|
||||
owner: admin
|
||||
when: inventory_hostname in groups['router']
|
||||
become: false
|
||||
when: inventory_hostname not in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
# - name: Upload service script1
|
||||
# ansible.builtin.copy:
|
||||
# src: scripts/mqtt_srv.sh
|
||||
# dest: /jffs/scripts/mqtt_srv/
|
||||
# mode: '755'
|
||||
# owner: admin
|
||||
# when: inventory_hostname in groups['router']
|
||||
# become: false
|
||||
|
||||
|
||||
- name: Upload service script
|
||||
ansible.builtin.copy:
|
||||
src: scripts/mqtt_srv.py
|
||||
dest: /jffs/scripts/mqtt_srv/
|
||||
mode: '755'
|
||||
owner: admin
|
||||
when: inventory_hostname in groups['router']
|
||||
become: false
|
||||
# - name: Upload service script
|
||||
# ansible.builtin.copy:
|
||||
# src: scripts/mqtt_srv.py
|
||||
# dest: /jffs/scripts/mqtt_srv/
|
||||
# mode: '755'
|
||||
# owner: admin
|
||||
# when: inventory_hostname in groups['router']
|
||||
# become: false
|
||||
|
||||
- name: Upload service script1
|
||||
ansible.builtin.copy:
|
||||
@ -63,8 +63,8 @@
|
||||
dest: /etc/init.d/
|
||||
mode: '755'
|
||||
owner: admin
|
||||
when: inventory_hostname in groups['nas']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
- name: Upload service script2
|
||||
ansible.builtin.copy:
|
||||
@ -72,8 +72,8 @@
|
||||
dest: /usr/bin/
|
||||
mode: '755'
|
||||
owner: admin
|
||||
when: inventory_hostname in groups['nas']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
- name: Install bottle python package
|
||||
ansible.builtin.shell: pip install {{ item }} --break-system-packages
|
||||
@ -83,15 +83,15 @@
|
||||
- ping3
|
||||
- psutil
|
||||
- autorandr
|
||||
when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname not in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
|
||||
- name: Just force systemd to reread configs (2.4 and above)
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname not in groups['nas']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
|
||||
- name: Restart mqtt_srv service
|
||||
@ -99,22 +99,13 @@
|
||||
name: mqtt_srv.service
|
||||
state: restarted
|
||||
enabled: true
|
||||
when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
when: inventory_hostname not in groups['nas.home.lan']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
- name: Restart mqtt service
|
||||
ansible.builtin.shell: "(/etc/init.d/mqtt_srv.sh restart >/dev/null 2>&1 &)"
|
||||
async: 10
|
||||
poll: 0
|
||||
when: inventory_hostname in groups['nas']
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||
become: "{{ 'no' if inventory_hostname in groups['nas.home.lan'] else 'yes' }}"
|
||||
|
||||
- name: Restart mqtt service
|
||||
ansible.builtin.shell: "(/jffs/scripts/mqtt_srv/mqtt_srv.sh restart >/dev/null 2>&1 &)"
|
||||
async: 10
|
||||
poll: 0
|
||||
when: inventory_hostname in groups['router']
|
||||
become: false
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user