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

Add become: true to ansible playbook Chapter 11 #253

Open
mshob23 opened this issue Jun 8, 2024 · 2 comments
Open

Add become: true to ansible playbook Chapter 11 #253

mshob23 opened this issue Jun 8, 2024 · 2 comments

Comments

@mshob23
Copy link

mshob23 commented Jun 8, 2024

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:

  • name: Run test container
    community.docker.docker_container:
    name: superlists
    state: started
    image: superlists
    recreate: true
    become: true

image

@mshob23
Copy link
Author

mshob23 commented Jun 8, 2024

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

@mshob23 mshob23 closed this as completed Jun 8, 2024
@mshob23 mshob23 reopened this Jun 8, 2024
@hjwp
Copy link
Owner

hjwp commented Jun 12, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants