diff --git a/defaults/main.yaml b/defaults/main.yaml index 59e36c7..55c2a3c 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -12,6 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. --- +jenkins_user_name: jenkins +jenkins_user_group: "{{ jenkins_user_name }}" +jenkins_user_home: "/var/lib/{{ jenkins_user_name }}" + jenkins_config_ajp_listen_address: 127.0.0.1 jenkins_config_ajp_port: -1 jenkins_config_args: '' @@ -19,7 +23,7 @@ jenkins_config_debug_level: 5 jenkins_config_enable_access_log: no jenkins_config_handler_idle: 20 jenkins_config_handler_max: 100 -jenkins_config_home: /var/lib/jenkins +jenkins_config_home: "{{ jenkins_user_home }}" jenkins_config_https_keystore: '' jenkins_config_https_keystore_password: '' jenkins_config_https_listen_address: 127.0.0.1 diff --git a/tasks/config.yaml b/tasks/config.yaml index 319c10f..67f6fcc 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -12,6 +12,15 @@ # License for the specific language governing permissions and limitations # under the License. --- +- name: Create required directories. + file: + group: "{{ jenkins_user_group }}" + owner: "{{ jenkins_user_name }}" + path: "{{ item }}" + state: directory + with_items: + - "{{ jenkins_user_home }}/plugins" + - name: Template clouds yaml file. template: dest: "{{ jenkins_template_config_dest }}" diff --git a/tasks/install/redhat.yaml b/tasks/install/redhat.yaml index 86e37e3..7731609 100644 --- a/tasks/install/redhat.yaml +++ b/tasks/install/redhat.yaml @@ -13,7 +13,7 @@ # under the License. --- - name: Ensure build dependencies are installed. - yum: + yum: pkg: "{{ item }}" state: installed with_items: jenkins_build_depends