Drop synchronize support

It was become too much work to deal with this. Additionally, if people
want to manually synchronize we expose the proper settings to allow
them to do so.

Change-Id: I8134f93cf89625712187487ef04739d43b6db1b7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-03-03 10:13:49 -05:00
parent d5ed9b287a
commit 7e4f94b741
3 changed files with 21 additions and 15 deletions

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
---
nginx_file_include_dir_dest: /etc/nginx/conf.d
nginx_file_include_dir_group: "{{ ansible_user }}"
nginx_file_include_dir_mode: "0755"
nginx_file_include_dir_owner: "{{ ansible_user }}"
nginx_file_include_dir_dest: /etc/nginx/conf.d/
nginx_file_include_dir_group: root
nginx_file_include_dir_mode: 0755
nginx_file_include_dir_owner: root
nginx_file_include_dir_src: ""
nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf

View File

@ -21,21 +21,12 @@
- Validate nginx
- Restart nginx
- name: Create custom configuration directory.
become: yes
file:
- name: Copy nginx custom configuration.
copy:
dest: "{{ nginx_file_include_dir_dest }}"
group: "{{ nginx_file_include_dir_group }}"
mode: "{{ nginx_file_include_dir_mode }}"
owner: "{{ nginx_file_include_dir_owner }}"
state: directory
- name: Rsync nginx configuration.
become: no
synchronize:
delete: yes
dest: "{{ nginx_file_include_dir_dest }}"
perms: yes
src: "{{ nginx_file_include_dir_src }}"
when: nginx_file_include_dir_src != ""
notify:

View File

@ -25,3 +25,18 @@
roles:
- "{{ rolename }}"
post_tasks:
- name: Register /etc/nginx/conf.d
stat:
path: /etc/nginx/conf.d
register: nginx_confd_stat
- name: Assert nginx_confd_stat tests.
assert:
that:
- nginx_confd_stat.stat.exists
- nginx_confd_stat.stat.isdir
- nginx_confd_stat.stat.pw_name == 'root'
- nginx_confd_stat.stat.gr_name == 'root'
- nginx_confd_stat.stat.mode == '0755'