Skip to content

Instantly share code, notes, and snippets.

@Andor
Created July 9, 2019 16:43
Show Gist options
  • Save Andor/461e0b09e3e61dac90546e99bc093344 to your computer and use it in GitHub Desktop.
Save Andor/461e0b09e3e61dac90546e99bc093344 to your computer and use it in GitHub Desktop.
PLAY [127.0.0.1] ***************************************************************
Tuesday 09 July 2019 16:42:06 +0000 (0:00:00.111) 0:00:00.111 **********
TASK [docker-py] ***************************************************************
changed: [127.0.0.1]
Tuesday 09 July 2019 16:42:11 +0000 (0:00:05.196) 0:00:05.307 **********
TASK [run container] ***********************************************************
changed: [127.0.0.1]
Tuesday 09 July 2019 16:42:13 +0000 (0:00:01.632) 0:00:06.940 **********
TASK [debugme] *****************************************************************
ok: [127.0.0.1] => {
"msg": [
"touch",
"/tmp/hello",
"slash",
"cyberpunk"
]
}
PLAY RECAP *********************************************************************
127.0.0.1 : ok=3 changed=2 unreachable=0 failed=0
---
- hosts: 127.0.0.1
connection: local
become: false
gather_facts: false
vars:
ansible_become_pass: ''
tasks:
- name: Hello @SLASH_CyberPunk
block:
- name: docker-py
pip:
name: docker-py
- name: run container
docker_container:
name: runme
recreate: true
detach: false
image: ubuntu:18.04
volumes:
- /tmp:/tmp
command:
- touch
- /tmp/hello slash cyberpunk
register: runme
- name: debugme
debug:
msg: |
{{ runme.ansible_facts.docker_container.Config.Cmd }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment