From 44b306376ddd425acdb64a36fe77dfe7a9992a93 Mon Sep 17 00:00:00 2001 From: "zhifeng.jiang" Date: Wed, 2 Nov 2016 22:28:26 +0800 Subject: Fix ansible Syntax Error while loading YAML and separates docker,elk and nginx installing file. JIRA:QTIP-111 Change-Id: I8fe004b0edc86729e1beff07b406b568af60da89 Signed-off-by: zhifeng.jiang --- supporting/servers/roles/elk/defaults/main.yml | 4 -- supporting/servers/roles/elk/handlers/main.yml | 8 ---- supporting/servers/roles/elk/tasks/main.yml | 50 ---------------------- supporting/servers/roles/elk/templates/elk.conf.j2 | 14 ------ 4 files changed, 76 deletions(-) delete mode 100644 supporting/servers/roles/elk/defaults/main.yml delete mode 100644 supporting/servers/roles/elk/handlers/main.yml delete mode 100644 supporting/servers/roles/elk/templates/elk.conf.j2 (limited to 'supporting/servers/roles/elk') diff --git a/supporting/servers/roles/elk/defaults/main.yml b/supporting/servers/roles/elk/defaults/main.yml deleted file mode 100644 index 855fc7ea..00000000 --- a/supporting/servers/roles/elk/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -services: - - { name: kibana, upstream: 'http://127.0.0.1:5601' } - - { name: elastic, upstream: 'http://127.0.0.1:9200' } diff --git a/supporting/servers/roles/elk/handlers/main.yml b/supporting/servers/roles/elk/handlers/main.yml deleted file mode 100644 index 46bd76c7..00000000 --- a/supporting/servers/roles/elk/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: starting docker service - become: true - service: name=docker state=started - -- name: restart nginx - become: true - service: name=nginx state=restarted diff --git a/supporting/servers/roles/elk/tasks/main.yml b/supporting/servers/roles/elk/tasks/main.yml index cc544be5..ed987f1a 100644 --- a/supporting/servers/roles/elk/tasks/main.yml +++ b/supporting/servers/roles/elk/tasks/main.yml @@ -1,43 +1,4 @@ --- -- name: adding keys - become: true - apt_key: keyserver=hkp://p80.pool.sks-keyservers.net id=0X58118E89F3A912897C070ADBF76221572C52609D - -- name: adding entry for ubuntu - become: true - apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present filename='docker' - when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04" - -- name: installing from docker repo - become: true - shell: apt-cache policy docker-engine - when: ansible_distribution == "Ubuntu" and ansible_distribution_version== "16.04" - -- name: adding entry for ubuntu - become: true - apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-trusty main' state=present filename='docker' - when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04" - -- name: updating - become: true - apt: update_cache=yes - -- name: installing docker engine - become: true - apt: name=docker-engine - -- name: install pip - apt: - pkg:{{ item }} state=installed - state: installed - with_items: - - python-dev - - python-pip - -- name: install docker-py - pip: - name: docker-py - - name: pulling elasticsearch and kibana become: true docker_image: name={{ item }} state=present @@ -59,14 +20,3 @@ image: kibana published_ports: 5601:5601 links: esearch:elasticsearch - -- name: nginx is installed - become: true - package: name=nginx state=present -- name: qtip server configuration is generated - become: true - template: src={{ item }}.conf.j2 dest=/etc/nginx/sites-enabled/{{ item }}.conf - with_items: - - elk - notify: - - restart nginx diff --git a/supporting/servers/roles/elk/templates/elk.conf.j2 b/supporting/servers/roles/elk/templates/elk.conf.j2 deleted file mode 100644 index 271690e0..00000000 --- a/supporting/servers/roles/elk/templates/elk.conf.j2 +++ /dev/null @@ -1,14 +0,0 @@ -# {{ ansible_managed }} - -# servers -# -{% for service in services %} -server { - listen 80; - listen 443 ssl; - server_name {{ service.name }}.qtip.openzero.net; - location / { - proxy_pass {{ service.upstream }}; - } -} -{% endfor %} -- cgit 1.2.3-korg