diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..1fac358
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,4 @@
+# Feel free to add yourself after && during participating at this repo!
+
+github: [do1jlr]
+liberapay: L3D
diff --git a/.github/license.svg b/.github/license.svg
new file mode 100644
index 0000000..4ab6d9a
--- /dev/null
+++ b/.github/license.svg
@@ -0,0 +1,217 @@
+
+
diff --git a/LICENSE b/LICENSE
index 3bdf835..86c4832 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,7 @@
MIT License
-Copyright (c) 2020 L3D
+Copyright (c) 2020 L3D
+Copyright (c) 2020 L3D and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/defaults/main.yml b/defaults/main.yml
new file mode 100644
index 0000000..e8221d2
--- /dev/null
+++ b/defaults/main.yml
@@ -0,0 +1,6 @@
+---
+# should we do a version check? (recomended)
+submodules_versioncheck: false
+
+postgresql_backup:
+ foo: bar
diff --git a/tasks/main.yml b/tasks/main.yml
new file mode 100644
index 0000000..2b5a507
--- /dev/null
+++ b/tasks/main.yml
@@ -0,0 +1,8 @@
+---
+- name: combine postgresql_backup configuration
+ set_fact:
+ ranger: "{{ _postgresql_backup|combine(postgresql_backup, recursive=True) }}"
+
+- include_tasks: versioncheck.yml
+ when: submodules_versioncheck|bool
+
diff --git a/tasks/versioncheck.yml b/tasks/versioncheck.yml
new file mode 100644
index 0000000..9895582
--- /dev/null
+++ b/tasks/versioncheck.yml
@@ -0,0 +1,44 @@
+---
+- name: Create directory for versionscheck
+ become: true
+ file:
+ path: '/etc/.ansible-version'
+ state: directory
+ mode: 0755
+ when: submodules_versioncheck|bool
+
+- name: check playbook version
+ become: true
+ slurp:
+ src: "/etc/.ansible-version/{{ playbook_version_path }}"
+ register: playbook_version
+ when: submodules_versioncheck|bool
+ ignore_errors: yes
+
+- name: Print remote role version
+ debug:
+ msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
+ when: submodules_versioncheck|bool
+
+- name: Print locale role version
+ debug:
+ msg: "Local role version: '{{ playbook_version_number|string }}'."
+ when: submodules_versioncheck|bool
+
+- name: Check if your version is outdated
+ fail:
+ msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
+ when:
+ - playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
+
+- name: check if '/etc/ansible-version/' is empty
+ find:
+ paths: '/etc/ansible-version/'
+ register: filesFound
+
+- name: write new version to remote disk
+ become: true
+ copy:
+ content: "{{ playbook_version_number }}"
+ dest: "/etc/.ansible-version/{{ playbook_version_path }}"
+ when: submodules_versioncheck|bool
diff --git a/vars/main.yml b/vars/main.yml
new file mode 100644
index 0000000..a9e1aea
--- /dev/null
+++ b/vars/main.yml
@@ -0,0 +1,7 @@
+---
+# versionscheck
+playbook_version_number: 10 # should be int
+playbook_version_path: 'role-postgresql-backup_roles-ansible_github.com.version' # unique string
+
+_postgresql_backup:
+ foo: bar