-
Notifications
You must be signed in to change notification settings - Fork 100
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
Allow for interactive development within the container #526
Comments
Few good to have things in future with navigator would also be to have(with this feature), to be able to
This way its easier to take that first step to understand ansible modules without dealing with navigator in a deep dive fashion like setting up config or knowing about interactive or stdout modes. A first easy step and then you would need to understand the module and navigator function to achieve something meaninful. |
Perhaps not a solution but for me, I run a |
`exec` subcommand Demo Add exec action Add exec subcommand Add exec_command and exec_shell settings entries Add support for actions that may be stdout only Update test data as needed Update tests to shlex split for first use of space delimited parameter add flake8 file to set docstring format to sphinx one black fix in utils, ergh Fixes: #526 Reviewed-by: Rick Elrod <rick@elrod.me> Reviewed-by: Bradley A. Thornton <bthornto@redhat.com> Reviewed-by: Alison Hart <contact@alisonlhart.com> Reviewed-by: Sviatoslav Sydorenko <webknjaz+github/profile@redhat.com> Reviewed-by: Jake Jackson <jljacks93@gmail.com> Reviewed-by: None <None>
`exec` subcommand Demo Add exec action Add exec subcommand Add exec_command and exec_shell settings entries Add support for actions that may be stdout only Update test data as needed Update tests to shlex split for first use of space delimited parameter add flake8 file to set docstring format to sphinx one black fix in utils, ergh Fixes: ansible#526 Reviewed-by: Rick Elrod <rick@elrod.me> Reviewed-by: Bradley A. Thornton <bthornto@redhat.com> Reviewed-by: Alison Hart <contact@alisonlhart.com> Reviewed-by: Sviatoslav Sydorenko <webknjaz+github/profile@redhat.com> Reviewed-by: Jake Jackson <jljacks93@gmail.com> Reviewed-by: None <None>
ISSUE TYPE
SUMMARY
Developing automation is very incremental so it's a lot of editing, trying, editing, trying, especially at the beginning. The current ansible-navigator approach stays a bit in the way of this approach, with the overhead of the TUI and each time starting a new container. A mode by which the developer could just be put inside the container as themself and could there edit their code and/or start
ansible-playbook
themselves would help a lot.Basically, it would be the equivalent of
podman run [--rm] --tty --interactive -v /home/myuser/github/pull-test/:/home/myuser/github/pull-test/ --workdir /home/myuser/github/pull-test -v /run/user/1000/keyring/:/run/user/1000/keyring/ -e SSH_AUTH_SOCK=/run/user/1000/keyring/ssh -v /home/myuser/.ssh/:/home/runner/.ssh/ --group-add=root --userns=keep-id --user="$(id -u):$(id -g)" --ipc=host -v /tmp/ansible-navigator_th4mlx94/artifacts/:/runner/artifacts/:Z -v /tmp/ansible-navigator_th4mlx94/:/runner/:Z --env-file /tmp/ansible-navigator_th4mlx94/artifacts/d8722364-68c8-4875-973e-8d1234008533/env.list --quiet --name ansible_runner_d8722364-68c8-4875-973e-8d1234008533 registry.blup/bla/ansible-automation-platform-20-ee-supported-rhel8:latest /bin/bash
.Two comments:
--userns=keep-id --user="$(id -u):$(id -g)"
to make sure that the user is themself within the container and the access right remain correct.--rm
would also help, for example with the ability to give a fix name to the container, as the developer could then customize it with aspects irrelevant to the automation itself (i.e. add their favourite editor) without having to create an own image.Thinking about it, that also means that the temporary directory
/tmp/ansible-navigator_th4mlx94
would be persistent, the location/tmp
isn't a perfect place for this kind of approach, so it should also be moved, e.g. to a sub-directory of the current directory.The text was updated successfully, but these errors were encountered: