{"id":18610137,"url":"https://github.com/creativecommons/ansible-dev","last_synced_at":"2026-01-25T00:01:39.605Z","repository":{"id":226489383,"uuid":"763658991","full_name":"creativecommons/ansible-dev","owner":"creativecommons","description":"Creative Commons Ansible","archived":false,"fork":false,"pushed_at":"2024-08-27T18:17:47.000Z","size":131,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-13T14:33:24.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creativecommons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["creativecommons"],"custom":["https://creativecommons.org/donate"]}},"created_at":"2024-02-26T17:37:14.000Z","updated_at":"2025-01-24T19:55:54.000Z","dependencies_parsed_at":"2024-07-06T23:28:53.792Z","dependency_job_id":"65e68f3f-615b-4955-a62e-d1632fb5fb6d","html_url":"https://github.com/creativecommons/ansible-dev","commit_stats":null,"previous_names":["creativecommons/ansible-dev"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/creativecommons/ansible-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Fansible-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Fansible-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Fansible-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Fansible-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativecommons","download_url":"https://codeload.github.com/creativecommons/ansible-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativecommons%2Fansible-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28739320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T22:12:27.248Z","status":"ssl_error","status_checked_at":"2026-01-24T22:12:10.529Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T03:08:41.514Z","updated_at":"2026-01-25T00:01:39.586Z","avatar_url":"https://github.com/creativecommons.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/creativecommons","https://creativecommons.org/donate"],"categories":[],"sub_categories":[],"readme":"# ansible-dev\nAnsible dev environment\n\n## Code of Conduct\n\n[`CODE_OF_CONDUCT.md`][org-coc]:\n\u003e The Creative Commons team is committed to fostering a welcoming community.\n\u003e This project and all other Creative Commons open source projects are governed\n\u003e by our [Code of Conduct][code_of_conduct]. Please report unacceptable\n\u003e behavior to [conduct@creativecommons.org](mailto:conduct@creativecommons.org)\n\u003e per our [reporting guidelines][reporting_guide].\n\n[org-coc]: https://github.com/creativecommons/.github/blob/main/CODE_OF_CONDUCT.md\n[code_of_conduct]: https://opensource.creativecommons.org/community/code-of-conduct/\n[reporting_guide]: https://opensource.creativecommons.org/community/code-of-conduct/enforcement/\n\n\n## Contributing\n\nSee [`CONTRIBUTING.md`][org-contrib].\n\n[org-contrib]: https://github.com/creativecommons/.github/blob/main/CONTRIBUTING.md\n\n\n### Goals\n\nThe aim of the project is to establish a robust and localized development environment utilizing Ansible and Docker. This environment will mirror a professional work setting, incorporating a dedicated security server (Bastion), automation through Ansible, a web server, and a data storage server. This configuration will simplify and secure development processes and serve as a blueprint for future projects at CC.\n\n\n#### Docker containers:\n\nThe [`docker-compose.yml`](docker-compose.yml) file defines the following\ncontainers:\n\n- **bastion-dev** - Bastion (SSH jump server)\n- **ansible-dev** - Ansible\n- **web-dev** - Web server (Apache2/WordPress)\n- **db-dev** - Database server (MariaDB)\n\n\n![image](https://github.com/creativecommons/ansible-dev/assets/90766122/21baa18d-715e-4908-9620-15c768994011)\n\n\nSee [Create Local Ansible Dev Environment Using Docker](https://opensource.creativecommons.org/programs/project-ideas/#ansible-dev-env) for more details.\n\n\n### Setup\n\n- Create the `.env` file:\n    ```shell\n    cp .env.example .env\n    ```\n\n- Execute the `generate_ssh_keys` script:\n    ```shell\n    ./generate_ssh_keys.sh\n    ```\n\n- Build and start Docker:\n    ```shell\n    docker-compose up\n    ```\n\n- Wait for the build and initialization to complete\n\n\n#### SSH (Work in Progress)\n\nThe SSH setup has been established and is currently in use for the Ansible container. Follow the steps below to generate and use the SSH keys for the sysadmin user:\n\n- Execute the generate-ssh-keys.sh script to generate the keys used by the sysadmin user:\n    ```shell\n    ./generate-ssh-keys.sh\n    ```\n\n- Bring down the existing Docker containers and start them again:\n    ```shell\n    docker-compose down\n    docker-compose up -d\n    ```\n\n- Ensure the Docker containers are running:\n    ```shell\n    docker ps\n    ```\n\n- Execute the following command to confirm that SSH is working fine:\n    ```shell\n    ssh -i ./sysadmin-ssh-keys/rsa_sysadmin -p 22001 sysadmin@localhost\n    ```\n\n**SSH connection from bastion**:\n- ProxyJump allow you to use `ssh bastion` to connect to the bastion-dev host, and `ssh ansible-dev` or `ssh web-dev`, and SSH will automatically connect through the bastion jump host.\n- currently, db-dev is not handled through bastion\n- Execute the following command to add ssh agent\n\n    ```shell\n    ssh-add ./sysadmin-ssh-keys/rsa_sysadmin\n    ```\n\n- Execute the following command to confirm the bastion connection:\n\n    ```shell\n    ssh -J sysadmin@localhost:22222 sysadmin@web-dev\n    ```\n\n    ```shell\n    ssh -J sysadmin@localhost:22222 sysadmin@ansible-dev\n    ```\n\n## Related Links\n- [Ansible Documentation](https://docs.ansible.com/)\n- [FrontPage - Debian Wiki](https://wiki.debian.org/FrontPage)\n- [Docker Docs](https://docs.docker.com/)\n- [creativecommons/sre-salt-prime](https://github.com/creativecommons/sre-salt-prime): Site Reliability Engineering / DevOps SaltStack configuration files\n- [creativecommons/index-dev-env](https://github.com/creativecommons/index-dev-env): Local development environment for CreativeCommons.org (reference for docker project)\n\n\n## License\n\n- [`LICENSE`](LICENSE) (Expat/[MIT][mit] License)\n\n[mit]: http://www.opensource.org/licenses/MIT \"The MIT License | Open Source Initiative\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativecommons%2Fansible-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativecommons%2Fansible-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativecommons%2Fansible-dev/lists"}