-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
keltik85
committed
Feb 7, 2017
1 parent
a0cb225
commit abac287
Showing
7 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
falcon.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.retry |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
echo "Hello World!"; | ||
?> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
- hosts: localhost | ||
connection: local | ||
tasks: | ||
- ping: | ||
- apt: name=apache2 state=latest | ||
register: installed_apache2 | ||
- apt: name=apache2-doc state=latest | ||
register: installed_apache2Doc | ||
- apt: name=libapache2-mod-php state=present | ||
register: installed_php | ||
- copy: src=files/index.php dest=/var/www/html/index.php mode=0777 | ||
- service: name=apache2 state=restarted enabled=yes | ||
when: installed_apache2.changed == True or installed_apache2Doc.changed == True or installed_php.changed == True | ||
- shell: curl localhost/index.php | ||
- apt: deb=https://atom.io/download/deb | ||
- apt: name="{{item}}" state=latest | ||
with_items: | ||
- virtualbox | ||
- virtualbox-qt | ||
- virtualbox-dkms | ||
- apt: deb=http://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb | ||
- apt: name=mtpaint state=latest | ||
- tomcat: | ||
tags: testcustommodule | ||
- apt: deb=https://download.teamviewer.com/download/teamviewer_i386.deb | ||
tags: teamviewer | ||
- apt: name=php-mysqli state=latest | ||
tags: mysql | ||
|
||
# Create a ext2 filesystem on /dev/sdb1. | ||
# - filesystem: | ||
# fstype: ext2 | ||
# dev: /dev/sdb1 | ||
|
||
#download jdk | ||
#unzip it | ||
#set JAVA_HOME | ||
|
||
#download eclipse neon | ||
#unzip it | ||
#make shortcut to menu |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/python | ||
from ansible.module_utils.basic import * | ||
from subprocess import check_output | ||
|
||
|
||
def main(): | ||
module = AnsibleModule(argument_spec={}) | ||
|
||
cmd = "ps -ef | grep tomcat" | ||
ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | ||
x = ps.communicate()[0] | ||
|
||
module.exit_json(changed=False, msg=x) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
- hosts: localhost | ||
connection: local | ||
tasks: | ||
### based on http://dev.mamikon.net/installing-sonarqube-on-ubuntu/ | ||
- apt: pkg=python-pip state=present | ||
- apt: name=python-setuptools state=latest | ||
- apt: name=python-dev state=present | ||
- apt: name=libmysqlclient-dev state=latest | ||
- pip: name=MySQL-python | ||
- mysql_db: | ||
name: sonar | ||
state: present | ||
login_host: localhost | ||
login_port: 3306 | ||
login_user: root | ||
login_password: root | ||
encoding: utf8 | ||
collation: utf8_general_ci | ||
|
||
# check if user exists | ||
- shell: mysql -u root -e 'select user from mysql.user where User = "sonar";' | ||
environment: | ||
MYSQL_PWD: root | ||
register: result | ||
|
||
# create the user, the stupid "mysql_user" module does not suport "when" and "register" | ||
- mysql_user: | ||
name: sonar | ||
password: sonar | ||
state: present | ||
login_host: localhost | ||
login_port: 3306 | ||
login_user: root | ||
login_password: root | ||
|
||
# only do it if user did not exists before | ||
- shell: mysql -u root -proot -e 'GRANT ALL ON sonar.* TO "sonar"@"%" IDENTIFIED BY "sonar";' | ||
environment: | ||
MYSQL_PWD: root | ||
when: "'\nsonar' not in '{{result.stdout}}'" | ||
|
||
# only do it if user did not exists before | ||
- shell: mysql -u root -e 'GRANT ALL ON sonar.* TO "sonar"@"localhost" IDENTIFIED BY "sonar";' | ||
environment: | ||
MYSQL_PWD: root | ||
when: "'\nsonar' not in '{{result.stdout}}'" | ||
|
||
# only do it if user did not exists before | ||
- shell: mysql -u root -e 'FLUSH PRIVILEGES;' | ||
environment: | ||
MYSQL_PWD: root | ||
when: "'\nsonar' not in '{{result.stdout}}'" | ||
|
||
- get_url: | ||
url: "https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.4.zip" | ||
dest: /mnt/hdd2/sonarqube-5.6.4.zip | ||
mode: 0777 | ||
|
||
- unarchive: | ||
src: /mnt/hdd2/sonarqube-5.6.4.zip | ||
dest: /mnt/hdd2 | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonarqube-5.6.4/conf/sonar.properties | ||
line: 'sonar.jdbc.username=sonar' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonarqube-5.6.4/conf/sonar.properties | ||
line: 'sonar.jdbc.password=sonar' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonarqube-5.6.4/conf/sonar.properties | ||
line: 'sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonarqube-5.6.4/conf/sonar.properties | ||
line: 'sonar.web.host=127.0.0.1' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonarqube-5.6.4/conf/sonar.properties | ||
line: 'sonar.web.context=/sonar' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonarqube-5.6.4/conf/sonar.properties | ||
line: 'sonar.web.port=9000' | ||
|
||
- get_url: | ||
url: "https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.8.zip" | ||
dest: /mnt/hdd2/sonar-scanner-2.8.zip | ||
mode: 0777 | ||
|
||
- unarchive: | ||
src: /mnt/hdd2/sonar-scanner-2.8.zip | ||
dest: /mnt/hdd2 | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonar-scanner-2.8/conf/sonar-scanner.properties | ||
line: 'sonar.host.url=http://localhost:9000/sonar' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonar-scanner-2.8/conf/sonar-scanner.properties | ||
line: 'sonar.sourceEncoding=UTF-8' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonar-scanner-2.8/conf/sonar-scanner.properties | ||
line: 'sonar.jdbc.username=sonar' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonar-scanner-2.8/conf/sonar-scanner.properties | ||
line: 'sonar.jdbc.password=sonar' | ||
|
||
- lineinfile: | ||
dest: /mnt/hdd2/sonar-scanner-2.8/conf/sonar-scanner.properties | ||
line: 'sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8' | ||
|
||
####start the sonar server by: "sudo /mnt/hdd2/sonarqube-5.6.4/bin/linux-x86-64/sonar.sh start" | ||
####stop : "sudo /mnt/hdd2/sonarqube-5.6.4/bin/linux-x86-64/sonar.sh stop" | ||
####check sonar-scanenr install: "/mnt/hdd2/sonar-scanner-2.8/bin/sonar-scanner -v" | ||
#mysql -u root -proot -e 'show databases;' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# examine disk space |