Add config directory for yaml files
Change-Id: I0008a7b2fdbc79a4acd57cd71be6986b5d37334e Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
6a5e045058
commit
2247880f24
|
@ -26,6 +26,12 @@ jenkins_job_builder_config_jenkins_password: ""
|
|||
jenkins_job_builder_config_jenkins_url: http://localhost:8008
|
||||
jenkins_job_builder_config_jenkins_query_plugins_info: False
|
||||
|
||||
jenkins_job_builder_file_jobs_dest: /etc/jenkins_jobs/config
|
||||
jenkins_job_builder_file_jobs_group: "{{ ansible_ssh_user }}"
|
||||
jenkins_job_builder_file_jobs_mode: "0755"
|
||||
jenkins_job_builder_file_jobs_owner: "{{ ansible_ssh_user }}"
|
||||
jenkins_job_builder_file_jobs_src: etc/jenkins_jobs/config/
|
||||
|
||||
jenkins_job_builder_template_jenkins_jobs_ini_dest: /etc/jenkins_jobs/jenkins_jobs.ini
|
||||
jenkins_job_builder_template_jenkins_jobs_ini_group: "{{ jenkins_job_builder_user_group }}"
|
||||
jenkins_job_builder_template_jenkins_jobs_ini_mode: "0440"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# This file is generated by Ansible
|
||||
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
|
||||
#
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2015 Red Hat, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
---
|
||||
- name: Reload jenkins-jobs
|
||||
ignore_errors: yes
|
||||
shell: "jenkins-jobs --conf {{ jenkins_job_builder_template_jenkins_jobs_ini_dest }} update {{ jenkins_job_builder_file_jobs_dest }} --delete-old"
|
||||
sudo: yes
|
||||
sudo_user: "{{ jenkins_job_builder_user_name }}"
|
|
@ -28,3 +28,20 @@
|
|||
mode: "{{ jenkins_job_builder_template_jenkins_jobs_ini_mode }}"
|
||||
owner: "{{ jenkins_job_builder_template_jenkins_jobs_ini_owner }}"
|
||||
src: "{{ jenkins_job_builder_template_jenkins_jobs_ini_src }}"
|
||||
|
||||
- name: Create jobs directory.
|
||||
file:
|
||||
dest: "{{ jenkins_job_builder_file_jobs_dest }}"
|
||||
group: "{{ jenkins_job_builder_file_jobs_group }}"
|
||||
mode: "{{ jenkins_job_builder_file_jobs_mode }}"
|
||||
owner: "{{ jenkins_job_builder_file_jobs_owner }}"
|
||||
state: directory
|
||||
|
||||
- name: Rsyc jenkins jobs configuration.
|
||||
sudo: no
|
||||
synchronize:
|
||||
delete: yes
|
||||
dest: "{{ jenkins_job_builder_file_jobs_dest }}"
|
||||
perms: yes
|
||||
src: "{{ jenkins_job_builder_file_jobs_src }}"
|
||||
notify: Reload jenkins-jobs
|
||||
|
|
Loading…
Reference in New Issue