Skip to content

Instantly share code, notes, and snippets.

@anlai
Created April 3, 2018 05:30
Show Gist options
  • Save anlai/657240ac88bed779508a369f6cdd4684 to your computer and use it in GitHub Desktop.
Save anlai/657240ac88bed779508a369f6cdd4684 to your computer and use it in GitHub Desktop.
ansible playbook for building sonarqube server ... still not quite working yet https://devopscube.com/setup-and-configure-sonarqube-on-linux/
---
- 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
@anlai
Copy link
Author

anlai commented Apr 3, 2018

still need to work on creating user and setting the service to run as that user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment