devcontainers / features

A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
https://containers.dev/features
MIT License
868 stars 348 forks source link

[Feature Request]: Add Ansible devcontainer feature #538

Closed raymond-chetty closed 1 year ago

raymond-chetty commented 1 year ago

Request: Add new devcontainer to configure using ansible(https://www.ansible.com/). The feature would have two options to run Ansible configuration on a local container.

  1. requirementsFile string location of a requirements.yml file containing a list of roles to download before running the install . Default ansible/requirements.yml or ""
  2. installFile string location of an install.yml playbook that will run. Default ansible/install.yml

This feature would allow users to add complex configuration using reusable ansible roles. The ansible configuration would be in a directory located in the .devcontainer directory following the standard ansible directory structure. When run the feature would pull roles defined in the requirements.yml file and then run the install.yml playbook on localhost. Additional configuration of roles would come from setting variables for the project in ansible/group_vars/all.

Install Ansible https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-and-upgrading-ansible

Optionally install into python virtualenv. Requires python and pip.

venv https://docs.python.org/3/library/venv.html

Sample directory layout https://docs.ansible.com/ansible/latest/tips_tricks/sample_setup.html#id1

requirements.yml info https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-multiple-roles-from-a-file

roles info https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#storing-and-finding-roles

raymond-chetty commented 1 year ago

Something GitHub might be able to do, or Ansible, as an app, is allow remote provisioning using two factor authentication. So people can store their ssh keys and only use them, and maybe hashicorp vault, when running playbooks on remote servers. All protected by two factor authentication. Maybe Microsoft should just buy redhat. Zuckerberg'd! :)


Edit A gateway feature to AE https://docs.github.com/en/github-ae@latest/admin/overview/about-github-ae

samruddhikhandale commented 1 year ago

Hi 👋

We appreciate your Feature request, however, the devcontainers/features repo only accepts improvements and bug fixes for the current set of maintained Features.

However, we would appreciate if you could add this Feature in a separate repository of your control. The devcontainers/feature-starter repo has more guidance on self authoring them.

Once you've self authored and if you'd like to share it with the community, we'd recommend adding it to the index. It will make them visible in our supporting tools (like https://containers.dev/templates, Dev Containers Extension, GitHub Codespaces etc).

Feel free to ask any questions/queries along the way, feedbacks are welcome too!