Skip to content
Snippets Groups Projects
Commit 1b465af6 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent a99286e3
Branches
Tags
No related merge requests found
youtrack_version: '6.5.17105'
youtrack_version: 6.5.17105
---
# file: roles/youtrack/handlers/main.yml
- name: "Include YouTrack to Boot-List"
- name: Include YouTrack to Boot-List
command: update-rc.d youtrack defaults
---
# file: roles/youtrack/tasks/apache.yml
- name: "Apache Configuration File"
- name: Apache Configuration File
template:
src='vhost.conf'
dest='/etc/apache2/sites-available/{{ youtrack.domain }}{{ apache_conf_ext }}'
......@@ -11,7 +11,7 @@
notify:
- "Apache | Restart Apache"
- name: "Apache enable our new site(s)"
- name: Apache enable our new site(s)
command: a2ensite {{ youtrack.domain }} creates=/etc/apache2/sites-enabled/{{ youtrack.domain }}{{ apache_conf_ext }}
notify:
- "Apache | Restart Apache"
......@@ -8,6 +8,7 @@
- set_fact:
apacheLogDir='{{ jailroot }}/{{ youtrack.id }}/var/log/apache2'
when: youtrack.jail is defined
tags: 'always'
tags:
- always
- include_tasks: 'apache.yml'
- include_tasks: apache.yml
......@@ -3,36 +3,38 @@
# optional: firewall port 5222 outgoing for jabber
- name: "YouTrack Role"
set_fact: role_youtrack_started=true
tags: 'always'
- name: YouTrack Role
set_fact:
role_youtrack_started: yes
tags:
- always
- block:
- name: "Install Certs"
include_tasks: '../../letsencrypt/tasks/cert.yml'
- name: Install Certs
include_tasks: ../../letsencrypt/tasks/cert.yml
with_items: '{{ youtrack_settings|default([]) }}'
loop_control:
loop_var: domain
when: domain.protocol|default("https") == "https" and domain.letsencrypt|default(true)
when: '"letsencrypt" not in excluded_roles and groups.proxyserver is not defined'
when: not excluded_roles or "letsencrypt" not in excluded_roles and groups.proxyserver is not defined
- block:
- name: "Install"
include_tasks: 'install.yml'
- name: Install
include_tasks: install.yml
with_items: '{{ youtrack_settings|default([]) }}'
loop_control:
loop_var: youtrack
when: limit_youtrack_site is not defined or youtrack.id is not defined or limit_youtrack_site == youtrack.id
- name: "Create YouTrack User"
- name: Create YouTrack User
user:
name='youtrack'
group='root'
home='/home/youtrack'
- name: "Ensure YouTrack Directory"
- name: Ensure YouTrack Directory
file:
path='/var/youtrack'
state='directory'
......@@ -40,7 +42,7 @@
group='root'
mode='755'
- name: "Create scripts"
- name: Create scripts
template:
src="{{ item.src }}"
dest="{{ item.dest }}"
......@@ -48,15 +50,15 @@
group=root
mode='755'
with_items:
- src: 'etc_init_d_youtrack'
dest: '/etc/init.d/youtrack'
- src: 'bin_youtrack_start.sh'
dest: '/usr/local/bin/youtrack-start.sh'
- src: 'bin_youtrack_stop.sh'
dest: '/usr/local/bin/youtrack-stop.sh'
- src: etc_init_d_youtrack
dest: /etc/init.d/youtrack
- src: bin_youtrack_start.sh
dest: /usr/local/bin/youtrack-start.sh
- src: bin_youtrack_stop.sh
dest: /usr/local/bin/youtrack-stop.sh
notify: "Include YouTrack to Boot-List"
- name: "Download JAR"
- name: Download JAR
get_url:
url='http://download-ln.jetbrains.com/charisma/youtrack-{{ youtrack_version }}.jar'
dest='/var/youtrack/youtrack-{{ youtrack_version }}.jar'
......@@ -64,7 +66,7 @@
group='root'
mode='644'
- name: "Ensure symbolic link"
- name: Ensure symbolic link
file:
src='/var/youtrack/youtrack-{{ youtrack_version }}.jar'
dest='/var/youtrack/youtrack.jar'
......@@ -72,4 +74,4 @@
group='root'
state=link
when: '"youtrack" not in excluded_roles'
when: not excluded_roles or "youtrack" not in excluded_roles
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment