chore(vaultwarden): fix lints

This commit is contained in:
Jan Christian Grünhage 2023-04-18 11:40:10 +02:00
parent 9ddd0c503a
commit 0073f818f4
4 changed files with 20 additions and 55 deletions

View file

@ -1,7 +1,7 @@
---
- name: Restart vaultwarden
docker_container:
community.docker.docker_container:
name: "{{ vaultwarden_container_name }}"
state: "started"
restart: yes
restart: true
listen: "restart-vaultwarden"

View file

@ -1,53 +1,18 @@
---
galaxy_info:
author: Vincent Wilke & Jadyn Emma Jäger
description: role to install vaultwarden with docker
description: Role to install vaultwarden with docker
company: Famedly GmbH
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
license: AGPL-3.0-only
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: GNU Affero General Public License v3
min_ansible_version: "2.11"
min_ansible_version: 2.5
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Debian
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
platforms:
- name: Debian
versions:
- bullseye
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View file

@ -1,31 +1,31 @@
---
- name: Ensure user is created
user:
ansible.builtin.user:
name: "{{ vaultwarden_user }}"
state: present
system: yes
system: true
register: vaultwarden_user_res
- name: Ensure vaultwarden config directory exists and is owned by vaultwarden user
file:
ansible.builtin.file:
path: "{{ vaultwarden_config_dir }}"
state: directory
mode: 0755
mode: "0755"
owner: "{{ vaultwarden_user_res.uid }}"
group: "{{ vaultwarden_user_res.group }}"
recurse: yes
recurse: true
- name: Ensure configuration is templated
copy:
ansible.builtin.copy:
content: "{{ vaultwarden_config_merged | to_nice_json }}"
dest: "{{ vaultwarden_config_file }}"
mode: 0755
mode: "0755"
owner: "{{ vaultwarden_user_res.uid }}"
group: "{{ vaultwarden_user_res.group }}"
notify: "restart-vaultwarden"
- name: Ensure vaultwarden container image is present
docker_image:
community.docker.docker_image:
name: "{{ vaultwarden_container_image_reference }}"
state: present
source: pull
@ -36,7 +36,7 @@
delay: 3
- name: Ensure vaultwarden container image is running
docker_container:
community.docker.docker_container:
image: "{{ vaultwarden_container_image_reference }}"
name: "{{ vaultwarden_container_name }}"
env: "{{ vaultwarden_container_env_merged }}"

View file

@ -3,7 +3,7 @@ vaultwarden_container_labels_merged: "{{ vaultwarden_container_labels_base | com
vaultwarden_container_labels_base:
version: "{{ vaultwarden_version }}"
vaultwarden_container_volumes_merged: "{{ vaultwarden_container_volumes_base + vaultwarden_container_volumes | default ([]) }}"
vaultwarden_container_volumes_merged: "{{ vaultwarden_container_volumes_base + vaultwarden_container_volumes | default([]) }}"
vaultwarden_container_volumes_base:
- "{{ vaultwarden_config_dir }}:/data:rw"