Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ansible docker deployment #65

Merged
merged 3 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/run-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
- name: Install ansible
run: |
sudo apt update
sudo apt install ansible make python3-pip
sudo apt install make python3-pip
sudo pip3 install ansible

- name: Ensure base playbook requirements
run: |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ It is recommended to read and follow this guide entirely as there is a lot of co

```bash
sudo apt update
sudo apt install git make ansible python3-pip -y
sudo apt install git make python3-pip -y
sudo pip3 install ansible
```

```bash
Expand Down
3 changes: 0 additions & 3 deletions roles/hmsdocker/defaults/main/container_settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ container_timezone: America/New_York
container_uid: 1234
container_gid: 1234

# This will download all of the containers before attempting to start them // default: "yes"
container_pull_images_first: yes

# This will expose each containers individual ports on the host (check the README for more info on which ports map to which containers) // default: "no"
# If you disable traefik within the container map, the playbook will automatically override this setting and expose the ports
container_expose_ports: no
3 changes: 1 addition & 2 deletions roles/hmsdocker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@
trim_blocks: yes

- name: Ensure containers defined in compose file.
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ hms_docker_data_path }}"
project_name: "{{ project_name }}"
pull: "{{ container_pull_images_first }}"
state: "{{ hms_docker_compose_container_state }}"
remove_orphans: "{{ container_remove_orphans }}"
# env_file: "{{ compose_env.dest }}" # Commented out since this module defaults to using the .env file within the project_src location, but leaving just in case advanced users wish to point to a different location
Expand Down