forked from davestephens/ansible-nas
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
461 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -297,6 +297,10 @@ | |
tags: | ||
- graylog | ||
|
||
- role: grist | ||
tags: | ||
- grist | ||
|
||
- role: grocy | ||
tags: | ||
- grocy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
--- | ||
grist_enabled: false | ||
grist_available_externally: false | ||
|
||
# directories | ||
grist_data_directory: "{{ docker_home }}/grist" | ||
|
||
# network | ||
grist_port: "8485" | ||
grist_hostname: "grist" | ||
grist_network_name: "grist" | ||
|
||
# specs | ||
grist_memory: 1g | ||
grist_db_memory: 1g | ||
grist_redis_memory: 1g | ||
grist_minio_memory: 1g | ||
|
||
# docker | ||
grist_container_name: grist | ||
grist_image_name: "gristlabs/grist" | ||
grist_image_version: latest | ||
grist_db_container_name: grist-db | ||
grist_db_image_name: "postgres" | ||
grist_db_image_version: "14" | ||
grist_redis_container_name: grist-redis | ||
grist_redis_image_name: "redis" | ||
grist_redis_image_version: latest | ||
grist_minio_container_name: grist-minio | ||
grist_minio_image_name: "minio/minio" | ||
grist_minio_image_version: latest | ||
grist_user_id: "1000" | ||
grist_group_id: "1000" | ||
|
||
# grist | ||
grist_session_secret: "super_secret" | ||
grist_default_email: "grist@{{ ansible_nas_domain }}" | ||
grist_sandbox_flavor: "gvisor" | ||
grist_boot_key: "super_secret" | ||
grist_app_home_url: "https://{{ grist_hostname }}.{{ ansible_nas_domain }}" | ||
grist_single_org: ansible-nas | ||
grist_cookie_max_age: "86400" | ||
grist_force_login: "true" | ||
grist_hide_ui_elements: "" # =helpCenter,billing,templates,multiSite,multiAccounts | ||
grist_page_title_suffix: " - Ansible-NAS" | ||
grist_app_static_include_custom_css: "false" | ||
grist_widget_list_url: "https://github.com/gristlabs/grist-widget/releases/download/latest/manifest.json" | ||
grist_sendgrid_api_key: "SG.XXXXXXX.XXXXX" | ||
grist_sendgrid_api_prefix: "https://api.sendgrid.com/v3" | ||
grist_sendgrid_api_enroll: "/marketing/contacts" | ||
grist_sendgrid_api_search: "/marketing/contacts/search" | ||
grist_sendgrid_api_search_by_email: "/marketing/contacts/search/emails" | ||
grist_sendgrid_api_list_remove: "/marketing/lists/id/contacts" | ||
grist_sendgrid_api_send: "/mail/send" | ||
grist_sendgrid_address_from_email: "<grist@{{ ansible_nas_domain }}>" | ||
grist_sendgrid_address_from_name: "Grist at Ansible-NAS" | ||
grist_sendgrid_template_invite: "d-f9....." | ||
grist_sendgrid_template_billing_manager_invite: "d-f9....." | ||
grist_sendgrid_template_member_change: "d-b3....." | ||
grist_sendgrid_list_singleuser_onboarding: "b22..." | ||
grist_sendgrid_unsubscribe_group_invites: "19..." | ||
grist_sendgrid_unsubscribe_group_billing_managers: "19..." | ||
grist_minio_root_user: "grist" | ||
grist_minio_root_password: "admingrist" | ||
grist_docs_minio_access_key: "{{ grist_minio_root_user }}" | ||
grist_docs_minio_secret_key: "{{ grist_minio_root_password}}" | ||
grist_docs_minio_use_ssl: "0" | ||
grist_docs_minio_bucket: "grist-docs" | ||
grist_docs_minio_endpoint: "{{ grist_minio_container_name }}" | ||
grist_docs_minio_port: "9000" | ||
grist_redis_url: "redis://{{ grist_redis_container_name }}" | ||
grist_telemetry_level: "off" | ||
grist_db_type: "postgres" | ||
grist_db_name: "grist" | ||
grist_db_user: "grist" | ||
grist_db_pass: "grist" | ||
grist_db_host: "{{ grist_db_container_name }}" | ||
grist_db_port: "5432" | ||
grist_offer_all_languages: "true" | ||
grist_saml_idp_skip_slo: "false" | ||
grist_saml_sp_host: "https://{{ grist_hostname }}.{{ ansible_nas_domain }}" | ||
grist_saml_idp_unencrypted: "1" | ||
grist_saml_idp_login: "https://...auth0.com/samlp/xxxx" | ||
grist_saml_idp_logout: "https://...auth0.com/samlp/xxxx" | ||
grist_saml_idp_certs: ".../auth0.pem" | ||
grist_saml_sp_key: ".../saml.pem (created)" | ||
grist_saml_sp_cert: "../saml.crt (created)" | ||
grist_oidc_sp_host: "https://{{ grist_hostname }}.{{ ansible_nas_domain }}" | ||
grist_oidc_idp_issuer: "https://example.com" | ||
grist_oidc_idp_scopes: "openid profile email" | ||
grist_oidc_idp_client_id: "" | ||
grist_oidc_idp_client_secret: "" | ||
grist_oidc_idp_end_session_endpoint: "" | ||
grist_oidc_idp_skip_end_session_endpoint: "" | ||
grist_oidc_sp_profile_name_attr: "" | ||
grist_oidc_sp_profile_email_attr: "" | ||
|
||
grist_env: | ||
GRIST_SESSION_SECRET: "{{ grist_session_secret }}" | ||
GRIST_DEFAULT_EMAIL: "{{ grist_default_email }}" | ||
GRIST_SANDBOX_FLAVOR: "{{ grist_sandbox_flavor }}" | ||
GRIST_BOOT_KEY: "{{ grist_boot_key }}" | ||
APP_HOME_URL: "{{ grist_app_home_url }}" | ||
GRIST_SINGLE_ORG: "{{ grist_single_org }}" | ||
COOKIE_MAX_AGE: "{{ grist_cookie_max_age }}" | ||
GRIST_FORCE_LOGIN: "{{ grist_force_login }}" | ||
GRIST_HIDE_UI_ELEMENTS: "{{ grist_hide_ui_elements }}" | ||
GRIST_PAGE_TITLE_SUFFIX: "{{ grist_page_title_suffix }}" | ||
APP_STATIC_INCLUDE_CUSTOM_CSS: "{{ grist_app_static_include_custom_css }}" | ||
GRIST_WIDGET_LIST_URL: "{{ grist_widget_list_url }}" | ||
SENDGRID_API_KEY: "{{ grist_sendgrid_api_key }}" | ||
GRIST_DOCS_MINIO_ACCESS_KEY: "{{ grist_docs_minio_access_key }}" | ||
GRIST_DOCS_MINIO_SECRET_KEY: "{{ grist_docs_minio_secret_key }}" | ||
GRIST_DOCS_MINIO_USE_SSL: "{{ grist_docs_minio_use_ssl }}" | ||
GRIST_DOCS_MINIO_BUCKET: "{{ grist_docs_minio_bucket }}" | ||
GRIST_DOCS_MINIO_ENDPOINT: "{{ grist_docs_minio_endpoint }}" | ||
GRIST_DOCS_MINIO_PORT: "{{ grist_docs_minio_port }}" | ||
REDIS_URL: "{{ grist_redis_url }}" | ||
GRIST_TELEMETRY_LEVEL: "{{ grist_telemetry_level }}" | ||
TYPEORM_TYPE: "{{ grist_db_type }}" | ||
TYPEORM_DATABASE: "{{ grist_db_name }}" | ||
TYPEORM_USERNAME: "{{ grist_db_user }}" | ||
TYPEORM_PASSWORD: "{{ grist_db_pass }}" | ||
TYPEORM_HOST: "{{ grist_db_host }}" | ||
TYPEORM_PORT: "{{ grist_db_port }}" | ||
GRIST_OFFER_ALL_LANGUAGES: "{{ grist_offer_all_languages }}" | ||
# GRIST_SAML_IDP_SKIP_SLO: "{{ grist_saml_idp_skip_slo }}" | ||
# GRIST_SAML_SP_HOST: "{{ grist_saml_sp_host }}" | ||
# GRIST_SAML_IDP_UNENCRYPTED: "{{ grist_saml_idp_unencrypted }}" | ||
# GRIST_SAML_IDP_LOGIN: "{{ grist_saml_idp_login }}" | ||
# GRIST_SAML_IDP_LOGOUT: "{{ grist_saml_idp_logout }}" | ||
# GRIST_SAML_IDP_CERTS: "{{ grist_saml_idp_certs }}" | ||
# GRIST_SAML_SP_KEY: "{{ grist_saml_sp_key }}" | ||
# GRIST_SAML_SP_CERT: "{{ grist_saml_sp_cert }}" | ||
# GRIST_OIDC_SP_HOST: "{{ grist_oidc_sp_host }}" | ||
# GRIST_OIDC_IDP_ISSUER: "{{ grist_oidc_idp_issuer }}" | ||
# GRIST_OIDC_IDP_SCOPES: "{{ grist_oidc_idp_scopes }}" | ||
# GRIST_OIDC_IDP_CLIENT_ID: "{{ grist_oidc_idp_client_id }}" | ||
# GRIST_OIDC_IDP_CLIENT_SECRET: "{{ grist_oidc_idp_client_secret }}" | ||
# GRIST_OIDC_IDP_END_SESSION_ENDPOINT: "{{ grist_oidc_idp_end_session_endpoint }}" | ||
# GRIST_OIDC_IDP_SKIP_END_SESSION_ENDPOINT : "{{ grist_oidc_idp_skip_end_session_endpoint }}" | ||
# GRIST_OIDC_SP_PROFILE_NAME_ATTR: "{{ grist_oidc_sp_profile_name_attr }}" | ||
# GRIST_OIDC_SP_PROFILE_EMAIL_ATTR: "{{ grist_oidc_sp_profile_email_attr }}" | ||
|
||
grist_minio_env: | ||
MINIO_ROOT_USER: "{{ grist_minio_root_user }}" | ||
MINIO_ROOT_PASSWORD: "{{ grist_minio_root_password }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Grist | ||
|
||
Homepage: [https://github.com/gristlabs/grist-core](https://github.com/gristlabs/grist-core) | ||
|
||
Grist is the evolution of spreadsheets. | ||
|
||
## Usage | ||
|
||
Set `grist_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file. | ||
|
||
Grist web interface can be found at [http://ansible_nas_host_or_ip:8485](http://ansible_nas_host_or_ip:8485). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
platforms: | ||
- name: instance | ||
image: geerlingguy/docker-ubuntu2204-ansible:latest | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp:/tmp:rw | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
inventory: | ||
group_vars: | ||
all: | ||
grist_enabled: true | ||
grist_data_directory: /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Stop | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role" | ||
ansible.builtin.include_role: | ||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" | ||
vars: | ||
grist_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Get grist db container state | ||
community.docker.docker_container: | ||
name: "{{ grist_db_container_name }}" | ||
register: result_db | ||
|
||
- name: Get grist redis container state | ||
community.docker.docker_container: | ||
name: "{{ grist_redis_container_name }}" | ||
register: result_redis | ||
|
||
- name: Get grist minio container state | ||
community.docker.docker_container: | ||
name: "{{ grist_db_container_name }}" | ||
register: result_minio | ||
|
||
- name: Get grist container state | ||
community.docker.docker_container: | ||
name: "{{ grist_container_name }}" | ||
register: result | ||
|
||
- name: Check if grist containers are running | ||
ansible.builtin.assert: | ||
that: | ||
- result_db.container['State']['Status'] == "running" | ||
- result_db.container['State']['Restarting'] == false | ||
- result_redis.container['State']['Status'] == "running" | ||
- result_redis.container['State']['Restarting'] == false | ||
- result_minio.container['State']['Status'] == "running" | ||
- result_minio.container['State']['Restarting'] == false | ||
- result.container['State']['Status'] == "running" | ||
- result.container['State']['Restarting'] == false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Include vars | ||
ansible.builtin.include_vars: | ||
file: ../../defaults/main.yml | ||
|
||
- name: Try and stop and remove grist | ||
community.docker.docker_container: | ||
name: "{{ grist_container_name }}" | ||
state: absent | ||
register: result | ||
|
||
- name: Try and stop and remove grist minio | ||
community.docker.docker_container: | ||
name: "{{ grist_minio_container_name }}" | ||
state: absent | ||
register: result_minio | ||
|
||
- name: Try and stop and remove grist redis | ||
community.docker.docker_container: | ||
name: "{{ grist_redis_container_name }}" | ||
state: absent | ||
register: result_redis | ||
|
||
- name: Try and stop and remove grist db | ||
community.docker.docker_container: | ||
name: "{{ grist_db_container_name }}" | ||
state: absent | ||
register: result_db | ||
|
||
- name: Check if grist is stopped | ||
ansible.builtin.assert: | ||
that: | ||
- not result.changed | ||
- not result_minio.changed | ||
- not result_redis.changed | ||
- not result_db.changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../requirements.yml |
Oops, something went wrong.