You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
600 B

6 years ago
  1. ---
  2. - name: check linux version
  3. debug:
  4. var: ansible_os_family
  5. - name: create dirs
  6. file: path={{ item }} state=directory
  7. loop: "{{ dest_dirs }}"
  8. - name: copy consul .service
  9. copy: src=consul.service dest=/etc/systemd/system/consul.service
  10. notify:
  11. - restart consul
  12. - name: copy consul exec
  13. copy: src=consul dest=/usr/local/bin/ mode=0755
  14. notify:
  15. - restart consul
  16. - name: generate consul config
  17. template: src=config_server.j2 dest=/etc/consul.d/config.json
  18. notify:
  19. - restart consul
  20. - name: enable and start consul
  21. service: name=consul state=started enabled=yes

Powered by TurnKey Linux.