https://github.com/claudiospizzi/ansible-control-node
Docker container designed as an Ansible control node on Windows hosts.
https://github.com/claudiospizzi/ansible-control-node
Last synced: 9 months ago
JSON representation
Docker container designed as an Ansible control node on Windows hosts.
- Host: GitHub
- URL: https://github.com/claudiospizzi/ansible-control-node
- Owner: claudiospizzi
- License: mit
- Created: 2022-06-19T21:42:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-29T19:59:42.000Z (almost 2 years ago)
- Last Synced: 2025-01-26T06:14:17.458Z (11 months ago)
- Language: Dockerfile
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ansible-control-node
Docker container designed as an Ansible control node on Windows hosts. To use the Ansible control node, you can directly start a parametrized Docker container or use the PowerShell helper module [PSAnsibleControlNode](https://www.powershellgallery.com/packages/PSAnsibleControlNode) to start the Docker container.
For the docker run, two important volume mounts must be provided. The Ansible repository must be mounted to `/ansible` and the callers SSH folder to `/tmp/.ssh` to have the keys in the container. Please be aware of the special normalization for Windows paths without a drive colon and replacing `\` with `/`.
```bash
docker run -it --rm -v /C/Workspace/AnsibleKeys:/tmp/.ssh:ro -v /C/Workspace/AnsibleRepo:/ansible claudiospizzi/ansible-control-node:latest
```
As an alternative, the command `Start-AnsibleControlNode` can be used. By default, it will start an Ansible control node in the current directory. Specify a different directory if required.
```powershell
# Download and install the module
Install-Module -Name 'PSAnsibleControlNode'
# Start the ansible control node with the current working directory and the keys
# of the user home directory are used.
Start-AnsibleControlNode
# Start the ansible control node with custom repo and key path.
Start-AnsibleControlNode -RepositoryPath 'C:\Workspace\AnsibleRepo' -KeyPath 'C:\Workspace\AnsibleKeys'
```