Create required directories
This is the first step to start templating the jjb configuration. Change-Id: I536f2a705d2c70ccf285ac45ba876b52b28aa3d5 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
52df7fc47f
commit
cc889939dc
14
README.rst
14
README.rst
@ -29,6 +29,20 @@ do not manage them.
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Name of the user to be used.
|
||||
# Default: root
|
||||
jenkins_job_builder_user_name: root
|
||||
|
||||
# Name of the group to be used.
|
||||
# Default: root
|
||||
jenkins_job_builder_user_group: root
|
||||
|
||||
# Path of home directory to be used.
|
||||
# Default: /var/lib/jenkins_job_builder
|
||||
jenkins_job_builder_user_home: /var/lib/jenkins_job_builder
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
|
@ -12,6 +12,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
---
|
||||
# tasks/config.yaml
|
||||
jenkins_job_builder_user_name: root
|
||||
jenkins_job_builder_user_group: "{{ jenkins_job_builder_user_name }}"
|
||||
jenkins_job_builder_user_home: /var/lib/jenkins_job_builder
|
||||
|
||||
# tasks/install.yaml
|
||||
jenkins_job_builder_git_dest: /opt/ansible-role-jenkins-job-builder/git/openstack-infra/jenkins-job-builder
|
||||
jenkins_job_builder_git_uri: https://git.openstack.org/openstack-infra/jenkins-job-builder
|
||||
|
@ -12,3 +12,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
---
|
||||
- name: Create required directories.
|
||||
file:
|
||||
group: "{{ jenkins_job_builder_user_group }}"
|
||||
owner: "{{ jenkins_job_builder_user_name }}"
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ jenkins_job_builder_user_home }}"
|
||||
|
@ -25,3 +25,18 @@
|
||||
|
||||
roles:
|
||||
- "{{ rolename }}"
|
||||
|
||||
post_tasks:
|
||||
- name: Register jenkins_job_builder_user_home.
|
||||
stat:
|
||||
path: /var/lib/jenkins_job_builder
|
||||
register: jenkins_job_builder_user_home_stat
|
||||
|
||||
- name: Assert jenkins_job_builder_user_home tests.
|
||||
assert:
|
||||
that:
|
||||
- jenkins_job_builder_user_home_stat.stat.exists
|
||||
- jenkins_job_builder_user_home_stat.stat.isdir
|
||||
- jenkins_job_builder_user_home_stat.stat.pw_name == 'root'
|
||||
- jenkins_job_builder_user_home_stat.stat.gr_name == 'root'
|
||||
- jenkins_job_builder_user_home_stat.stat.mode == '0755'
|
||||
|
Loading…
x
Reference in New Issue
Block a user