2018-12-13 22:09:22 +00:00
|
|
|
---
|
|
|
|
- name: Concat lists for proxy setup
|
|
|
|
set_fact:
|
2018-12-13 23:09:51 +00:00
|
|
|
droneci_no_proxy: "{{ __droneci_default_no_proxy }} + {{ droneci_no_proxy | default([]) }}"
|
2018-12-13 22:09:22 +00:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Deploy compose file to '{{ droneci_service_directory }}'
|
|
|
|
template:
|
|
|
|
src: "services/droneci-compose.yml.j2"
|
|
|
|
dest: "{{ droneci_service_directory }}/docker-compose.yml"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: __drone_restart
|
|
|
|
|
2019-05-10 08:55:14 +00:00
|
|
|
- name: Create systemd unit files
|
|
|
|
template:
|
|
|
|
src: "etc/systemd/system/drone.service.j2"
|
|
|
|
dest: "/etc/systemd/system/drone.service"
|
|
|
|
mode: 0644
|
|
|
|
notify: __drone_restart
|
|
|
|
|
2019-01-11 21:40:18 +00:00
|
|
|
- name: Copy license key file is defined
|
|
|
|
copy:
|
|
|
|
src: "{{ droneci_license_key }}"
|
|
|
|
dest: "{{ droneci_service_directory }}/{{ droneci_license_key | basename }}"
|
|
|
|
mode: 0600
|
|
|
|
when: droneci_license_key is defined
|
2019-08-04 11:30:18 +00:00
|
|
|
|
|
|
|
- name: Open ports in iptables
|
|
|
|
iptables_raw:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
rules: "{{ item.rules }}"
|
|
|
|
state: "{{ item.state | default('present') }}"
|
|
|
|
weight: "{{ item.weight | default(omit) }}"
|
|
|
|
table: "{{ item.table | default(omit) }}"
|
2019-08-27 20:04:29 +00:00
|
|
|
loop: "{{ droneci_open_ports }}"
|
2019-08-04 11:30:18 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.name }}"
|
|
|
|
when: droneci_iptables_enabled | bool
|
2018-12-13 22:09:22 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|