emmetog/ansible-jenkins

need to set user on Jenkins_Home directory & make user from /etc/sysconfig/jenkins to run as root user

Opened this issue · 1 comments

need to set user on Jenkins_Home directory & make user from /etc/sysconfig/jenkins to run as root user

ansible-jenkins/tasks/configure-jenkins.yml

  • name: setting up user for jenkins home directory
    lineinfile:
    path: /etc/sysconfig/jenkins
    regexp: '^JENKINS_USER='
    line: 'JENKINS_USER="{{ jenkins_config_owner }}"'
  • name: changing ownership of jenkins home directory
    file:
    path: "{{ jenkins_home }}"
    owner: "{{ jenkins_config_owner }}"
    group: "{{ jenkins_config_group }}"
    mode: 0755
    state: directory
    recurse: yes