Relative Content

Tag Archive for dockeransibleansible-template

Ansible “connection: docker” plugin not working for lineinefile in remote container

So From an ansible with host localhost I am trying to run ansible command directly inside a docker container (command can be anything from lineinfile to copy). The main reason I am trying to do this is so that I cam seamlessly use ansible task on docker (Docker exec is NOT an appropriate solution).
I am currently trying to achieve this using connection: community.docker.docker. I want to this on a task block and not at the playbook level hence why it looks like it does. Ideally I can the params in the template without creating an additional inventory.

Ansible “connection: docker” plugin not working for lineinefile in remote container

So From an ansible with host localhost I am trying to run ansible command directly inside a docker container (command can be anything from lineinfile to copy). The main reason I am trying to do this is so that I cam seamlessly use ansible task on docker (Docker exec is NOT an appropriate solution).
I am currently trying to achieve this using connection: community.docker.docker. I want to this on a task block and not at the playbook level hence why it looks like it does. Ideally I can the params in the template without creating an additional inventory.

Expert advice needed: Ansible connection docker not working for lineinefile remote docker

So From an ansible with host localhost I am trying to run ansible command directly inside a docker container (command can be anything from lineinfile to copy). The main reason I am trying to do this is so that I cam seamlessly use ansible task on docker (Docker exec is NOT an appropriate solution).
I am currently trying to achieve this using connection: community.docker.docker. I want to this on a task block and not at the playbook level hence why it looks like it does. Ideally I can the params in the template without creating an additional inventory.