Skip to content

Instantly share code, notes, and snippets.

@anlai
Created April 3, 2018 05:30
Show Gist options
  • Save anlai/6b7824f5bf26e352c5c4b07a6c8dfc7d to your computer and use it in GitHub Desktop.
Save anlai/6b7824f5bf26e352c5c4b07a6c8dfc7d to your computer and use it in GitHub Desktop.
ansible playbook for building sonarqube server ... still not quite working yet
---
- hosts: all
become: yes
tasks:
- name: directory
file:
path: /opt/sonarqube
state: directory
- name: download/install
unarchive:
src: https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.7.2.zip
dest: /opt
remote_src: yes
copy: no
owner: sonaradmin
- name: startup
template:
src: ./startup.j2
dest: /etc/init.d/sonar
mode: 755
- name: symlink to startup
file:
src: /opt/sonarqube-6.7.2/bin/linux-x86-64/sonar.sh
dest: /usr/bin/sonar
state: link
- name: enable service
service:
name: sonar
enabled: yes
state: restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment