Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert pull request #7

Merged
merged 3 commits into from
Dec 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/settingsLocal.py.dist
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ BROKER_URL = ''

NGNIX_SSL_PEM = ''
NGNIX_SSL_KEY = ''

MYSQL_VM = ''
39 changes: 0 additions & 39 deletions fabrun/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ def run_task(id):
else:
needUser = False

needKomUser = '[$AG:NeedKomUser]' in description
needSudo = '[$AG:NeedSudo]' in description
needMysqlPassword = '[$AG:NeedMysqlPassword]' in description
needSrvIp = '[$AG:NeedSrvIp]' in description

if not task.server.ssh_connection_string_from_gestion:
task.stderr = 'I don\'t know how to connect to the server'
task.end_date = timezone.now()
Expand All @@ -61,28 +56,6 @@ def run_task(id):
task.save()
return

if needKomUser or needSudo or needMysqlPassword:
if not task.args:
task.stderr = 'I needed special arguements bot task.args wasen\'t set !.'
task.end_date = timezone.now()
task.save()
return
try:
import json
arg_data = json.loads(task.args)
except:
task.stderr = 'I needed special arguements bot task.args wasen\'t json !.'
task.end_date = timezone.now()
task.save()
return

for (arg, name) in ((needKomUser, 'user'), (needSudo, 'sudo'), (needMysqlPassword, 'password')):
if arg and name not in arg_data:
task.stderr = 'I needed ' + name + ' but it wasent in args.'
task.end_date = timezone.now()
task.save()
return

thing_to_set = ''

if needGestion:
Expand All @@ -97,18 +70,6 @@ def run_task(id):
if needUser:
thing_to_set += ',fab_user=' + task.args

if needKomUser:
thing_to_set += ',fab_komuser=' + arg_data['user']

if needSudo:
thing_to_set += ',fab_addsudo=' + arg_data['sudo']

if needMysqlPassword:
thing_to_set += ',fab_mysqlpassword=' + arg_data['password']

if needSrvIp:
thing_to_set += ',fab_srvip=' + task.server.internal_ip

thing_to_set = thing_to_set[1:]

out, err = subprocess.Popen(['fab', '--abort-on-prompts', '-p', task.server.random_proxmox_password(), '-H', task.server.get_host_for_fabric(), '--set=' + thing_to_set, task.command], stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=settings.FABRIC_FOLDER).communicate()
Expand Down
2 changes: 1 addition & 1 deletion fabrun/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from fabrun.models import Task
from fabrun.tasks import run_task

KEYWORDS = ('[$AG:NeedGestion]', '[$AG:NeedKM]', '[$AG:NeedUser]', '[$AG:NeedKomUser]', '[$AG:NeedSudo]', '[$AG:NeedMysqlPassword]', '[$AG:NeedSrvIp]')
KEYWORDS = ('[$AG:NeedGestion]', '[$AG:NeedKM]', '[$AG:NeedUser]')


@login_required
Expand Down
16 changes: 5 additions & 11 deletions hostnameforwarding/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def get_conf(request, pk):
script += """server {
listen """ + str(host.port_from) + """;
server_name """ + host.domain + """;
client_max_body_size 50M;
client_max_body_size 101M;

"""

Expand All @@ -170,16 +170,10 @@ def get_conf(request, pk):
if host.port_from == 443 and settings.NGNIX_SSL_PEM != '' and settings.NGNIX_SSL_KEY != '':
script += """ ssl on;
"""
if host.domain != 'truffe.polylan.ch':
script += """ ssl_certificate """ + settings.NGNIX_SSL_PEM + """;
"""
script += """ ssl_certificate_key """ + settings.NGNIX_SSL_KEY + """;
"""
else:
script += """ ssl_certificate """ + settings.NGNIX_SSL_PEM + """-polylan;
"""
script += """ ssl_certificate_key """ + settings.NGNIX_SSL_KEY + """-polylan;
"""
script += """ ssl_certificate """ + settings.NGNIX_SSL_PEM + """;
"""
script += """ ssl_certificate_key """ + settings.NGNIX_SSL_KEY + """;
"""


if host.force_https:
Expand Down
241 changes: 0 additions & 241 deletions wizard/wizards/setup_agepvm_for_com.py

This file was deleted.