From dff842337883176a922691ac33cfb049918f7ba8 Mon Sep 17 00:00:00 2001 From: mg Date: Thu, 19 May 2022 22:03:14 +0200 Subject: [PATCH] lvm: Logik Playbook (#365) Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/ansible/pulls/365 Co-authored-by: mg Co-committed-by: mg --- group_vars/docker.yml | 1 - playbooks/2_all.yml | 1 + playbooks/3_service/docker.yml | 1 - playbooks/3_service/gitea.yml | 1 - playbooks/base/lvm.yml | 8 ++++++++ 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 playbooks/base/lvm.yml diff --git a/group_vars/docker.yml b/group_vars/docker.yml index fc3d62ad..cd67cbcf 100644 --- a/group_vars/docker.yml +++ b/group_vars/docker.yml @@ -13,7 +13,6 @@ mount: true mntp: /var/lib/docker manage_lvm: true - ### mgrote.user users: - username: mg diff --git a/playbooks/2_all.yml b/playbooks/2_all.yml index ccddba75..46676b3c 100644 --- a/playbooks/2_all.yml +++ b/playbooks/2_all.yml @@ -16,3 +16,4 @@ - import_playbook: base/remove_snapd.yml - import_playbook: base/unattended_upgrades.yml - import_playbook: base/update_packages.yml + - import_playbook: base/lvm.yml diff --git a/playbooks/3_service/docker.yml b/playbooks/3_service/docker.yml index 5c1bb4a9..312adf40 100644 --- a/playbooks/3_service/docker.yml +++ b/playbooks/3_service/docker.yml @@ -1,7 +1,6 @@ --- - hosts: docker roles: - - { role: mrlesmithjr.ansible-manage-lvm, tags: "lvm", become: true } - { role: geerlingguy.pip, tags: "pip", become: true } - { role: geerlingguy.docker, tags: "docker", become: true } - { role: gantsign.ctop, tags: "ctop", become: true } diff --git a/playbooks/3_service/gitea.yml b/playbooks/3_service/gitea.yml index 5b39d6e5..a4a79e91 100644 --- a/playbooks/3_service/gitea.yml +++ b/playbooks/3_service/gitea.yml @@ -1,6 +1,5 @@ --- - hosts: gitea roles: - - { role: mrlesmithjr.ansible-manage-lvm, tags: "lvm", become: true } - { role: mgrote.postfix, tags: "postfix" } - { role: tmaurice.gitea, tags: "gitea", become: true } diff --git a/playbooks/base/lvm.yml b/playbooks/base/lvm.yml new file mode 100644 index 00000000..7bab0a9a --- /dev/null +++ b/playbooks/base/lvm.yml @@ -0,0 +1,8 @@ +--- + - hosts: all + roles: + - { role: mrlesmithjr.ansible-manage-lvm, + tags: "lvm", + become: true, + when: manage_lvm == true and manage_lvm is defined } + # $manage_lvm gehört zu dieser Rolle, wird aber extra abgefragt um das PLaybook zu "aktivieren"