--- # Copyright 2016 Internet Solutions (Pty) Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # (c) 2016 Donovan Francesco # (c) 2016 Paul Stevens # - name: Copy Zookeeper Templates template: src: "{{ item.src }}" dest: "{{ item.dest }}" owner: "{{ item.owner }}" group: "{{ item.group }}" mode: "0644" with_items: - src: "zookeeper/zoo.cfg.j2" dest: "/etc/zookeeper/conf/zoo.cfg" owner: "root" group: "root" - src: "zookeeper/myid.j2" dest: "/etc/zookeeper/conf/myid" owner: "root" group: "root" - src: "zookeeper/environment.j2" dest: "/etc/zookeeper/conf/environment" owner: "root" group: "root" - src: "zookeeper/log4j.properties.j2" dest: "/etc/zookeeper/conf/log4j.properties" owner: "root" group: "root" register: configure_zookeeper until: configure_zookeeper | success retries: 5 delay: 3 - name: Restart zookeeper service: name: "zookeeper" state: "restarted" when: zookeeper_config.changed register: restart_zookeeper until: restart_zookeeper | success retries: 5 delay: 3