[AETHER-831] - Setup Jenkins process via Ansible playbook
Change-Id: I6a3ae4d3025b41d851219a9762436988201d4add
diff --git a/tasks/settings.yml b/tasks/settings.yml
new file mode 100644
index 0000000..707e128
--- /dev/null
+++ b/tasks/settings.yml
@@ -0,0 +1,31 @@
+---
+- 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