From 23b09bdfbdf8c21f8b687cc10c9b9bfa385085db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Sat, 16 Jan 2021 22:02:44 +0000 Subject: [PATCH] Move bitwarden to role --- group_vars/all.yml | 20 +------------------ nas.yml | 9 +++++---- roles/bitwarden/defaults/main.yml | 15 ++++++++++++++ .../bitwarden/tasks/main.yml | 0 4 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 roles/bitwarden/defaults/main.yml rename tasks/bitwarden.yml => roles/bitwarden/tasks/main.yml (100%) diff --git a/group_vars/all.yml b/group_vars/all.yml index 11a5034a..fb6345fb 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -380,7 +380,7 @@ couchpotato_downloads_directory: "{{ downloads_root }}" couchpotato_torrents_directory: "{{ torrents_root }}" couchpotato_user_id: "0" couchpotato_group_id: "0" -couchpotato_port: "5050" +couchpotato_port: "5050" ### ### OpenVPN @@ -526,24 +526,6 @@ thelounge_data_directory: "{{ docker_home }}/thelounge" thelounge_port_one: "113" thelounge_port_two: "9002" -### -### Bitwarden -### -bitwarden_available_externally: "false" -bitwarden_data_directory: "{{ docker_home }}/bitwarden" -bitwarden_port_a: "19080" -bitwarden_port_b: "3012" - -# Keep this token secret, this is password to access admin area of your server! -# This token can be anything, but it's recommended to use a long, randomly generated string of characters, -# for example running openssl rand -base64 48 -bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321 - -# To create a user set this to "true", and reprovision the container by re-running the ansible-nas playbook. -# Once you have created your user, set to "false" and run one more time. -# Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden -bitwarden_allow_signups: false - ### ### Firefly ### diff --git a/nas.yml b/nas.yml index 800d0de7..f2a11257 100644 --- a/nas.yml +++ b/nas.yml @@ -53,6 +53,11 @@ - bazarr when: (bazarr_enabled | default(False)) + - role: bitwarden + tags: + - bitwarden + when: (bitwarden_enabled | default(False)) + - role: emby tags: - emby @@ -227,10 +232,6 @@ when: (joomla_enabled | default(False)) tags: joomla - - import_tasks: tasks/bitwarden.yml - when: (bitwarden_enabled | default(False)) - tags: bitwarden - - import_tasks: tasks/nzbget.yml when: (nzbget_enabled | default(False)) tags: nzbget diff --git a/roles/bitwarden/defaults/main.yml b/roles/bitwarden/defaults/main.yml new file mode 100644 index 00000000..715b4acb --- /dev/null +++ b/roles/bitwarden/defaults/main.yml @@ -0,0 +1,15 @@ +--- +bitwarden_available_externally: "false" +bitwarden_data_directory: "{{ docker_home }}/bitwarden" +bitwarden_port_a: "19080" +bitwarden_port_b: "3012" + +# Keep this token secret, this is password to access admin area of your server! +# This token can be anything, but it's recommended to use a long, randomly generated string of characters, +# for example running openssl rand -base64 48 +bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321 + +# To create a user set this to "true", and reprovision the container by re-running the ansible-nas playbook. +# Once you have created your user, set to "false" and run one more time. +# Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden +bitwarden_allow_signups: false \ No newline at end of file diff --git a/tasks/bitwarden.yml b/roles/bitwarden/tasks/main.yml similarity index 100% rename from tasks/bitwarden.yml rename to roles/bitwarden/tasks/main.yml