From 3059ed92fb2e191cb2dc55f60c3da29953c3b6f7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 24 Nov 2019 17:29:04 +0100 Subject: [PATCH] cleanup --- tasks/main.yml | 4 +--- tasks/post.yml | 10 ---------- tasks/prepare.yml | 16 ---------------- tasks/setup.yml | 13 +++++++++++++ vars/main.yml | 5 ----- 5 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 tasks/post.yml delete mode 100644 tasks/prepare.yml diff --git a/tasks/main.yml b/tasks/main.yml index 5e4452e..1f69f7a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,2 @@ --- -- import_tasks: prepare.yml -- import_tasks: setup.yml -- import_tasks: post.yml +- include_tasks: setup.yml diff --git a/tasks/post.yml b/tasks/post.yml deleted file mode 100644 index a755c86..0000000 --- a/tasks/post.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- block: - - name: Ensure drone service is up and running - systemd: - state: started - daemon_reload: yes - enabled: yes - name: drone - become: True - become_user: root diff --git a/tasks/prepare.yml b/tasks/prepare.yml deleted file mode 100644 index 56e40f1..0000000 --- a/tasks/prepare.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- block: - - name: Ensure service directory exists - file: - path: "{{ droneci_service_directory }}" - state: directory - mode: 0755 - - - name: Install required dependencies - pip: - name: "{{ item.name }}" - executable: "{{ item.exec | default(omit) }}" - state: present - loop: "{{ __drone_pip_dependencies }}" - become: True - become_user: root diff --git a/tasks/setup.yml b/tasks/setup.yml index 6b3b398..6d36b13 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -4,6 +4,12 @@ droneci_no_proxy: "{{ __droneci_default_no_proxy }} + {{ droneci_no_proxy | default([]) }}" - block: + - name: Ensure service directory exists + file: + path: "{{ droneci_service_directory }}" + state: directory + mode: 0755 + - name: Deploy compose file to '{{ droneci_service_directory }}' template: src: "services/droneci-compose.yml.j2" @@ -26,5 +32,12 @@ dest: "{{ droneci_service_directory }}/{{ droneci_license_key | basename }}" mode: 0600 when: droneci_license_key is defined + + - name: Ensure drone service is up and running + systemd: + state: started + daemon_reload: yes + enabled: yes + name: drone become: True become_user: root diff --git a/vars/main.yml b/vars/main.yml index 56faa5e..0b18f80 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -2,8 +2,3 @@ __droneci_default_no_proxy: - droneserver - droneagent - -__drone_pip_dependencies: - - name: docker - - name: docker-compose - exec: pip3