diff --git a/defaults/main.yaml b/defaults/main.yaml index 91b66a5..6cf9f5a 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -18,9 +18,9 @@ zuul_user_group: zuul zuul_user_home: /var/lib/zuul zuul_file_layout_dest: /etc/zuul/config/ -zuul_file_layout_group: "{{ ansible_user }}" +zuul_file_layout_group: "{{ zuul_user_group }}" zuul_file_layout_mode: "0755" -zuul_file_layout_owner: "{{ ansible_user }}" +zuul_file_layout_owner: "{{ zuul_user_name }}" zuul_file_layout_src: etc/zuul/config/ zuul_config_gearman_port: 4730 diff --git a/tasks/config.yaml b/tasks/config.yaml index c2db129..01ecd6a 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -53,22 +53,12 @@ src: "{{ zuul_file_server_logging_conf }}" notify: Reload zuul-server -- name: Create layout config directory. +- name: Copy layout configuration. become: yes - file: + copy: dest: "{{ zuul_file_layout_dest }}" group: "{{ zuul_file_layout_group }}" mode: "{{ zuul_file_layout_mode }}" owner: "{{ zuul_file_layout_owner }}" - state: directory - -- name: Rsync layout configuration. - become: no - synchronize: - delete: yes - dest: "{{ zuul_file_layout_dest }}" - perms: yes - rsync_opts: - - "--chmod=Du=rwx,Dgo=rx" src: "{{ zuul_file_layout_src }}" notify: Reload zuul-server diff --git a/tests/inventory b/tests/inventory index 3ba1200..68b2dac 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,6 +1,2 @@ [all] -# NOTE(pabelanger): We should not be hard-coding jenkins here, since it limits -# who can run this test. However, ansible 2.0 has broken ansible_user and it -# now requires to be setup, otherwise it will return nil[1]. -# [1] https://github.com/ansible/ansible/issues/13669 -localhost ansible_user=jenkins +localhost diff --git a/tests/test.yaml b/tests/test.yaml index d793832..507f903 100644 --- a/tests/test.yaml +++ b/tests/test.yaml @@ -74,10 +74,8 @@ that: - zuul_layout_stat.stat.exists - zuul_layout_stat.stat.isdir - # NOTE(pabelanger): This means we are hardcoded to the - # openstack-infra jenkins user in nodepool. - - zuul_layout_stat.stat.pw_name == 'jenkins' - - zuul_layout_stat.stat.gr_name == 'jenkins' + - zuul_layout_stat.stat.pw_name == 'zuul' + - zuul_layout_stat.stat.gr_name == 'zuul' - zuul_layout_stat.stat.mode == '0755' - name: Register /etc/zuul/config/layout.yaml @@ -90,10 +88,8 @@ that: - zuul_layout_yaml_stat.stat.exists - zuul_layout_yaml_stat.stat.isreg - # NOTE(pabelanger): This means we are hardcoded to the - # openstack-infra jenkins user in nodepool. - - zuul_layout_yaml_stat.stat.pw_name == 'jenkins' - - zuul_layout_yaml_stat.stat.gr_name == 'jenkins' + - zuul_layout_yaml_stat.stat.pw_name == 'zuul' + - zuul_layout_yaml_stat.stat.gr_name == 'zuul' - name: Register /etc/default/zuul stat: