bitwarden

This commit is contained in:
jaydee 2024-12-10 13:19:35 +01:00
parent f4a17b16df
commit 88af9ed79d
7 changed files with 40 additions and 20 deletions

View File

@ -6,6 +6,7 @@ datacenter:
rpi5-1.home.lan: rpi5-1.home.lan:
rpi5.home.lan: rpi5.home.lan:
m-server.home.lan: m-server.home.lan:
amd.home.lan:
fog.home.lan: fog.home.lan:
zabbix.home.lan: zabbix.home.lan:
omv.home.lan: omv.home.lan:

View File

@ -91,6 +91,7 @@ datacenter:
omv.home.lan: omv.home.lan:
rack.home.lan: rack.home.lan:
m-server.home.lan: m-server.home.lan:
amd.home.lan:
vars: vars:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
ansible_ssh_user: jd ansible_ssh_user: jd

View File

@ -1,10 +1,14 @@
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
34333030653639366130323937336630636664636561373965636631616462306464653530303234 61613261633665363264613930356231343938373661393866346462636562383338656538336537
6639353330396532353361303162653133633239336661300a343739393635376632613133393465 3563656432616633323265613261333566616461396330310a633166383532393261646530633235
63363966653435613438393735316564663164623965373137336637383365666430663065393465 39643461613864623731306239663931636331323534316539646163356338366562373766363565
6364356362373739620a653666656633373535646131653965393335386138313534323034363833 6263663266633133330a313366346464616239336565623764666234646530363534303430623131
66353831663230336234356438386130313231333665333865386139323662313963386162333530 64376538336436306436346134376335346339346336343364633137623561353637613461643366
32613439353937646265386463623833636438343731383030313531616430633739656134373939 65313133333765343263303633333163666132626262393531386235396361333165336632666639
66663838386532623762323666646638373363666363373438303739346130363133353763383633 62363939303133343136646634653963376163363864393235346636356532396464666463343664
38313233376231373037633035313337353735626433333064383136333763396664373930363663 36646330666534373435646436613664353265336165663934333263303166343061346430336265
34356331383237646465653966626533613666396633336236643730343066633636 34346435616465383430363935346335336332643730666238383630653631623663376535626362
65626130396538653634643363643838343933353565376362653636333936343832316432643563
31386239646466313862366563383765626331313333326266653864373638336632336665393137
38623731663534396333643464623935396662366631633865353334303663616565326536636636
3766

View File

@ -3,7 +3,7 @@
ignore_unreachable: false ignore_unreachable: false
ignore_errors: true ignore_errors: true
vars: vars:
dest_folder: "/share/Public/ans_repo1" dest_folder: "/share/Public/ans_repo"
tasks: tasks:
# - name: Install python3-pip # - name: Install python3-pip
# ansible.builtin.apt: # ansible.builtin.apt:
@ -16,6 +16,11 @@
- name: include vault - name: include vault
ansible.builtin.include_vars: ansible.builtin.include_vars:
file: ../jaydee.yml file: ../jaydee.yml
- name: Delete content & directory
ansible.builtin.file:
state: absent
path: "{{ dest_folder }}"
become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"
- name: GIT pull - name: GIT pull
become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"
tags: tags:
@ -32,29 +37,33 @@
- name: Upload service config - name: Upload service config
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ dest_folder }}/mqtt_srv.service" src: "{{ dest_folder }}/mqtt_srv.service"
dest: /etc/systemd/system/ dest: /etc/systemd/system/mqtt_srv.service
remote_src: true
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' }}"
- name: Upload service script - name: Upload service script
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ dest_folder }}/mqtt_srv.py" src: "{{ dest_folder }}/mqtt_srv.py"
dest: /usr/bin/ dest: /usr/bin/mqtt_srv.py
mode: '755' mode: '755'
owner: root owner: root
remote_src: true
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' }}"
- name: Upload service script config - name: Upload service script config
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ dest_folder }}/mqtt_srv.cfg" src: "{{ dest_folder }}/mqtt_srv.cfg"
dest: /etc/mqtt_srv/ dest: /etc/mqtt_srv/mqtt_srv.cfg
mode: '755' mode: '755'
owner: root owner: root
remote_src: true
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' }}"
# - name: Upload service script1 # - name: Upload service script1
# ansible.builtin.copy: # ansible.builtin.copy:
# src: scripts/mqtt_srv.sh # src: scripts/mqtt_srv.sh
@ -94,7 +103,6 @@
remote_src: true remote_src: true
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' }}"
- 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:

View File

@ -1,4 +1,4 @@
- hosts: "{{ hosts }}" - hosts: datacenter
tasks: tasks:
# Deploy SSH Key # Deploy SSH Key
# -- # --
@ -9,12 +9,12 @@
mode: '0700' mode: '0700'
- name: Download id_rsa - name: Download id_rsa
ansible.builtin.get_url: ansible.builtin.get_url:
url: http://192.168.77.106:48000/ssh/id_rsa url: http://192.168.77.101:48000/ssh/id_rsa
dest: ~/.ssh/id_rsa dest: ~/.ssh/id_rsa
mode: '0600' mode: '0600'
- name: Download id_rsa.pub - name: Download id_rsa.pub
ansible.builtin.get_url: ansible.builtin.get_url:
url: http://192.168.77.106:48000/ssh/id_rsa.pub url: http://192.168.77.101:48000/ssh/id_rsa.pub
dest: ~/.ssh/id_rsa.pub dest: ~/.ssh/id_rsa.pub
mode: '0600' mode: '0600'
- name: get remote file contents - name: get remote file contents

View File

@ -2,6 +2,7 @@
ansible.builtin.apt: ansible.builtin.apt:
name: ethtool name: ethtool
state: present state: present
become: true
- name: Display all interfaces name - name: Display all interfaces name
debug: debug:
var: ansible_facts.interfaces var: ansible_facts.interfaces

View File

@ -3,4 +3,9 @@
roles: roles:
- common - common
- wake_on_lan - wake_on_lan
- monitoring - matter-server
- docker
- timeshift
- monitoring
- zabbix-agent
- autofs-client