-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use default python3 modules and run the default roles
Also fixed indendation and styling
- Loading branch information
Showing
7 changed files
with
45 additions
and
46 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
54 changes: 28 additions & 26 deletions
54
provision-contest/ansible/roles/docker/tasks/load-container.yml
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 |
---|---|---|
@@ -1,33 +1,35 @@ | ||
--- | ||
- block: | ||
- name: Check for existing container | ||
community.docker.docker_image_info: | ||
name: "{{ img_name }}" | ||
register: result | ||
- name: Load the container from archive if needed | ||
block: | ||
- name: Check for existing container | ||
community.docker.docker_image_info: | ||
name: "{{ img_name }}" | ||
register: result | ||
|
||
- block: | ||
- name: Create temp container directory | ||
file: | ||
path: /tmp/dj_ansible | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: 0700 | ||
- name: Transfer and load the container | ||
block: | ||
- name: Create temp container directory | ||
file: | ||
path: /tmp/dj_ansible | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: 0700 | ||
|
||
- name: Transfer container archive | ||
copy: | ||
src: "{{ item.src }}" | ||
dest: "{{ img_path }}" | ||
owner: root | ||
group: root | ||
mode: 0700 | ||
- name: Transfer container archive | ||
copy: | ||
src: "{{ item.src }}" | ||
dest: "{{ img_path }}" | ||
owner: root | ||
group: root | ||
mode: 0700 | ||
|
||
- name: Import container from archive | ||
community.docker.docker_image: | ||
name: "{{ img_name }}" | ||
load_path: "{{ img_path }}" | ||
source: load | ||
when: not result.images | ||
- name: Import container from archive | ||
community.docker.docker_image: | ||
name: "{{ img_name }}" | ||
load_path: "{{ img_path }}" | ||
source: load | ||
when: not result.images | ||
vars: | ||
img_name: "{{ item.path | splitext | first }}" | ||
img_path: "/tmp/dj_ansible/{{ item.path | basename }}" |
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 |
---|---|---|
@@ -1 +1 @@ | ||
glitchtip_port: 8000 | ||
GLITCHTIP_PORT: 8000 |
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