mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
bitwarden
This commit is contained in:
parent
32835c2c45
commit
849341f8e7
@ -8,12 +8,16 @@
|
|||||||
- python3-pip
|
- python3-pip
|
||||||
when: inventory_hostname not in groups['nas']
|
when: inventory_hostname not in groups['nas']
|
||||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Upload service config
|
- name: Upload service config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: services/mqtt_srv.service
|
src: services/mqtt_srv.service
|
||||||
dest: /etc/systemd/system/
|
dest: /etc/systemd/system/
|
||||||
when: inventory_hostname not in groups['nas']
|
when: inventory_hostname not in groups['nas']
|
||||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Upload service script
|
- name: Upload service script
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: scripts/mqtt_srv.py
|
src: scripts/mqtt_srv.py
|
||||||
@ -22,6 +26,16 @@
|
|||||||
owner: root
|
owner: root
|
||||||
when: inventory_hostname not in groups['nas']
|
when: inventory_hostname not in groups['nas']
|
||||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
- name: Upload service script
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: scripts/mqtt_srv.py
|
||||||
|
dest: /share/Data/__GITLAB/mqtt_srv/
|
||||||
|
mode: '755'
|
||||||
|
owner: admin
|
||||||
|
when: inventory_hostname in groups['nas']
|
||||||
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
- name: Install bottle python package
|
- name: Install bottle python package
|
||||||
ansible.builtin.shell: pip install {{ item }} --break-system-packages
|
ansible.builtin.shell: pip install {{ item }} --break-system-packages
|
||||||
loop:
|
loop:
|
||||||
@ -32,14 +46,25 @@
|
|||||||
- autorandr
|
- autorandr
|
||||||
when: inventory_hostname not in groups['nas']
|
when: inventory_hostname not in groups['nas']
|
||||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Just force systemd to reread configs (2.4 and above)
|
- name: Just force systemd to reread configs (2.4 and above)
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: inventory_hostname not in groups['nas']
|
when: inventory_hostname not in groups['nas']
|
||||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Restart mqtt_srv service
|
- name: Restart mqtt_srv service
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: mqtt_srv.service
|
name: mqtt_srv.service
|
||||||
state: restarted
|
state: restarted
|
||||||
when: inventory_hostname not in groups['nas']
|
when: inventory_hostname not in groups['nas']
|
||||||
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
- name: Install bottle python package
|
||||||
|
ansible.builtin.shell: python3 /share/Data/__GITLAB/mqtt_srv/mqtt_srv.py > /dev/null 2>&1 &
|
||||||
|
when: inventory_hostname not in groups['nas']
|
||||||
|
become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user