Housekeeping: Archiv gelöscht (#2)

This commit is contained in:
Quotengrote 2020-08-18 14:42:22 +02:00 committed by GitHub
parent 85553d28e8
commit 025723bf6b
65 changed files with 0 additions and 1580 deletions

View File

@ -1,358 +0,0 @@
root@omvv2.grote.lan's password:
Linux omvv2 4.19.0-0.bpo.8-amd64 #1 SMP Debian 4.19.98-1~bpo9+1 (2020-03-09) x86 _64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Apr 19 16:09:19 2020 from 192.168.2.40
root@omvv2:~# cat /etc/samba/smb.conf
#======================= Global Settings =======================
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log level = 0
log file = /var/log/samba/log.%m
max log size = 1000
logging = syslog
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = no
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n * password\supdated\ssuccessfully* .
pam password change = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY
guest account = nobody
load printers = no
disable spoolss = yes
printing = bsd
printcap name = /dev/null
unix extensions = yes
wide links = no
create mask = 0777
directory mask = 0777
map to guest = Bad User
use sendfile = yes
aio read size = 16384
aio write size = 16384
local master = yes
time server = no
wins support = no
acl allow execute always = yes
allocation roundup size = 4096
#======================= Share Definitions =======================
[scans]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/scans
guest ok = yes
guest only = yes
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = no
[tmp]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/tmp
guest ok = yes
guest only = yes
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects =
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
[pve]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/pve
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects =
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "michaelgrote","pve"
invalid users =
read list =
write list = "michaelgrote","pve"
[aptcacherng]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/aptcacherng
guest ok = no
read only = no
browseable = yes
inherit acls = no
inherit permissions = yes
ea support = no
store dos attributes = no
vfs objects =
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users =
invalid users =
read list =
write list =
[ag-v1]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/ag-v1
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "michaelgrote","andreasgrote"
invalid users =
read list =
write list = "michaelgrote","andreasgrote"
[hm-v1]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/hm-v1
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "michaelgrote","horstmartin"
invalid users =
read list =
write list = "michaelgrote","horstmartin"
[Videos-v2]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/Videos-v2
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "annemariedroessler","michaelgrote","toolserver","win10"
invalid users =
read list = "annemariedroessler"
write list = "michaelgrote","toolserver","win10"
[Musik-v2]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/Musik-v2
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = no
valid users = "annemariedroessler","jellyfin","michaelgrote","win10"
invalid users =
read list = "annemariedroessler","jellyfin","win10"
write list = "michaelgrote"
[mg-v2]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/mg-v2
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "michaelgrote","win10"
invalid users =
read list =
write list = "michaelgrote","win10"
[Backup-v2]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/Backup-v2
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "annemariedroessler","michaelgrote","restic","toolserver","win10"
invalid users =
read list =
write list = "annemariedroessler","michaelgrote","restic","toolserver","win10"
[amd-v2]
path = /srv/7050c4a3-98ad-41bd-804d-a85c94b16468/amd-v2
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
recycle:exclude =
recycle:exclude_dir =
recycle:maxsize = 0
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = "michaelgrote","annemariedroessler","win10"
invalid users =
read list = "michaelgrote","win10"
write list = "annemariedroessler"
root@omvv2:~#

View File

@ -1,8 +0,0 @@
.vagrant
# Molecule
.molecule
*.retry
*__pycache__*
*.cache
*.log

View File

@ -1,30 +0,0 @@
## 2.0.0
- Add `pip_executable` variable to support Python 2 and 3 installations.
- Removed deprecated tests-as-filters in `when` directives.
- Updated minimum supported Ansible version to 2.5.x.
## 1.1.0
- Add `pip_get_pip_version` to support older `get-pip.py` releases. See version history at https://bootstrap.pypa.io.
## 1.0.1
- Prevent `get-pip.py` download when it is already present.
## 1.0.0
- Install pip using `get-pip.py` instead of `apt`. See Install pip, setuptools, and wheel in the [pip documentation](https://packaging.python.org/installing/#install-pip-setuptools-and-wheel) for more information.
## 0.2.0
- Replace existing Vagrant testing setup with Molecule.
- Add Molecule testing support for Ubuntu 16.04.
## 0.1.1
- Make use of a version glob to install the `pip` package.
## 0.1.0
- Initial release.

View File

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Azavea Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,35 +0,0 @@
# ansible-pip
An Ansible role for installing [pip](https://pip.pypa.io/en/latest/).
## Role Variables
- `pip_version` - pip version
- `pip_get_pip_version` - get_pip.py version
- `pip_executable` - the executable to run to check pip's version
## Testing
Tests are done using [molecule](http://molecule.readthedocs.io/). To run the test suite, install molecule and its dependencies and run ` molecule test` from the folder containing molecule.yml. To add additional tests, add a [testinfra](http://testinfra.readthedocs.org/) python script in the [tests](./tests/) directory, or add a function to [test_pip.py](./tests/test_scala.py). Information about available Testinfra modules is available [here](http://testinfra.readthedocs.io/en/latest/modules.html).
### Example
```
# Download molecule, dependencies
$ pip install molecule
# Change to the top-level project directory, which contains molecule.yml
$ cd /path/to/ansible-pip
# Ensure that molecule.yml is present
$ ls
CHANGELOG.md molecule.yml
LICENSE playbook.retry
README.md playbook.yml
ansible.cfg tasks
defaults templates
handlers tests
meta
# We're in the right directory, so let's run tests!
$ molecule test
```

View File

@ -1,4 +0,0 @@
---
pip_version: "9.0.*"
pip_get_pip_version: "latest"
pip_executable: "pip"

View File

@ -1,15 +0,0 @@
---
galaxy_info:
author: Hector Castro
description: An Ansible role for installing pip.
company: Azavea Inc.
license: Apache
min_ansible_version: 2.5
platforms:
- name: Ubuntu
versions:
- trusty
- xenial
galaxy_tags:
- development
dependencies: []

View File

@ -1,25 +0,0 @@
---
molecule:
test:
sequence:
- destroy
- syntax
- create
- converge
- idempotence
- verify
vagrant:
platforms:
- name: trusty64
box: ubuntu/trusty64
- name: xenial64
box: ubuntu/xenial64
providers:
- name: virtualbox
type: virtualbox
instances:
- name: ansible-pip

View File

@ -1,25 +0,0 @@
---
- name: Get installed pip version
command: "{{ pip_executable }} --version"
register: pip_version_output
ignore_errors: yes
changed_when: false
- name: Download get-pip.py
vars:
pip_version_url: "{{ (pip_get_pip_version == 'latest') | ternary('', pip_get_pip_version) }}"
required_vars:
- pip_get_pip_version
get_url:
url: 'https://bootstrap.pypa.io/{{ pip_version_url }}/get-pip.py'
dest: /tmp/get-pip.py
when: (pip_version_output is failed) or not pip_version_output.stdout is search(pip_version)
# Install pip if it's not already installed, or if
# the desired versions of pip aren't installed
# The regular expression extracts '9.0' out of '9.0.*'
- name: Install pip
command: "{{ ansible_python_interpreter if ansible_python_interpreter is defined else 'python' }} get-pip.py pip=={{ pip_version }}"
when: "(pip_version_output is failed) or not pip_version_output.stdout is search('pip ' + pip_version)"
args:
chdir: /tmp

View File

@ -1,26 +0,0 @@
import pytest
@pytest.fixture()
def AnsibleDefaults(Ansible):
""" Load default variables into dictionary.
Args:
Ansible - Requires the ansible connection backend.
"""
return Ansible("include_vars", "./defaults/main.yml")["ansible_facts"]
def test_pip_exists(Command, AnsibleDefaults):
""" Ensure the candidate version of pip is installed.
Args:
Command - Module to determine package install status and version
GetAnsibleDefaults - Get default version of the package
"""
pip_version_check = Command("pip --version")
# We only care about the major.minor versions
pip_version = AnsibleDefaults["pip_version"].split("*")[0]
assert pip_version_check.rc == 0
assert pip_version in pip_version_check.stdout

View File

@ -1,6 +0,0 @@
---
### mgrote.fileserver_mergerfs
laufwerke: ## Muessen als HDD* in /mnt gemountet damit sie in mergerFS eingebunden werden
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1', ordner: 'HDD1'}
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2', ordner: 'HDD2'}
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi3', ordner: 'HDD3'}

View File

@ -1,78 +0,0 @@
###############################################################################
# Vor dem Ausfuehren des Playbooks die Festplatten fuer
# mergerFS mit "/dev/disk/by-id" rausfinden.
# Die Festplatten werden unter sources hinterlegt.
# Auf diesen Festplatten muss sich ein EXT4_Dateisystem befinden.
# "mkfs.ext4 /dev/..."
###############################################################################
# Wenn es hier hakt, zuerst SMB auskommentieren, Ausfuehren dann wieder mit smb.
###############################################################################
# Wenn Freigaben geloescht werden muss der dazugehoerige Ordner per CLI geloescht
# werden.
###############################################################################
---
- hosts: fileserver.grote.lan
roles:
- { role: mgrote.fileserver_mergerfs, tags: "fileserver_mergerfs" }
- { role: mgrote.postfix-gmail, tags: "postfix-gmail" }
- { role: mgrote.fileserver_smb, tags: "fileserver_smb" }
- { role: mgrote.sicherung_medien, tags: "youtube-dl", when: ansible_hostname == "fileserver", become: true }
- { role: mgrote.sicherung_nextcloud, tags: "nextcloud_sicherung", when: ansible_hostname == "fileserver" }
- { role: mgrote.sicherung_cloud, tags: "rclone", when: ansible_hostname == "fileserver" }
vars:
### mergerFS
mergerfs_mountpoint: "/shares"
mount_optionen: defaults,allow_other,direct_io,use_ino,moveonenospc=true,category.create=mfs,minfreespace=100G,nonempty
###laufwerke: sind im inventory pro host deklariert
mergerfs_tree_cron_minutes: "30"
mergerfs_tree_cron_hours: "5"
### smb_fileserver
smb_nutzer:
- { name: 'andreasgrote', groups: 'users', password: 'hallowelt' }
- { name: 'annemariedroessler', groups: 'users', password: 'hallowelt' }
- { name: 'aptcacherng', groups: 'users', password: 'hallowelt' }
- { name: 'horstmartin', groups: 'users', password: 'hallowelt' }
- { name: 'pve', groups: 'users', password: 'hallowelt' }
- { name: 'restic', groups: 'users', password: 'restic' }
- { name: 'toolserver', groups: 'users', password: 'hallowelt' }
- { name: 'win10', groups: 'users', password: 'hallowelt' }
- { name: 'toolserver', groups: 'users', password: '1TWoLbNzNG2W2c1rhyGh' }
- { name: 'kodi', groups: 'users', password: 'hallowelt' }
- { name: 'michaelgrote3', groups: 'users', password: 'hallowelt' }
smb_freigaben: #werden unter /shares angelegt
- { freigabename: 'Backup', ordnerpfad: '/shares/Backup', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'Musik', ordnerpfad: '/shares/Musik', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'Videos', ordnerpfad: '/shares/Videos', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'ag', ordnerpfad: '/shares/ag', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'amd', ordnerpfad: '/shares/amd', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'hm', ordnerpfad: '/shares/hm', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'mg', ordnerpfad: '/shares/mg', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'pve', ordnerpfad: '/shares/pve', lese_nutzer: '', schreibe_nutzer: '' }
- { freigabename: 'tmp', ordnerpfad: '/shares/tmp', lese_nutzer: '', schreibe_nutzer: '' }
smb_workgroup: WORKGROUP
smb_nutzer_loeschen:
- { name: 'platzhalter' }
### nfs_fileserver
nfs_freigaben:
- { freigabename: 'nfsfreigabe', nutzer: pve }
### youtube mg
youtubedl_cron_minutes: "40"
youtubedl_cron_hours: "21"
playlisten:
- { url: 'https://www.youtube.com/playlist?list=PLPM-eyPokAWNhhDNO4YzC5cGRwuI2ykwE', titel: 'music'}
- { url: 'https://www.youtube.com/playlist?list=PLPM-eyPokAWNnDxuyX131R5wkl8fzvu7D', titel: 'lost and found'}
- { url: 'https://www.youtube.com/playlist?list=PLPM-eyPokAWPmStfh37roJge-JuLfgma0', titel: 'lost and found 2'}
### nextcloud_sicherung
nextcloud_sicherung_cron_minutes: "20"
nextcloud_sicherung_cron_hours: "21"
### rclone
rclone_cron_minutes: "1"
rclone_cron_hours: "22,04,10,16"
### postfix
mail_nach_cronjob: false

View File

@ -1,11 +0,0 @@
####### GSUITE
echo "GSuite - mg"
/usr/local/bin/rclone --config /root/rclone/config/rclone.conf copy --drive-stop-on-upload-limit --dry-run --ignore-existing --log-file="/root/rclone/logs/log_tmp_$dt.txt" --log-level INFO --transfers 2 --checkers 4 --bwlimit "Mon-08:00,{{ rclone_bandbreite }} 22:00,off Tue-08:00,{{ rclone_bandbreite }} 22:00,off Wed-08:00,{{ rclone_bandbreite }} 22:00,off Thu-08:00,{{ rclone_bandbreite }} 22:00,off Fri-08:00,{{ rclone_bandbreite }} 22:00,off Sat-09:00,{{ rclone_bandbreite }} 23:00,off Sun-09:00,{{ rclone_bandbreite }} 22:00,off" --contimeout 60s --timeout 300s --retries 5 --low-level-retries 10 --max-backlog 300000 --stats 5s --drive-server-side-across-configs=true --delete-after --progress --stats-file-name-length 120 --drive-chunk-size 64M --fast-list --exclude /.recycle/** "/shares/mg" "gdrive-v3-encrypt:/mg" --backup-dir "gdrive-v3-encrypt:/old/mg/$dt"
echo "GSuite - amd"
/usr/local/bin/rclone --config /root/rclone/config/rclone.conf copy --drive-stop-on-upload-limit --dry-run --ignore-existing --log-file="/root/rclone/logs/log_tmp_$dt.txt" --log-level INFO --transfers 4 --checkers 8 --bwlimit "Mon-08:00,{{ rclone_bandbreite }} 22:00,off Tue-08:00,{{ rclone_bandbreite }} 22:00,off Wed-08:00,{{ rclone_bandbreite }} 22:00,off Thu-08:00,{{ rclone_bandbreite }} 22:00,off Fri-08:00,{{ rclone_bandbreite }} 22:00,off Sat-09:00,{{ rclone_bandbreite }} 23:00,off Sun-09:00,{{ rclone_bandbreite }} 22:00,off" --contimeout 60s --timeout 300s --retries 5 --low-level-retries 10 --max-backlog 300000 --stats 5s --drive-server-side-across-configs=true --delete-after --progress --stats-file-name-length 120 --drive-chunk-size 64M --fast-list --exclude /.recycle/** "/shares/amd" "gdrive-v3-encrypt:/amd" --backup-dir "gdrive-v3-encrypt:/old/amd/$dt"
echo "GSuite - Backup"
/usr/local/bin/rclone --config /root/rclone/config/rclone.conf copy --drive-stop-on-upload-limit --dry-run --ignore-existing --log-file="/root/rclone/logs/log_tmp_$dt.txt" --log-level INFO --transfers 4 --checkers 8 --bwlimit "Mon-08:00,{{ rclone_bandbreite }} 22:00,off Tue-08:00,{{ rclone_bandbreite }} 22:00,off Wed-08:00,{{ rclone_bandbreite }} 22:00,off Thu-08:00,{{ rclone_bandbreite }} 22:00,off Fri-08:00,{{ rclone_bandbreite }} 22:00,off Sat-09:00,{{ rclone_bandbreite }} 23:00,off Sun-09:00,{{ rclone_bandbreite }} 22:00,off" --contimeout 60s --timeout 300s --retries 5 --low-level-retries 10 --max-backlog 300000 --stats 5s --drive-server-side-across-configs=true --delete-after --progress --stats-file-name-length 120 --drive-chunk-size 64M --fast-list --exclude /.recycle/** "/shares/Backup" "gdrive-v3-encrypt:/Backup" --backup-dir "gdrive-v3-encrypt:/old/backup/$dt"
echo "GSuite - Musik"
/usr/local/bin/rclone --config /root/rclone/config/rclone.conf copy --drive-stop-on-upload-limit --dry-run --ignore-existing --log-file="/root/rclone/logs/log_tmp_$dt.txt" --log-level INFO --transfers 6 --checkers 12 --bwlimit "Mon-08:00,{{ rclone_bandbreite }} 22:00,off Tue-08:00,{{ rclone_bandbreite }} 22:00,off Wed-08:00,{{ rclone_bandbreite }} 22:00,off Thu-08:00,{{ rclone_bandbreite }} 22:00,off Fri-08:00,{{ rclone_bandbreite }} 22:00,off Sat-09:00,{{ rclone_bandbreite }} 23:00,off Sun-09:00,{{ rclone_bandbreite }} 22:00,off" --contimeout 60s --timeout 300s --retries 5 --low-level-retries 10 --max-backlog 300000 --stats 5s --drive-server-side-across-configs=true --delete-after --progress --stats-file-name-length 120 --drive-chunk-size 64M --fast-list --exclude /.recycle/** "/shares/Musik" "gdrive-v2:/unverschluesselt/Musik" --backup-dir "gdrive-v2:/old/Musik/$dt"
echo "GSuite - Videos"
/usr/local/bin/rclone --config /root/rclone/config/rclone.conf copy --drive-stop-on-upload-limit --dry-run --ignore-existing --log-file="/root/rclone/logs/log_tmp_$dt.txt" --log-level INFO --transfers 2 --checkers 4 --bwlimit "Mon-08:00,{{ rclone_bandbreite }} 22:00,off Tue-08:00,{{ rclone_bandbreite }} 22:00,off Wed-08:00,{{ rclone_bandbreite }} 22:00,off Thu-08:00,{{ rclone_bandbreite }} 22:00,off Fri-08:00,{{ rclone_bandbreite }} 22:00,off Sat-09:00,{{ rclone_bandbreite }} 23:00,off Sun-09:00,{{ rclone_bandbreite }} 22:00,off" --contimeout 60s --timeout 300s --retries 5 --low-level-retries 10 --max-backlog 300000 --stats 5s --drive-server-side-across-configs=true --delete-after --progress --stats-file-name-length 120 --drive-chunk-size 64M --fast-list --exclude /.recycle/** "/shares/Videos" "gdrive-v2:/unverschluesselt/Videos" --backup-dir "gdrive-v2:/old/video/$dt"

View File

@ -1,13 +0,0 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.{yml,yml.dist,yml.js2}]
indent_style = space
indent_size = 2

View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2015 Igor Mukhin <igor.mukhin@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,39 +0,0 @@
# ansible-role-bash_aliases
Ansible role for setting aliases in ~/.bash_aliases for Debian/Ubuntu.
## Prerequisites
First of all you should install [Ansible](http://www.ansible.com/home) on your machine, official [docs](http://docs.ansible.com/intro_installation.html) should help you with that.
# Installation
```bash
ansible-galaxy install igor_mukhin.bash_aliases
```
## Example playbook
Lets make aliases for most used symfony2 console commands
```yml
# playbook.yml
vars:
# See all available variables at defaults/main.yml
bash_aliases:
- { alias: 'sf', command: 'php app/console' }
- { alias: 'sfcc', command: 'sf cache:clear' }
- { alias: 'sfccnw', command: 'sfcc --no-warmup' }
- { alias: 'sfl', command: 'sf list' }
- { alias: 'sflg', command: 'sf list | grep' }
# You also can add extra lines in any format to .bash_aliases
bash_aliases_extra:
- "git config --global alias.unstage 'reset HEAD --'"
roles:
- { role: igor_mukhin.bash_aliases, sudo: false }
```

View File

@ -1,9 +0,0 @@
---
bash_aliases_path: "~/.bash_aliases"
bash_aliases: false
bash_aliases_extra: false
# - alias sf="php app/console"
# - alias sflg="sf list|grep"

View File

@ -1,18 +0,0 @@
---
dependencies: []
galaxy_info:
author: igor_mukhin
description: Set aliases in ~/.bash_aliases for Debian/Ubuntu
license: "MIT"
min_ansible_version: 1.8
platforms:
- name: Ubuntu
versions:
- all
- name: Debian
versions:
- all
galaxy_tags:
- system

View File

@ -1,20 +0,0 @@
---
- name: Bash aliases | Add aliases
lineinfile:
dest: "{{ bash_aliases_path }}"
create: yes
mode: 0644
line: 'alias {{ item.alias }}="{{ item.command }}"'
regexp: "^alias {{ item.alias }}="
with_items: "{{ bash_aliases }}"
when: bash_aliases != false
- name: Bash aliases | Add extra
lineinfile:
dest: "{{ bash_aliases_path }}"
create: yes
mode: 0644
line: "{{ item }}"
with_items: "{{ bash_aliases_extra }}"
when: bash_aliases_extra != false

View File

@ -1,10 +0,0 @@
---
- hosts: all
vars:
bash_aliases:
- { alias: 'sf', command: 'php app/console2' }
roles:
- "../../mgrote.bash_aliases"

View File

@ -1,6 +0,0 @@
## mgrote.cockpit
### Beschreibung
Installiert [Cockpit](https://cockpit-project.org/)
### Funktioniert auf
- [x] Ubuntu (>=18.04)

View File

@ -1 +0,0 @@
---

View File

@ -1 +0,0 @@
---

View File

@ -1,6 +0,0 @@
- name: install cockpit
become: yes
apt:
name:
- cockpit
state: present

View File

@ -1,35 +0,0 @@
## mgrote.fileserver_mergerfs
### Beschreibung
Diese Rolle richtet mergerFS ein und mountet die ausgewaehlten Festplatten unter /mnt/HDD*.
Danach werden die Festplatten mit mergerFS unter /shares zusammengefasst.
Cave: Die Festplatten muessen vorher mit einem Dateisystem versehen sein. (mkfs.ext4 /dev/disk/by-id/XXXXX)
Erstellt einen Cronjob der "tree" ausfuehrt und unter "/root/tree/tree.txt" speichert.
### Funktioniert auf
- [x] Ubuntu (>=18.04)
- [ ] Debian
### Variablen + Defaults
##### Mount Optionen
mount_optionen: defaults,allow_other,direct_io,use_ino,moveonenospc=true,category.create=mfs,minfreespace=100G,nonempty
##### wohin die Laufwerke gemountet werden sollen
mergerfs_mountpoint: "/shares"
##### Minuten wann "tree" ausgefuehrt wird
mergerfs_tree_cron_minutes: 30
##### Stunden wann "tree" ausgefuehrt wird
mergerfs_tree_cron_hours: 5
##### Welche Festplatten gemountet UND eingebunden werden soll
- "ordner:XXX" <-- muss HDDx sein
- hier ist KEIN default gesetzt
```
sources:
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1', ordner: 'HDD1'}
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2', ordner: 'HDD2'}
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi3', ordner: 'HDD3'}
- { pfad: '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi4', ordner: 'HDD4'}
```

View File

@ -1,5 +0,0 @@
---
mount_optionen: defaults,allow_other,direct_io,use_ino,moveonenospc=true,category.create=mfs,minfreespace=100G,nonempty
mergerfs_mountpoint: "/shares"
mergerfs_tree_cron_minutes: 30
mergerfs_tree_cron_hours: 5

View File

@ -1,55 +0,0 @@
- name: mergerFS installieren
become: yes
apt:
name:
- mergerfs
- python3
- fuse
state: present
- name: mergerFS-Tools installieren
become: yes
git:
repo: https://github.com/trapexit/mergerfs-tools.git
dest: /usr/local/bin/mergerfs_tools
version: 2.29.0
- name: "einzelne Laufwerke mounten"
become: yes
mount:
path: /mnt/{{ item.ordner }}
src: "{{ item.pfad }}"
fstype: ext4
state: mounted
loop: "{{ laufwerke }}"
- name: "Mount mergerFS"
become: yes
mount:
path: "{{ mergerfs_mountpoint }}"
src: "/mnt/HDD*"
opts: "{{ mount_optionen }}"
fstype: fuse.mergerfs
state: present
- name: Ordner "tree" erstellen
become: yes
file:
path: /root/tree
state: directory
- name: Kopiere Tree-Script
become: yes
template:
src: tree.sh
dest: /root/tree/tree.sh
mode: a+x
- name: cronjob fuer tree.sh anlegen
become: yes
cron:
name: tree
state: present
job: "/root/tree/tree.sh"
minute: "{{ mergerfs_tree_cron_minutes }}"
hour: "{{ mergerfs_tree_cron_hours }}"

View File

@ -1,2 +0,0 @@
#!/bin/bash
tree / > /root/tree/tree.txt

View File

@ -1,57 +0,0 @@
## mgrote.telegraf
### Beschreibung
Installiert und konfiguriert "telegraf".
Telegraf ist fuer das [[Grafana Dashboard 928|https://grafana.com/grafana/dashboards/928]] konfiguriert.
### Funktioniert auf
- [x] Ubuntu (>=18.04)
- [x] Debian
- [x] ProxMox 6.1
### Variablen + Defaults
##### InfluxDB Protocol
`telegraf_influxdb_srv_protocol: "http://"`
##### InfluxDB FQDN
`telegraf_influxdb_srv_fqdn: grafana.grote.lan`
##### InfluxDB Port - ist Pflichtangabe
`telegraf_influxdb_srv_port: 8086`
##### Basis-Metriken aktivieren
`telegraf_base_metrics: true`
##### APCUPSD-Metriken aktivieren
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "apcupsd".
- [[Grafana Dashboard|https://grafana.com/grafana/dashboards/10977]]
`telegraf_apcupsd_metrics: true`
##### HDDTEMP-Metriken aktivieren
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "hddtemp".
`telegraf_hddtemp_metrics: true`
##### SMART-Metriken aktivieren
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "smartctl".
`telegraf_smart_pfad_zu_smartctl: "/usr/sbin/smartctl"`
`telegraf_smart_metrics: true`
##### x509-Metriken aktivieren
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "x509 Zertifikaten" bei nginx.
`telegraf_x509_metrics: true`
```
telegraf_x509_domains:
- "https://mgrote.net:443"
- "https://dokuwiki.mgrote.net:443"
- "https://miniflux.mgrote.net:443"
```
- [[Grafana-Dashboard|https://grafana.com/grafana/dashboards/11707]]
- Der Port ist Pflicht.
##### ZFS-Metriken aktivieren
`telegraf_zfs_metrics: true`
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "zfs".
- [[Grafana Dashboard|https://gist.github.com/bartmeuris/41caf0998f38a2fae7cf1ff92cd4a5fa]]
##### Postgres-Metriken aktivieren
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "postgres".
- [[Grafana Dashboard|https://grafana.com/grafana/dashboards/355]]
- Die Zugangsdaten mit denen sich telegraf bei Postgres anmeldet um die Metriken zu sammeln.
`telegraf_postgres_metrics: true`
`telegraf_postgres_name_db_user: "telegraf_db_user"`
`telegraf_postgres_password_db_user: "geheim"`
`telegraf_postgres_name_db: "telegraf_db"`
##### lm_sensors-Metriken aktivieren (Temperaturen o.Ä.)
`telegraf_lm_sensors_metrics: true`
- Installiert und konfiguriert telegraf fuer das Sammeln von Metriken von "lm_sensors".

View File

@ -1,20 +0,0 @@
---
### Module
telegraf_installieren: true
telegraf_base_metrics: true
telegraf_apcupsd_metrics: false
telegraf_hddtemp_metrics: false
telegraf_smart_metrics: false
telegraf_x509_metrics: false
telegraf_zfs_metrics: false
telegraf_postgres_metrics: false
telegraf_lm_sensors_metrics: false
### smartctl
telegraf_smart_pfad_zu_smartctl: "/usr/sbin/smartctl"
### telegraf.conf
telegraf_influxdb_srv_protocol: "http://"
telegraf_influxdb_srv_fqdn: "tig.grote.lan"
telegraf_influxdb_srv_port: "8086"
telegraf_database_name: "telegraf"

View File

@ -1,14 +0,0 @@
- name: restart_telegraf
become: yes
systemd:
name: telegraf
enabled: yes
state: restarted
- name: restart_hddtemp
become: yes
systemd:
name: hddtemp
state: restarted
enabled: yes

View File

@ -1,103 +0,0 @@
- name: Apt-key hinzufuegen fuer das telegraf-repository
become: yes
apt_key:
url: https://repos.influxdata.com/influxdb.key
state: present
when: telegraf_installieren
- name: telegraf-repository hinzufuegen
become: yes
apt_repository:
repo: 'deb https://repos.influxdata.com/ubuntu {{ ansible_distribution_release }} stable'
state: present
filename: telegraf_repo
update_cache: yes
when: telegraf_installieren
- name: telegraf installieren
become: yes
apt:
name: telegraf
state: present
when: telegraf_installieren
- name: telegraf deinstallieren
become: yes
apt:
name: telegraf
state: absent
when: not telegraf_installieren
- name: telegraf.conf kopieren
become: yes
template:
src: "telegraf.conf"
dest: "/etc/telegraf/telegraf.conf"
notify: restart_telegraf
when: telegraf_installieren
# "aktivieren"
- name: add base_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_base_metrics.yml'
when: telegraf_base_metrics
- name: add apcupsd_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_apcupsd_metrics.yml'
when: telegraf_apcupsd_metrics
- name: add hddtemp_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_hddtemp_metrics.yml'
when: telegraf_hddtemp_metrics
- name: add smart_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_smart_metrics.yml'
when: telegraf_smart_metrics
- name: add x509_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_x509_metrics.yml'
when: telegraf_x509_metrics
- name: add zfs_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_zfs_metrics.yml'
when: telegraf_zfs_metrics
- name: add postgres_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_postgres_metrics.yml'
when: telegraf_postgres_metrics
- name: add lm_sensors_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/add_lm_sensors_metrics.yml'
when: telegraf_lm_sensors_metrics
# deaktivieren
- name: add base_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_base_metrics.yml'
when: not telegraf_base_metrics
- name: add apcupsd_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_apcupsd_metrics.yml'
when: not telegraf_apcupsd_metrics
- name: add hddtemp_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_hddtemp_metrics.yml'
when: not telegraf_hddtemp_metrics
- name: add smart_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_smart_metrics.yml'
when: not telegraf_smart_metrics
- name: add x509_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_x509_metrics.yml'
when: not telegraf_x509_metrics
- name: add zfs_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_zfs_metrics.yml'
when: not telegraf_zfs_metrics
- name: add postgres_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_postgres_metrics.yml'
when: not telegraf_postgres_metrics
- name: add lm_sensors_metrics tasks
import_tasks: '{{ role_path }}/tasks/metrics/remove_lm_sensors_metrics.yml'
when: not telegraf_lm_sensors_metrics

View File

@ -1,10 +0,0 @@
- import_role:
name: mgrote.apcupsd
- name: apcupsd.conf kopieren
become: yes
template:
src: "apcupsd.conf"
dest: "/etc/telegraf/telegraf.d/apcupsd.conf"
notify: restart_telegraf
#https://grafana.com/grafana/dashboards/10977

View File

@ -1,6 +0,0 @@
- name: base_metrics.conf kopieren
become: yes
template:
src: "base_metrics.conf"
dest: "/etc/telegraf/telegraf.d/base_metrics.conf"
notify: restart_telegraf

View File

@ -1,19 +0,0 @@
- name: hddtemp installieren
become: yes
apt:
name: hddtemp
state: present
- name: hddtemp kopieren
become: yes
template:
src: "hddtemp"
dest: "/etc/default/hddtemp"
notify: restart_hddtemp
- name: hddtemp.conf kopieren
become: yes
template:
src: "hddtemp.conf"
dest: "/etc/telegraf/telegraf.d/hddtemp.conf"
notify: restart_telegraf

View File

@ -1,12 +0,0 @@
- name: lm-sensors installieren
become: yes
apt:
name: lm-sensors
state: present
- name: lm_sensors.conf kopieren
become: yes
template:
src: "lm_sensors.conf"
dest: "/etc/telegraf/telegraf.d/lm_sensors.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: postgres.conf kopieren
become: yes
template:
src: "postgres.conf"
dest: "/etc/telegraf/telegraf.d/postgres.conf"
notify: telegraf_starten_aktivieren

View File

@ -1,21 +0,0 @@
- name: smartmontools installieren
become: yes
apt:
name: smartmontools
state: present
- name: telegraf passwordless sudo
become: yes
blockinfile:
path: /etc/sudoers
block: |
Cmnd_Alias SMARTCTL = {{ telegraf_smart_pfad_zu_smartctl }}
telegraf ALL=(ALL) NOPASSWD: SMARTCTL
Defaults!SMARTCTL !logfile, !syslog, !pam_session
- name: smart.conf kopieren
become: yes
template:
src: "smart.conf"
dest: "/etc/telegraf/telegraf.d/smart.conf"
notify: restart_telegraf

View File

@ -1,7 +0,0 @@
- name: ssl.conf kopieren
become: yes
template:
src: "ssl.conf"
dest: "/etc/telegraf/telegraf.d/ssl.conf"
notify: restart_telegraf
#https://grafana.com/grafana/dashboards/11707

View File

@ -1,7 +0,0 @@
- name: zfs.conf kopieren
become: yes
template:
src: "zfs.conf"
dest: "/etc/telegraf/telegraf.d/zfs.conf"
notify: restart_telegraf
#https://gist.github.com/bartmeuris/41caf0998f38a2fae7cf1ff92cd4a5fa

View File

@ -1,6 +0,0 @@
- name: remove apcupsd.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/apcupsd.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove base_metrics.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/base_metrics.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove hddtemp.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/hddtemp.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove lm_sensors.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/lm_sensors.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove postgres.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/postgres.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove smart.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/smart.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove ssl.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/ssl.conf"
notify: restart_telegraf

View File

@ -1,6 +0,0 @@
- name: remove zfs.conf
become: yes
file:
state: absent
path: "/etc/telegraf/telegraf.d/zfs.conf"
notify: restart_telegraf

View File

@ -1,2 +0,0 @@
[[inputs.apcupsd]]
#https://grafana.com/grafana/dashboards/10977

View File

@ -1,18 +0,0 @@
[[inputs.cpu]]
percpu = true
totalcpu = true
fielddrop = ["time_*"]
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs"]
[[inputs.diskio]]
skip_serial_number = false
interval = "30s"
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]
[[inputs.net]]
[[inputs.netstat]]
[[inputs.interrupts]]
[[inputs.linux_sysctl_fs]]

View File

@ -1,38 +0,0 @@
# Defaults for hddtemp initscript (/etc/init.d/hddtemp)
# This is a POSIX shell fragment
# Master system-wide hddtemp switch. The initscript will not run if it is not
# set to true. STOP THE SERVICE BEFORE DISABLING IT!
# [automatically edited by postinst, do not change line format or set it to
# anything but false or true ]
RUN_DAEMON="true"
# List of devices you want to use with hddtemp. If none specified,
# hddtemp will probe standard devices.
#DISKS="/dev/sda /dev/sdb" # your hard drive here hda or hdb etc.
# List of devices you want to use with hddtemp, but that would not be
# probed for a working sensor.
DISKS_NOPROBE=""
# IP address of the interface on which you want hddtemp to be bound
# on. If none specified, goes to 127.0.0.1. Use 0.0.0.0 to bind hddtemp
# on all interfaces.
INTERFACE="127.0.0.1"
# Port number on which you want hddtemp to listen on. If none specified,
# the port 7634 is used.
PORT="7634"
# Database file to use. If none specified, /etc/hddtemp.db is used.
#DATABASE="/etc/hddtemp.db"
# Separator to use between fields. The default separator is '|'.
#SEPARATOR="|"
# Logging period (in seconds) for the temperatures.
SYSLOG="300" # 300 = every 5 minutes
# Other options to pass to hddtemp
OPTIONS=""

View File

@ -1,5 +0,0 @@
[[inputs.hddtemp]]
interval = "30s"
[[inputs.temp]]
interval = "30s"

View File

@ -1,6 +0,0 @@
[[inputs.sensors]]
# Remove numbers from field names. If true, a field name like 'temp1_input' will be changed to 'temp_input'.
#remove_numbers = true
# Timeout is the maximum amount of time that the sensors command can run.
#timeout = "5s"

View File

@ -1,2 +0,0 @@
[[inputs.postgresql]]
address = "postgres://{{ telegraf_postgres_name_db_user }}:{{ telegraf_postgres_password_db_user }}@localhost/{{ telegraf_postgres_name_db }}?sslmode=disable"

View File

@ -1,36 +0,0 @@
# Read metrics from storage devices supporting S.M.A.R.T.
[[inputs.smart]]
interval = "300s"
## Optionally specify the path to the smartctl executable
# path = "/usr/bin/smartctl"
## On most platforms smartctl requires root access.
## Setting 'use_sudo' to true will make use of sudo to run smartctl.
## Sudo must be configured to to allow the telegraf user to run smartctl
## without a password.
use_sudo = true
## Skip checking disks in this power mode. Defaults to
## "standby" to not wake up disks that have stoped rotating.
## See --nocheck in the man pages for smartctl.
## smartctl version 5.41 and 5.42 have faulty detection of
## power mode and might require changing this value to
## "never" depending on your disks.
nocheck = "standby"
## Gather all returned S.M.A.R.T. attribute metrics and the detailed
## information from each drive into the `smart_attribute` measurement.
#attributes = true
## Optionally specify devices to exclude from reporting.
# excludes = [ "/dev/pass6" ]
## Optionally specify devices and device type, if unset
## a scan (smartctl --scan) for S.M.A.R.T. devices will
## done and all found will be included except for the
## excluded in excludes.
# devices = [ "/dev/ada0 -d atacam" ]
## Timeout for the smartctl command to complete.
timeout = "30s"

View File

@ -1,5 +0,0 @@
[[inputs.x509_cert]]
sources= {{ telegraf_x509_domains | to_json }}
interval = "1800s"
# 1800 damit nicht alls 10 sekunden dns abfragen gestellt werden
# to_json damit am anfang nicht u'variable steht

View File

@ -1,20 +0,0 @@
[global_tags]
[agent]
interval = "30s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
hostname = ""
omit_hostname = false
logfile = "/var/log/telegraf/telegraf.log"
[[outputs.influxdb]] urls = ["{{ telegraf_influxdb_srv_protocol }}{{ telegraf_influxdb_srv_fqdn }}:{{ telegraf_influxdb_srv_port }}"]
## The target database for metrics; will be created as needed.
database = "{{ telegraf_database_name }}"

View File

@ -1,3 +0,0 @@
[[inputs.zfs]]
poolMetrics = true
#https://gist.github.com/bartmeuris/41caf0998f38a2fae7cf1ff92cd4a5fa

View File

@ -1,18 +0,0 @@
---
### mgrote.zfs_tools
zfs_arc_max: "12884901888"
zfs_pool:
- { name: "zfs_vm_mirror", cron_minute_zfs_trim: "12", cron_hour_zfs_trim: "23", cron_month_zfs_trim: "4,8,12", cron_day_zfs_trim: "2", cron_weekday_zfs_scrub: "0", cron_minutes_zfs_scrub: "0", cron_hour_zfs_scrub: "3"}
- { name: "zfs_single_hdd", cron_minute_zfs_trim: "12", cron_hour_zfs_trim: "23", cron_month_zfs_trim: "4,8,12", cron_day_zfs_trim: "3", cron_weekday_zfs_scrub: "0", cron_minutes_zfs_scrub: "0", cron_hour_zfs_scrub: "5"}
### mgrote.apcupsd
ONBATTERYDELAY: 10
BATTERYLEVEL: 50
MINUTES: 10
### mgrote.postfix-gmail
mail_nach_cronjob: false
### mgrote.smart
smart_smartctlmail_cron_minutes: "15"
smart_smartctlmail_cron_hours: "6"
smart_smartctlmail_cron_weekday: "3"
### Extra
sudo: false

View File

@ -1,18 +0,0 @@
---
### mgrote.zfs_tools
zfs_arc_max: "12884901888"
zfs_pool:
- { name: "zfs_vm_mirror", cron_minute_zfs_trim: "12", cron_hour_zfs_trim: "23", cron_month_zfs_trim: "4,8,12", cron_day_zfs_trim: "2", cron_weekday_zfs_scrub: "0", cron_minutes_zfs_scrub: "0", cron_hour_zfs_scrub: "3"}
- { name: "zfs_single_hdd", cron_minute_zfs_trim: "12", cron_hour_zfs_trim: "23", cron_month_zfs_trim: "4,8,12", cron_day_zfs_trim: "3", cron_weekday_zfs_scrub: "0", cron_minutes_zfs_scrub: "0", cron_hour_zfs_scrub: "5"}
### mgrote.apcupsd
ONBATTERYDELAY: 10
BATTERYLEVEL: 50
MINUTES: 10
### mgrote.postfix-gmail
mail_nach_cronjob: false
### mgrote.smart
smart_smartctlmail_cron_minutes: "15"
smart_smartctlmail_cron_hours: "6"
smart_smartctlmail_cron_weekday: "3"
### Extra
sudo: false

View File

@ -1,14 +0,0 @@
---
- hosts: testeinzeln
roles:
- { role: mgrote.telegraf, tags: "telegraf" }
vars:
telegraf_base_metrics: true
telegraf_apcupsd_metrics: false
telegraf_hddtemp_metrics: false
telegraf_smart_metrics: false
telegraf_x509_metrics: false
telegraf_zfs_metrics: false
telegraf_postgres_metrics: false
telegraf_lm_sensors_metrics: false