blob: 707e12874a5acda0824136208dc37b205f783c8c [file] [log] [blame]
---
- name: Configure proxy config for Jenkins
template:
src: proxy.xml
dest: "{{ jenkins_home }}/proxy.xml"
owner: "{{ jenkins_process_user }}"
group: "{{ jenkins_process_group }}"
mode: 0664
register: jenkins_proxy_config
when:
- jenkins_proxy_host | length > 0
- jenkins_proxy_port | length > 0
- name: Modify variables in init file.
lineinfile:
dest: "{{ jenkins_init_file }}"
insertafter: '^{{ item.option }}='
regexp: '^{{ item.option }}=\"\${{ item.option }} '
line: '{{ item.option }}="${{ item.option }} {{ item.value }}"'
state: present
mode: 0644
with_items: "{{ jenkins_init_changes }}"
register: jenkins_init_prefix
- name: Create custom init scripts directory.
file:
path: "{{ jenkins_home }}/init.groovy.d"
state: directory
owner: "{{ jenkins_process_user }}"
group: "{{ jenkins_process_group }}"
mode: 0775