{"id":23803123,"url":"https://github.com/kowalski7cc/podlab","last_synced_at":"2025-09-06T15:33:46.221Z","repository":{"id":47918935,"uuid":"512674308","full_name":"kowalski7cc/podlab","owner":"kowalski7cc","description":"Build a simple lab ready for exercising with Ansible","archived":false,"fork":false,"pushed_at":"2023-09-13T11:55:33.000Z","size":60,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-09-13T23:12:44.416Z","etag":null,"topics":["ansible","buildah","centos","podman","rootlesskit"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/kowalski7cc.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":"2022-07-11T08:26:32.000Z","updated_at":"2023-09-13T23:12:44.417Z","dependencies_parsed_at":"2022-08-19T14:00:51.963Z","dependency_job_id":null,"html_url":"https://github.com/kowalski7cc/podlab","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowalski7cc%2Fpodlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowalski7cc%2Fpodlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowalski7cc%2Fpodlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowalski7cc%2Fpodlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kowalski7cc","download_url":"https://codeload.github.com/kowalski7cc/podlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232132991,"owners_count":18477232,"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","buildah","centos","podman","rootlesskit"],"created_at":"2025-01-01T22:29:43.230Z","updated_at":"2025-01-01T22:29:43.303Z","avatar_url":"https://github.com/kowalski7cc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# podLAB\n\nBuild a simple lab using podman and systemd, ready for exercising with Ansible, inspired by [@mrjackv](https://github.com/mrjackv) ansible-nspawn\n\n## Requirements\n\n- systemd\n- podman\n- buildah\n- python\n- ssh-keygen, ssh\n- ansible\n\n## Usage\n\nFirst run the `setup`\n\n```shell\n./setup\n```\n\nThis script will generate an ssh-key pair, setup the podlab network and then download a `centos:stream9` image and perform the following steps on it:\n\n- add podlab labels\n- install userful packages (see [Included Pakcages](#included-packages)) \n- add ansible user\n- add ansible ssh key\n- allow ansible to sudo without password\n- add a student user\n- allow root login\n\nthen start pods with the `boot` script, and you can set optionally the ansible gruop to which they will belong.\n\n```shell\n./boot [group]\n```\n\nYou can also use the option `-a` to attach directly to the new container.\n\nFinally you can run your playbooks like this:\n\n```shell\nansible-playbook ./playbooks/example.yml\n```\n\nAfter you're done excercising, you can stop the lab with the command\n\n```shell\n./shutdown\n```\n\nYou can also use the `-c` option to delete the image and the network. They will be created again next time tou run the `setup` script \n\n## What's inside?\n\nA quick look at the files and directories included in podlab\n\n```\n.\n├── playbooks\n├── ansible.cfg\n├── boot\n├── inventory\n├── LICENSE\n├── podssh\n├── README.md\n├── setenv\n├── setup\n├── shutdown\n└── ssh_config\n```\n\n1. `playbooks`: A direcotry where you can place you playbooks. podLAB comes with a playbook named `example.yml`. You can run it with the command `ansible-playbook playbooks/example.yml`\n2. `ansible.cfg`: The configuration to tell ansible how to connect to podLAB containers\n3. `boot`: Runs a podLAB container (see [usage](#usage))\n4. `inventory`: Inventory script for Ansible in Python, it will filter out any non-podLAB containers\n5. `LICENSE`: podlab's MIT license\n6. `podssh`: ssh script in podman's unshare net namespace environment, it allows to ssh to any container easily.\n7. `README.md`: This file :)\n8. `setenv`: podLABS configuration\n9. `setup`: Configures the environment for podLAB's usage (see [usage](#usage))\n10. `shutdown`: Stops all podLAB's containers, and optionally clears images and networks (see [usage](#usage))\n11. `ssh_config`: The ssh configuration file that allows ansible and manual ssh connection to containers\n\n## Included packages\n\n```\n- basesystem\n- bash\n- systemd\n- openssh-server\n- passwd\n- sudo\n- python3\n- yum\n- dnf\n- findutils\n- iproute\n- NetworkManager\n- iputils\n- bind-utils\n- procps-ng\n- openssh-clients\n- nc\n- at\n- hostname\n- acl\n- xz\n- zip\n- info\n- wget\n- bzip2\n- file\n- ed\n- nano\n- quota\n- less\n- which\n- strace\n- symlinks\n- tcpdump\n- time\n- tree\n- jq\n- pinfo\n- vim-enhanced\n- words\n- util-linux-user\n```\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkowalski7cc%2Fpodlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkowalski7cc%2Fpodlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkowalski7cc%2Fpodlab/lists"}