Skip to content

Commit

Permalink
Fix: docker_compose no longer returns 'ansible_facts' (shelleg#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
slicen authored and Hebo committed Jun 18, 2021
1 parent 44456fd commit e8c86c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ galaxy_info:
- CI

dependencies: []

collections:
- community.docker
10 changes: 5 additions & 5 deletions tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: "Deploy Portainer to {{ inventory_hostname }}"
docker_container:
community.docker.docker_container:
name: portainer
image: "portainer/portainer-ce:{{ version }}"
container_default_behavior: no_defaults
Expand All @@ -18,15 +18,15 @@
- "{{ persistent_data_path }}"
register: portainer_docker

# - name: "Debug return values from docker_container"
# - name: "Debug return values from container"
# debug:
# msg: "{{ portainer_docker.ansible_facts.docker_container }}"
# msg: "{{ portainer_docker.container }}"

- set_fact:
portainer_is_running: "{{ portainer_docker.ansible_facts.docker_container.State.Running }}"
portainer_is_running: "{{ portainer_docker.container.State.Running }}"

- set_fact:
portainer_endpoint: "http://{{ portainer_docker.ansible_facts.docker_container.NetworkSettings.IPAddress }}:{{ host_port }}/api"
portainer_endpoint: "http://{{ portainer_docker.container.NetworkSettings.IPAddress }}:{{ host_port }}/api"

- name: "Check!!!"
debug:
Expand Down

0 comments on commit e8c86c7

Please sign in to comment.