From 9aade013e2784ac47fd066d9d0780daba1a0292e Mon Sep 17 00:00:00 2001 From: chatton Date: Thu, 25 Apr 2024 09:53:19 +0100 Subject: [PATCH] chore: add christmas wishes --- host_vars/dell.yml | 1 + roles/portainer_christmas/defaults/main.yml | 8 ++++ roles/portainer_christmas/tasks/main.yml | 46 +++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 roles/portainer_christmas/defaults/main.yml create mode 100644 roles/portainer_christmas/tasks/main.yml diff --git a/host_vars/dell.yml b/host_vars/dell.yml index 4a14eb3..52c0f71 100644 --- a/host_vars/dell.yml +++ b/host_vars/dell.yml @@ -35,3 +35,4 @@ portainer_roles: - role: portainer_pihole - role: portainer_uptime_kuma - role: portainer_gitea + - role: portainer_christmas diff --git a/roles/portainer_christmas/defaults/main.yml b/roles/portainer_christmas/defaults/main.yml new file mode 100644 index 0000000..925e708 --- /dev/null +++ b/roles/portainer_christmas/defaults/main.yml @@ -0,0 +1,8 @@ +--- +# https://github.com/Wingysam/Christmas-Community/tree/master +christmas_state: present +christmas_image: wingysam/christmas-community +christmas_tag: latest +christmas_expose_port: 8082 +christmas_container_name: christmas +christmas_portainer_stack_name: christmas diff --git a/roles/portainer_christmas/tasks/main.yml b/roles/portainer_christmas/tasks/main.yml new file mode 100644 index 0000000..c93a8a2 --- /dev/null +++ b/roles/portainer_christmas/tasks/main.yml @@ -0,0 +1,46 @@ +--- +- name: "Christmas | Restore any missing volumes from S3" + ansible.builtin.include_role: + name: chatton.docker_backup.docker_s3_volume_restore + vars: + docker_backup_s3_volume: + name: "{{ christmas_portainer_stack_name }}_data" + +- name: "Christmas | Update Portainer." + chatton.portainer.portainer_stack: + username: '{{ portainer_user }}' + password: '{{ portainer.password }}' + base_url: '{{ portainer_base_url }}' + stack_name: '{{ christmas_portainer_stack_name }}' + endpoint_id: '{{ portainer_endpoint }}' + state: "{{ christmas_state }}" + definition: + version: "3" + volumes: + data: {} + services: + christmas-community: + labels: "{{ backup_labels }}" + container_name: "{{ christmas_container_name }}" + image: "{{ christmas_image }}:{{ christmas_tag }}" + volumes: + - data:/data + ports: + # If you want to go to localhost:8080 to access Christmas Community, + # use - 8080:80 instead of + - "{{ christmas_expose_port }}:80" + environment: + # Amazon Smile, set to 'false' to disable www.amazon.com links + # turning into smile.amazon.com + SMILE: 'false' + # Table mode, set to 'false' to revert to box mode + TABLE: 'true' + # Single list mode + # (for weddings, birthdays, etc. only the admin account's list is accessible) + # Set to 'true' to enable + SINGLE_LIST: 'false' + # Some websites (like walmart) send headers that are larger than 8MB in + # length. If issues are encountered, set the node.js limit to a higher + # number than 8192 + #NODE_OPTIONS: "--max-http-header-size=32768" + restart: "{{ restart_policy }}"