Integration of Ansible Molecule with podman in GitLab CI/CD runner context

TL;DR

Does podman need the privileged container (aka root) mode to provide safe runtime environment for Ansible Molecule tests in GitLab CI/CD execution environment as mandatory setup option? If not, what could be a meaningful alternative?

If the construct is feasible: is there at least one up to date working implementation available as open source? If not: is here a way between privileged and non-privileged by reducing kernel capabilities set – what do we really need?

What are these tools, and what are they good for?

  • Ansible allows for idempotent, reproducible, automated OS environment configuration, remote and also local, using a standardized macro language which translates internally to Python and system shell operation. The ecosystem (Community Collections, Ansible Galaxy) provides a component library aka “roles”. Known alternatives are for example Puppet, Chef, Salt.

  • Ansible molecule is an Ansible-native test framework to develop and validate Ansible roles. For this, it needs an execution environment, earlier “drivers”, recently this has become more abstract and flexible, but anyway the idea is that you could test your configuration set captured by the role you are developing in an emulated environment like a Docker container or other tool. Here as you will see, Podman is an interesting option.

  • GitLab Runner is a software component to deploy runtime environment for GitLab’s CI/CD workflow language automating build and deployment processes. A source for security concerns can be the Docker runner mode (aka “executor”), so often if you do not need a privileged context for the container runtime you make builds and deployments, in many cases you can take for example the Kaniko image as [Docker] container image build environment and maybe also Crane. There is no Podman executor, but it offers a Docker-compatible system socket.

  • Podman allows to launch containers without daemon and also without privileged mode (but it could get it as well). That makes it an interesting candidate for the Ansible Molecule test environment.

Why this combination?

Together, Ansible molecule and Podman could provide neat, efficient and secure Ansible role development and validation environment, just the DevOps loop without needing real infrastructure.

What is the problem?

Due to the complexity of the setup, I have been doing some research for existing implementations – of course as an Ansible role i.e. I could just install this environment setup – and I have found several, but it’s not quite clear to me, whether it is really possible to implement this without a privileged container option.

Which implementations exist already?

Best I am able to found seems to be this one:

  • https://gitlab.com/osci/ansible-role-gitlabci-runner (however, it does not run through completely yet)

One further well-developed and up to date implementation seems to be:

  • https://github.com/zedr/gitlab_runner (however – “Container still needs to run privileged”)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật