hjwp / Book-TDD-Web-Dev-Python

Book - TDD web dev with Python
https://www.obeythetestinggoat.com
Other
476 stars 173 forks source link

Add become: true to ansible playbook Chapter 11 #253

Open mshob23 opened 4 weeks ago

mshob23 commented 4 weeks ago

In chapter 11, during the ansible playbook where the docker container is being archived, copied onto the vm, and loaded, I ran into an issue running the container. It was solved by adding become: true. This makes the final task:

image

mshob23 commented 4 weeks ago

When I added become: true for run test container, I ran into an error later on. env.j2 was being placed in /superlists.env, but run test container was looking in root/superlists.env. I was able to fix this by using the following ansible arguments:

image

hjwp commented 3 weeks ago

thanks! let me look in to it. i think i solved this by making sure the default user is in the "docker" group or something, but i can't remember for sure...