{"id":19792844,"url":"https://github.com/devpro/ansible-system-collection","last_synced_at":"2025-02-28T09:48:33.516Z","repository":{"id":45161777,"uuid":"439397004","full_name":"devpro/ansible-system-collection","owner":"devpro","description":"Ansible collection to install and configure operating systems","archived":false,"fork":false,"pushed_at":"2022-12-11T18:03:16.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T04:31:56.578Z","etag":null,"topics":["ansible","ansible-collection","artifactory"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devpro.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":null,"security":null,"support":null}},"created_at":"2021-12-17T16:37:54.000Z","updated_at":"2022-12-07T13:35:57.000Z","dependencies_parsed_at":"2023-01-27T04:15:14.950Z","dependency_job_id":null,"html_url":"https://github.com/devpro/ansible-system-collection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fansible-system-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fansible-system-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fansible-system-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fansible-system-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devpro","download_url":"https://codeload.github.com/devpro/ansible-system-collection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241133035,"owners_count":19915315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ansible","ansible-collection","artifactory"],"created_at":"2024-11-12T07:08:07.576Z","updated_at":"2025-02-28T09:48:33.485Z","avatar_url":"https://github.com/devpro.png","language":"Jinja","readme":"# Ansible System Collection\n\n[![GitLab Pipeline Status](https://gitlab.com/devpro-labs/ansible-system-collection/badges/main/pipeline.svg)](https://gitlab.com/devpro-labs/ansible-system-collection/-/pipelines)\n\nAnsible `devpro.system` collection provides a set of Ansible roles and playbooks to ease system administration by automating common actions. It can be used directly or viewed as an example.\n\n## How to use\n\n* Look at Ansible roles\n\nAnsible role              | Action on the host\n--------------------------|----------------------------------------------\n`docker_engine`           | Install Docker engine\n`kubernetes_controlplane` | Install Kubernetes control plane\n`kubernetes_node`         | Install Kubernetes node and join a cluster\n`linux_server`            | Install most commonly required Linux packages\n`vagrant`                 | Install Vagrant\n`vagrant_k8s`             | Provision VM and create a Kubernetes clusters\n\n* Review Ansible playbooks\n\nAnsible playbook          | Action on the host\n--------------------------|---------------------------------------------------------------\n`kubernetes_controlplane` | Install Kubernetes control plane with kubeadm\n`kubernetes_node`         | Install Kubernetes node and join a cluster\n`vagrant`                 | Install Vagrant\n`vagrant_k8s`             | Install Vagrant, provision VM and a create Kubernetes clusters\n\n* Make sure [Ansible is installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) and an inventory is defined\n\n* Download the collection from Artifactory and install it locally\n\n```bash\n# downloads the file\nansible-galaxy collection download https://devpro.jfrog.io/artifactory/devpro-ansible/devpro-system-1.0.0.tar.gz\n\n# installs the collection\nansible-galaxy collection install collections/devpro-system-1.0.0.tar.gz\n\n# checks \"devpro.system\" appears in the list\nansible-galaxy collection list\n```\n\n* Create a local inventory file\n\n```ini\n[lab]\nmyservername_or_ipaddress\n```\n\n* Run a playbook (here Vagrant playbook)\n\n```ini\nansible-playbook devpro.system.vagrant -i ./inventory --ask-become-pass\n```\n\n## How to contribute\n\n* Make sure [Ansible is installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html)\n\n* Create local inventories for the tests\n\n* Validate a code change by executing a playbook (use one or create a new one)\n\n```bash\n# checks the hosts can be reached ok\nansible all -m ping -i inventories/lab01\n\n# run a playbook\nansible-playbook -i inventories/lab01 playbooks/demo.yml --ask-become-pass\n```\n\n* Publish the collection\n\n```bash\nansible-galaxy collection build\n```\n\n* Push to Artifactory\n\n```bash\n# sets jfrog environment\nexport JFROG_INSTANCE=devpro.jfrog.io\nexport JFROG_REPOSITORY=rabbidsincubator-ansible\n\n# sets jfrog authentication credentials\nexport JFROG_USERNAME=\nexport JFROG_TOKEN=\n\n# sets artifact information\nexport ARTIFACT_FILENAME=devpro-system-1.0.0.tar.gz\n\n# pushes the new version of the ansible collection to artifactory\ncurl -u$JFROG_USERNAME:$JFROG_TOKEN -T $ARTIFACT_FILENAME \"https://${JFROG_INSTANCE}/artifactory/${JFROG_REPOSITORY}/${ARTIFACT_FILENAME}\"\n```\n\n* Lint Ansible files\n\n```bash\n# https://hub.docker.com/r/pipelinecomponents/ansible-lint\ndocker run -it --rm --name ansible-lint -v $PWD:$PWD --workdir $PWD pipelinecomponents/ansible-lint\n```\n\n## How to run locally the GitLab pipeline\n\n```bash\nmkdir -p .gitlab/runner/local\ndocker run --rm --name gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/.gitlab/runner/local/config:/etc/gitlab-runner -v $PWD:$PWD --workdir $PWD gitlab/gitlab-runner exec docker ci\n```\n\n## References\n\n* [Kubernetes Setup Using Ansible and Vagrant](https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/) - March 15, 2019\n* [Ansible Collection structure](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html)\n* [Ansible MongoDB Communication Collection](https://github.com/ansible-collections/community.mongodb)\n* [Deploy a Kubernetes cluster using Ansible](https://buildvirtual.net/deploy-a-kubernetes-cluster-using-ansible/)\n* [MatTerra/ansiblekubernetes](https://github.com/MatTerra/ansiblekubernetes)\n* [kairen/kube-ansible](https://github.com/kairen/kube-ansible)\n* [How to Install Containerd Container Runtime on Ubuntu 22.04](https://www.howtoforge.com/how-to-install-containerd-container-runtime-on-ubuntu-22-04/)\n* [How to install cri-dockerd and migrate nodes from dockershim](https://www.mirantis.com/blog/how-to-install-cri-dockerd-and-migrate-nodes-from-dockershim/) - July 14, 2022\n* [How to Install CRI-O on Ubuntu 22.04 / Ubuntu 20.04](https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-cri-o-on-ubuntu-22-04.html) - Apr 30, 2022\n* [Deploying Kubernetes Cluster on Azure VMs using kubeadm, CNI and containerd](https://techcommunity.microsoft.com/t5/azure-developer-community-blog/deploying-kubernetes-cluster-on-azure-vms-using-kubeadm-cni-and/ba-p/3690976) - December 06, 2022\n* [Installing and Configuring containerd as a Kubernetes Container Runtime](https://www.nocentino.com/posts/2021-12-27-installing-and-configuring-containerd-as-a-kubernetes-container-runtime/) - 2021-12-27\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpro%2Fansible-system-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevpro%2Fansible-system-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpro%2Fansible-system-collection/lists"}