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
57bf458024
commit
e2ad4647c8
@ -1,7 +1,31 @@
|
|||||||
---
|
---
|
||||||
odroid_cluster:
|
datacenter:
|
||||||
hosts:
|
children:
|
||||||
192.168.77.16[1:5]:
|
servers:
|
||||||
vars:
|
hosts:
|
||||||
ansible_ssh_user: root
|
rpi5-1.home.lan:
|
||||||
ansible_ssh_pass: 1234
|
rpi5.home.lan:
|
||||||
|
m-server.home.lan:
|
||||||
|
fog.home.lan:
|
||||||
|
zabbix.home.lan:
|
||||||
|
omv.home.lan:
|
||||||
|
192.168.77.101:
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
ansible_ssh_user: jd
|
||||||
|
# ansible_ssh_password: l4c1j4yd33Du5lo
|
||||||
|
ansible_become_password: l4c1j4yd33Du5lo
|
||||||
|
identity_file: ssh_key.pem
|
||||||
|
ansible_ssh_pass: l4c1j4yd33Du5lo
|
||||||
|
ansible_become_user: root
|
||||||
|
nas:
|
||||||
|
hosts:
|
||||||
|
nas.home.lan:
|
||||||
|
192.168.77.106:
|
||||||
|
vars:
|
||||||
|
ansible_ssh_user: admin
|
||||||
|
become_method: su
|
||||||
|
become_user: admin
|
||||||
|
# ansible_user: admin
|
||||||
|
# ansible_pass: l4c1!j4yd33?Du5lo1
|
||||||
|
ansible_python_interpreter: /share/ZFS530_DATA/.qpkg/QPython312/bin/python3
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
name: Install mqtt_srv
|
name: Install mqtt_srv
|
||||||
ignore_unreachable: false
|
ignore_unreachable: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
vars:
|
||||||
|
dest_folder: "/tmp/ans_repo"
|
||||||
tasks:
|
tasks:
|
||||||
# - name: Install python3-pip
|
# - name: Install python3-pip
|
||||||
# ansible.builtin.apt:
|
# ansible.builtin.apt:
|
||||||
@ -11,13 +13,25 @@
|
|||||||
|
|
||||||
# when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
# when: inventory_hostname not in groups['nas'] and inventory_hostname not in groups['router']
|
||||||
# become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
# become: "{{ 'no' if inventory_hostname in groups['nas'] else 'yes' }}"
|
||||||
|
- name: include vault
|
||||||
|
ansible.builtin.include_vars:
|
||||||
|
file: ../jaydee.yml
|
||||||
|
- name: GIT pull
|
||||||
|
become: true
|
||||||
|
tags:
|
||||||
|
- git_pull
|
||||||
|
git:
|
||||||
|
repo: "https://{{ git_user | urlencode }}:{{ git_password | urlencode }}@gitlab.sectorq.eu/jaydee/mqtt_srv.git"
|
||||||
|
dest: "{{ dest_folder }}"
|
||||||
|
update: yes
|
||||||
|
clone: yes
|
||||||
|
version: main
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ inventory_hostname }}"
|
msg: "{{ inventory_hostname }}"
|
||||||
|
|
||||||
- name: Upload service config
|
- name: Upload service config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: services/mqtt_srv.service
|
src: "{{ dest_folder }}/mqtt_srv.service"
|
||||||
dest: /etc/systemd/system/
|
dest: /etc/systemd/system/
|
||||||
when: inventory_hostname != 'nas.home.lan'
|
when: inventory_hostname != 'nas.home.lan'
|
||||||
become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"
|
become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"
|
||||||
@ -26,7 +40,7 @@
|
|||||||
|
|
||||||
- name: Upload service script
|
- name: Upload service script
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: scripts/mqtt_srv.py
|
src: "{{ dest_folder }}/mqtt_srv.py"
|
||||||
dest: /usr/bin/
|
dest: /usr/bin/
|
||||||
mode: '755'
|
mode: '755'
|
||||||
owner: root
|
owner: root
|
||||||
@ -35,7 +49,7 @@
|
|||||||
|
|
||||||
- name: Upload service script config
|
- name: Upload service script config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: scripts/mqtt_srv.cfg
|
src: "{{ dest_folder }}/mqtt_srv.cfg"
|
||||||
dest: /etc/mqtt_srv/
|
dest: /etc/mqtt_srv/
|
||||||
mode: '755'
|
mode: '755'
|
||||||
owner: root
|
owner: root
|
||||||
@ -62,7 +76,7 @@
|
|||||||
|
|
||||||
- name: Upload service script1
|
- name: Upload service script1
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: scripts/mqtt_srv.sh
|
src: "{{ dest_folder }}/mqtt_srv.sh"
|
||||||
dest: /etc/init.d/
|
dest: /etc/init.d/
|
||||||
mode: '755'
|
mode: '755'
|
||||||
owner: admin
|
owner: admin
|
||||||
@ -71,7 +85,7 @@
|
|||||||
|
|
||||||
- name: Upload service script2
|
- name: Upload service script2
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: scripts/mqtt_srv.py
|
src: "{{ dest_folder }}/mqtt_srv.py"
|
||||||
dest: /usr/bin/
|
dest: /usr/bin/
|
||||||
mode: '755'
|
mode: '755'
|
||||||
owner: admin
|
owner: admin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user