<h1 align="center">
<a href="https://prompts.chat">

Sign in to like and favorite skills
An Ansible role to install and configure a Jenkins Agent on your host.
This Ansible role facilitates the installation of a Jenkins agent on the host machine. The role takes care of establishing the necessary file architecture for executing jobs and pipelines. Additionally, it supports CI workflows focused on Docker by adding the user to the Docker group.
The role provides the flexibility to explicitly define the user that the agent will use (username/password). The agent is started as a service, and security options, such as basic authentication, CA certificates, etc., can be configured. It is essential to have Java installed, and Docker if needed for Docker-centric CI workflows.
In summary, this Ansible role simplifies the process of installing a Jenkins agent on a host machine, addressing file structure requirements, supporting Docker-oriented CI workflows, and offering customizable user and security configurations.
# Install husky and init npm i && npx husky init && npm i validate-branch-name && npm cz # Initialize the local secrets database, if not already present MSYS_NO_PATHCONV=1 docker run -it --rm -v "$(pwd):/app" -w "/app" labocbz/devops-linters:latest detect-secrets scan --exclude-files 'node_modules' > .secrets.baseline # Decrypt the local Ansible Vault # Get the Ansible Local Vault Key on PassBolt and create the .ansible-vault.key file, after that you can unlock your local vault MSYS_NO_PATHCONV=1 docker run --rm -it -v "$HOME/.docker:/root/.docker" -v "$(pwd):/root/ansible/${DIR}" -w /root/ansible/${DIR} labocbz/ansible-molecule:latest /bin/sh -c 'cat ./.ansible-vault.key > /tmp/.ansible-vault.key && chmod -x /tmp/.ansible-vault.key && ansible-vault decrypt --vault-password-file /tmp/.ansible-vault.key ./tests/inventory/group_vars/vault.yml'
# Analyse the project for secrets, and audit ./detect-secrets # Lint Markdown MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd):/app" -w "/app" labocbz/devops-linters:latest markdownlint './**.md' --disable MD013 --disable MD059 # Lint YAML MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd):/app" -w "/app" labocbz/devops-linters:latest yamllint -c ./.yamllint . # Lint Ansible MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd):/app" -w "/app" labocbz/devops-linters:latest ansible-lint --offline --exclude node_modules -x meta-no-info -p .
This repository contain a unique Molecule controller to start containers and tests your roles and playbook inside them.
# Start the Molecule controller ./molecule-controller # Inside the controller molecule create molecule converge molecule verify molecule test
In order to use this role, you have to know its defaults vars and their purppose.
This role have these default vars here: defaults.yml.
To run this role or use it inside a playbook, import the call task from converge.yml.
Here you can put your change to keep a trace of your work and decisions.
___ by __