{"id":19672344,"url":"https://github.com/wcm-io-devops/ansible-jenkins-configuration-as-code","last_synced_at":"2025-04-29T01:30:42.538Z","repository":{"id":43375697,"uuid":"156863592","full_name":"wcm-io-devops/ansible-jenkins-configuration-as-code","owner":"wcm-io-devops","description":"Ansible role for configuring, deploying and reloading jenkins configuration as code","archived":false,"fork":false,"pushed_at":"2023-03-09T09:50:02.000Z","size":56,"stargazers_count":27,"open_issues_count":0,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-05T12:11:29.793Z","etag":null,"topics":["ansible-role","casc","jcasc","jenkins","jenkins-configuration"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wcm-io-devops.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-09T13:09:24.000Z","updated_at":"2023-08-30T18:00:02.000Z","dependencies_parsed_at":"2024-11-11T17:12:06.013Z","dependency_job_id":"8b6c75b9-3e7e-4f34-a336-9b6934050cd7","html_url":"https://github.com/wcm-io-devops/ansible-jenkins-configuration-as-code","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcm-io-devops%2Fansible-jenkins-configuration-as-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcm-io-devops%2Fansible-jenkins-configuration-as-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcm-io-devops%2Fansible-jenkins-configuration-as-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcm-io-devops%2Fansible-jenkins-configuration-as-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wcm-io-devops","download_url":"https://codeload.github.com/wcm-io-devops/ansible-jenkins-configuration-as-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251415600,"owners_count":21585861,"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-role","casc","jcasc","jenkins","jenkins-configuration"],"created_at":"2024-11-11T17:11:48.997Z","updated_at":"2025-04-29T01:30:42.265Z","avatar_url":"https://github.com/wcm-io-devops.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/wcm-io-devops/ansible-jenkins-configuration-as-code/workflows/CI/badge.svg?branch=master\u0026event=push)](https://github.com/wcm-io-devops/ansible-jenkins-configuration-as-code/actions?query=workflow%3ACI)\n\n# wcm_io_devops.jenkins_configuration_as_code\n\nThis role manages the installation, configuration and update of the\n[Jenkins Configuration as Code Plugin aka JCasC](https://github.com/jenkinsci/configuration-as-code-plugin).\n\nTasks:\n* Install JCasC plugin(s)\n* Configure the path for the JCasC plugin\n* Deployment of JCasC configuration files\n* Reloading of JCasC\n\n## Requirements\n\nThis role requires Ansible 2.7 or higher and a running Jenkins on the\ntarget instance.\n\n## Role Variables\n\nAvailable variables are listed below, along with their default values.\n\n    jenkins_casc_admin_username: admin\n\nJenkins admin username.\n\n    jenkins_casc_admin_password: admin\n\nJenkins admin password.\n\n    jenkins_casc_owner: jenkins\n\nLinux jenkins user.\n\n    jenkins_casc_group: \"{{ jenkins_casc_owner }}\"\n\nLinux group of jenkins user.\n\n    jenkins_casc_jenkins_hostname: localhost\n\nHostname of the jenkins instance.\n\n    jenkins_casc_jenkins_port: 8080\n\nHTTP port of the jenkins instance.\n\n    jenkins_casc_jenkins_url_prefix: \"\"\n\nUrl prefix of the jenkins instance, e.g. when running in tomcat.\n\n    jenkins_casc_jenkins_base_url: \"http://{{ jenkins_casc_jenkins_hostname }}:{{ jenkins_casc_jenkins_port }}{{ jenkins_casc_jenkins_url_prefix }}\"\n\nThe base url of the jenkins instance.\n\n    jenkins_casc_jenkins_home: \"/var/lib/jenkins\"\n\nPath to the jenkins casc directory containing the yaml files for configuration.\n\n    jenkins_casc_config_path: \"{{ jenkins_casc_jenkins_home }}/jcasc\"\n\nPath to the jenkins casc directory containing the yaml files for configuration.\n\n    jenkins_casc_config_path_configure: false\n\nEnables / Disabling the configuration of the configuration path. When\nthis value is set to true the JcasC path in the Jenkins instance is set\nto `jenkins_casc_config_path`. When the path differs from the previous\nset path the configuration is directly reloaded.\n\n    jenkins_casc_config_fileglobs: []\n\nConfig files/templates to upload. When the result of this step is\nchanged the configuration will be reloaded.\n\n    jenkins_casc_config_unmanaged_delete: false\n\nControls if files that existing files in the 'jenkins_casc_config_path' are deleted when they are not included in the 'jenkins_casc_config_fileglobs'.\nDeletion will only be executed when at least one file was uploaded to the 'jenkins_casc_config_path'.\n\n    jenkins_casc_script_timeout: 60\n\nThe timeout for jenkins_script tasks in seconds.\n\n    jenkins_casc_plugins_present:\n      - name: configuration-as-code\n        version: \"1.3\"\n      - name: configuration-as-code-support\n        version: \"1.3\"\n\nPlugins needed for configuration-as-code.\n\n    jenkins_casc_secrets_dir: /var/jenkins_secrets\n\nFolder where the credentials will be stored on the master.\nPath will be configured in environment variable SECRETS.\n\n    jenkins_casc_secrets_unmanaged_delete: true\n\nControls if the role will delete existing but not defined credentials from jenkins_casc_secrets_dir.\nDeletion will only be executed when at least one secret was uploaded to the 'jenkins_casc_secrets_dir'.\n\n    jenkins_casc_secrets: []\n    # Example:\n    # - id: credential-id\n    #   value: credential-value\n\nList of id/value credential pairs. The `id` can then be referenced in jcasc with `${id}` as value reference.\n\n## Dependencies\n\nThis role depends on the\n[wcm_io_devops.jenkins_plugins](https://github.com/wcm-io-devops/ansible-jenkins-plugins)\nrole to install/uninstall the plugins.\n\nAs transitive dependency this role uses the\n[wcm_io_devops.jenkins_facts](https://github.com/wcm-io-devops/ansible-jenkins-facts)\nrole to retrieve the list of installed plugins from the Jenkins\ninstance.\n\n## Example Playbook\n\nThis playbook will set the JCasC configuration path to\n`/var/lib/jenkins/jcasc-folder` and will deploy all `.yml` and\n`.yaml` files found below `file/jcasc/my-jenkins/` to this folder.\n\n    - name: \"Deploy jcasc\"\n      hosts: jenkins\n      vars:\n        jenkins_casc_config_path_configure: true\n        jenkins_casc_config_path: \"/var/lib/jenkins/jcasc-folder\"\n        jenkins_casc_config_fileglobs:\n            - file/jcasc/my-jenkins/*.yml\n            - file/jcasc/my-jenkins/*.yaml\n      roles:\n        - wcm_io_devops.jenkins_configuration_as_code\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwcm-io-devops%2Fansible-jenkins-configuration-as-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwcm-io-devops%2Fansible-jenkins-configuration-as-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwcm-io-devops%2Fansible-jenkins-configuration-as-code/lists"}