From 189875a7ee350646f4e616b98b769188649c19ba Mon Sep 17 00:00:00 2001 From: asift91 Date: Thu, 18 Jun 2020 16:16:12 +0530 Subject: [PATCH] updated lbdns parameter with domain_name --- scripts/ansiblePlaybook/moodle/group_vars/all | 25 +++++++++---------- .../moodle/roles/moodle/tasks/main.yml | 2 +- scripts/moodle_script.sh | 1 - 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/scripts/ansiblePlaybook/moodle/group_vars/all b/scripts/ansiblePlaybook/moodle/group_vars/all index a2ee3ba..2e616d5 100644 --- a/scripts/ansiblePlaybook/moodle/group_vars/all +++ b/scripts/ansiblePlaybook/moodle/group_vars/all @@ -1,30 +1,29 @@ +# Below parameters will be updated in run time. vm_ip: IP vm_password: password user_name: azusername hostname: moodle domain_name: domain -lbdns: dns - -webroot: /var/www/html -moodle_download_url: https://download.moodle.org/stable38/moodle - -moodle_data_direc_path: /azlamp/moodledata -moodle_download_path: /tmp/moodle -version: 3.8.3 -default_permission: www-data -#database details will be updated in run time - dbservername: localhost dbusername: dbname dbpassword: dbpass moodle_db_name: moodle moodle_login_id: admin -moodle_pass: moodle_admin_mail: test@gmail.com moodle_full_name: Moodle LMS moodle_short_name: Moodle moodle_db_user: moodle + +# Passwords are auto-genrated. +moodle_pass: moodle_db_pass: +version: 3.8.3 +moodle_download_url: https://download.moodle.org/stable38/moodle replication_url: https://raw.githubusercontent.com/Azure/LAMP/master/scripts/moodle_replication.sh -repli_script_name: moodle_replication.sh \ No newline at end of file +repli_script_name: moodle_replication.sh + +webroot: /var/www/html +moodle_data_direc_path: /azlamp/moodledata +moodle_download_path: /tmp/moodle +default_permission: www-data diff --git a/scripts/ansiblePlaybook/moodle/roles/moodle/tasks/main.yml b/scripts/ansiblePlaybook/moodle/roles/moodle/tasks/main.yml index bdf27ea..2ba8ddd 100644 --- a/scripts/ansiblePlaybook/moodle/roles/moodle/tasks/main.yml +++ b/scripts/ansiblePlaybook/moodle/roles/moodle/tasks/main.yml @@ -47,7 +47,7 @@ - debug: var=outputpremission.stdout_lines - name: install moodle - command: /usr/bin/php /tmp/moodle/admin/cli/install.php --chmod=770 --lang=en_us --wwwroot=https://{{lbdns}} --dataroot={{moodle_data_direc_path}} --dbhost={{dbservername}} --dbname={{moodle_db_name}} --dbuser={{dbusername}} --dbpass={{dbpassword}} --dbtype=mysqli --fullname='{{moodle_full_name}}' --shortname='{{moodle_short_name}}' --adminuser={{moodle_login_id}} --adminpass={{moodle_pass}} --adminemail={{moodle_admin_mail}} --non-interactive=true --agree-license=true --allow-unstable=true + command: /usr/bin/php /tmp/moodle/admin/cli/install.php --chmod=770 --lang=en_us --wwwroot=https://{{domain_name}} --dataroot={{moodle_data_direc_path}} --dbhost={{dbservername}} --dbname={{moodle_db_name}} --dbuser={{dbusername}} --dbpass={{dbpassword}} --dbtype=mysqli --fullname='{{moodle_full_name}}' --shortname='{{moodle_short_name}}' --adminuser={{moodle_login_id}} --adminpass={{moodle_pass}} --adminemail={{moodle_admin_mail}} --non-interactive=true --agree-license=true --allow-unstable=true become: true - diff --git a/scripts/moodle_script.sh b/scripts/moodle_script.sh index 51e3eb7..5adb676 100644 --- a/scripts/moodle_script.sh +++ b/scripts/moodle_script.sh @@ -34,7 +34,6 @@ run_moodle_playbook() { sudo sed -i "s~dbusername: dbname~dbusername: ${5}~" ${vars_path} sudo sed -i "s~dbpassword: dbpass~dbpassword: ${6}~" ${vars_path} sudo sed -i "s~domain_name: domain~domain_name: ${7}~" ${vars_path} - sudo sed -i "s~lbdns: dns~lbdns: ${7}~" ${vars_path} sudo sed -i "s~moodle_db_name: moodle~moodle_db_name: ${8}~" ${vars_path} sudo sed -i "s~moodle_db_pass: ~moodle_db_pass: ${moodle_db_pass}~" ${vars_path} sudo sed -i "s~moodle_pass: ~moodle_pass: ${moodle_pass}~" ${vars_path}