diff --git a/roles/docker-snipe-it/README.md b/roles/docker-snipe-it/README.md deleted file mode 100644 index aa8e6e93..00000000 --- a/roles/docker-snipe-it/README.md +++ /dev/null @@ -1 +0,0 @@ -https://github.com/snipe/snipe-it \ No newline at end of file diff --git a/roles/docker-snipe_it/README.md b/roles/docker-snipe_it/README.md new file mode 100644 index 00000000..423b0e31 --- /dev/null +++ b/roles/docker-snipe_it/README.md @@ -0,0 +1,4 @@ + +## more +https://github.com/snipe/snipe-it +https://snipeitapp.com/ \ No newline at end of file diff --git a/roles/docker-snipe_it/tasks/main.yml b/roles/docker-snipe_it/tasks/main.yml new file mode 100644 index 00000000..6b8cf4a8 --- /dev/null +++ b/roles/docker-snipe_it/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: "include docker/compose/database.yml" + include_tasks: docker/compose/database.yml + +- name: "include tasks nginx-docker-proxy-domain.yml" + include_tasks: nginx-docker-proxy-domain.yml + +- name: create .env + template: src=env.j2 dest={{docker_compose_instance_directory}}/.env + notify: docker compose project setup + +- name: add docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml + notify: docker compose project setup diff --git a/roles/docker-snipe-it/templates/docker-compose.yml.j2 b/roles/docker-snipe_it/templates/docker-compose.yml.j2 similarity index 85% rename from roles/docker-snipe-it/templates/docker-compose.yml.j2 rename to roles/docker-snipe_it/templates/docker-compose.yml.j2 index 18cf3924..85556fef 100644 --- a/roles/docker-snipe-it/templates/docker-compose.yml.j2 +++ b/roles/docker-snipe_it/templates/docker-compose.yml.j2 @@ -1,13 +1,10 @@ -volumes: - db_data: - storage: +services: {% include 'templates/docker/services/redis.yml.j2' %} {% include 'templates/docker/services/' + database_type + '.yml.j2' %} -services: - app: + application: image: snipe/snipe-it:${APP_VERSION} restart: {{docker_restart_policy}} volumes: @@ -16,7 +13,7 @@ services: - "${APP_PORT}:80" {% include 'templates/docker/container/depends-on-database-redis.yml.j2' %} env_file: - - .env # Will also be read, without this parameter + - .env # Will also be read, without explicit declaring it here {% include 'templates/docker/container/networks.yml.j2' %} {% include 'templates/docker/compose/volumes.yml.j2' %} diff --git a/roles/docker-snipe-it/templates/env.j2 b/roles/docker-snipe_it/templates/env.j2 similarity index 98% rename from roles/docker-snipe-it/templates/env.j2 rename to roles/docker-snipe_it/templates/env.j2 index c9c1ff2e..abe7406e 100644 --- a/roles/docker-snipe-it/templates/env.j2 +++ b/roles/docker-snipe_it/templates/env.j2 @@ -1,8 +1,8 @@ # -------------------------------------------- # REQUIRED: DOCKER SPECIFIC SETTINGS # -------------------------------------------- -APP_VERSION={{applications.snape-it.version}} -APP_PORT={{ports.localhost.http_ports.snipe-it}} +APP_VERSION={{applications.snipe_it.version}} +APP_PORT={{ports.localhost.http_ports.snipe_it}} # -------------------------------------------- # REQUIRED: BASIC APP SETTINGS diff --git a/roles/docker-snipe_it/vars/main.yml b/roles/docker-snipe_it/vars/main.yml new file mode 100644 index 00000000..282f78fd --- /dev/null +++ b/roles/docker-snipe_it/vars/main.yml @@ -0,0 +1,3 @@ +application_id: "snipe_it" +database_password: "{{applications.snipe_it.database_password}}" +database_type: "mariadb" \ No newline at end of file