Create and use Jenkins user
This commit is contained in:
parent
5daeae54cd
commit
bf49f3c648
@ -1,2 +1,3 @@
|
||||
jenkins_name: jenkins
|
||||
jenkins_user: jenkins
|
||||
jenkins_root: "/opt/{{ jenkins_name }}/jenkins_home"
|
||||
|
@ -1,3 +1,19 @@
|
||||
- name: Create Jenkins user
|
||||
user:
|
||||
name: "{{ jenkins_user }}"
|
||||
state: present
|
||||
shell: /bin/bash
|
||||
skeleton: /etc/skel
|
||||
generate_ssh_key: true
|
||||
|
||||
- name: Set Jenkins authorized key
|
||||
authorized_key:
|
||||
user: jenkins
|
||||
state: present
|
||||
exclusive: true
|
||||
key: "{{ jenkins_sshkey }}"
|
||||
when: jenkins_sshkey is defined
|
||||
|
||||
- name: Install Ansible source
|
||||
template:
|
||||
src: ansible.list
|
||||
|
Loading…
Reference in New Issue
Block a user