This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Create the sonar user for running the SonarQube services | |
user: | |
name: sonar | |
comment: System user for running SonarQube | |
- name: Download SonarQube | |
get_url: | |
url: "https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-{{ sonar_version }}.zip" | |
dest: "/srv/sonarqube-{{ sonar_version }}.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - name: Create postgres user for SonarQube | |
# become: yes | |
# become_user: postgres | |
# postgresql_user: | |
# name: "{{ sonar_db_user }}" | |
# password: 'str[\"md5\"] + md5[ {{ sonar_db_pass }} + {{ sonar_db_user }} ]' | |
# encrypted: yes | |
# | |
# - name: Create the sonar database | |
# postgresql_db: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: sonar | |
become: true | |
roles: | |
- jdauphant.ssl-certs | |
- role: jdauphant.nginx | |
nginx_configs: | |
ssl: | |
- ssl_certificate_key {{ssl_certs_privkey_path}} | |
- ssl_certificate {{ssl_certs_cert_path}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local DEV with Vagrant test target boxes | |
[sonar] | |
sonar01 | |
[control] | |
control | |
[all:vars] | |
ansible_python_interpreter=/usr/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
createuser sonar; | |
echo "ALTER USER sonar WITH ENCRYPTED password '$1'; CREATE DATABASE sonar OWNER sonar; \q" | psql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /vagrant/control.pub >> /home/vagrant/.ssh/authorized_keys | |
chown -R vagrant:vagrant /home/vagrant/.ssh/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -f "/home/vagrant/.ssh/id_rsa" ]; then | |
ssh-keygen -t rsa -N "" -f /home/vagrant/.ssh/id_rsa | |
fi | |
cp /home/vagrant/.ssh/id_rsa.pub /vagrant/control.pub | |
cat << 'SSHEOF' > /home/vagrant/.ssh/config | |
Host * | |
StrictHostKeyChecking no | |
UserKnownHostsFile=/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# README | |
# | |
# Getting Started: | |
# 1. vagrant plugin install vagrant-hostmanager | |
# 2. vagrant up | |
# 3. vagrant ssh | |
# |