• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

SIMPLE ALL IN ONE: From nothing to a fully working dedicated server on Ubuntu

Hello there, sorry for reviving old topic but i've tried to use your script and sadly ive met a wall i cannot jump over...

Code:
TASK [Set MySQL otsmanager password (localhost)] *******************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}

PLAY RECAP *********************************************************************
localhost                  : ok=21   changed=3    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0

Freshly installed Ubuntu 22.04.2


EDIT

Nvm, found it, just had to create ~/.my.cnf file because it couldnt log in without it.

EDIT V2

Welp, i did fix the last issue, but there is another... for some reason when i try to get to the website, which (i assume) should be running i get "The page or file you requested was not found. If this is your server, make sure you placed it under /home/otsmanager/www/public_html directory."

No matter what i change, i cannot get it to run, phpMyAdmin works just fine, but znoteAAC is just dead - tried with info.php trick but i didnt get anything else than "The page or file(...)".

Any ideas?
 
Last edited:
Hello there, sorry for reviving old topic but i've tried to use your script and sadly ive met a wall i cannot jump over...

Code:
TASK [Set MySQL otsmanager password (localhost)] *******************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}

PLAY RECAP *********************************************************************
localhost                  : ok=21   changed=3    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0

Freshly installed Ubuntu 22.04.2


EDIT

Nvm, found it, just had to create ~/.my.cnf file because it couldnt log in without it.

EDIT V2

Welp, i did fix the last issue, but there is another... for some reason when i try to get to the website, which (i assume) should be running i get "The page or file you requested was not found. If this is your server, make sure you placed it under /home/otsmanager/www/public_html directory."

No matter what i change, i cannot get it to run, phpMyAdmin works just fine, but znoteAAC is just dead - tried with info.php trick but i didnt get anything else than "The page or file(...)".

Any ideas?

The readme in repo says that is supports only Ubuntu 20.04, so you should use this version.

@topic @everyone
For anyone wondering how to get myaac working on this setup:

Do everything like stated in the first post, just replace the last command (ansible-pull)

with this:
Bash:
ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning --purge -t systemd,general,mysql,php-fpm,nginx,pma,tfs,myaac

After this, when you visit your IP, you will see screen like this:
1689961713088.png


You will need to open file install/ip.txt and add your IP in the last line there (123.123.123.123) - replace it with what you see.
The ip.txt is located in /home/otsmanager/www/public_html/install/ip.txt

After that you will be able to follow the installation!

BTW: In step 4 - configuration, when asked for server path, enter this:

/home/otsmanager/forgottenserver

Good luck! ;)
 
Last edited:
Hey guys i have a problem. The Installation script is not working for me. I used it years ago but now it don't works. I tried it on Ubuntu 20.04 there it doesn't even start on Ubuntu 22.04 i copied you the root console:

Lua:
Starting Ansible Pull at 2023-08-03 18:09:49
/usr/bin/ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning --purge -t systemd,general,mysql,php-fpm,nginx,pma,tfs,myaac
[WARNING]: Could not match supplied host pattern, ignoring: srv01
localhost | CHANGED => {
    "after": "7546f0374132ac71afcd00611315c8406b9810e9",
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "before": null,
    "changed": true
}
[WARNING]: Could not match supplied host pattern, ignoring: srv01


PLAY [all] *********************************************************************


TASK [Gathering Facts] *********************************************************
ok: [localhost]


TASK [Fail if not running on Ubuntu] *******************************************
skipping: [localhost]


TASK [Fail if Ubuntu older than 20.04] *****************************************
skipping: [localhost]


TASK [Check available PHP package name/version] ********************************
ok: [localhost]


TASK [Register available PHP package name/version] *****************************
ok: [localhost]


TASK [Create /var/log/journal] *************************************************
ok: [localhost]


TASK [Create /etc/systemd/journald.conf.d] *************************************
changed: [localhost]


TASK [Install /etc/systemd/journald.conf.d/journald.conf] **********************
changed: [localhost]


TASK [Remove LXC, snapd in case it's installed (Ubuntu Cloud has it)] **********
changed: [localhost]


TASK [Upgrade whole system] ****************************************************
changed: [localhost]


TASK [Install admin essentials] ************************************************
changed: [localhost]


TASK [Create otsmanager system user] *******************************************
changed: [localhost]


TASK [Select editor for otsmanager] ********************************************
changed: [localhost]


TASK [Install .otsmanager shell configuration] *********************************
changed: [localhost]


TASK [Activate .otsmanager shell configuration file] ***************************
changed: [localhost]


TASK [Delete Ubuntu Cloud ad] **************************************************
ok: [localhost]


TASK [Install welcome message] *************************************************
changed: [localhost]


TASK [Install MySQL Server and backup packages] ********************************
changed: [localhost]


TASK [Change MySQL charset to prevent MySQL error 1709] ************************
changed: [localhost]


TASK [Start Mysql Service] *****************************************************
changed: [localhost]


TASK [Parse existing .my.cnf] **************************************************
changed: [localhost]


TASK [Generate random MySQL otsmanager password] *******************************
changed: [localhost]


TASK [set_fact] ****************************************************************
ok: [localhost]


TASK [Set MySQL otsmanager password (localhost)] *******************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}


RUNNING HANDLER [restart systemd-journald] *************************************


RUNNING HANDLER [restart mysql] ************************************************


PLAY RECAP *********************************************************************
localhost                  : ok=21   changed=15   unreachable=0    failed=1    skipped=2    rescued=0    ignored=0


root@srv01:~#

What i can do?
 
Hey guys i have a problem. The Installation script is not working for me. I used it years ago but now it don't works. I tried it on Ubuntu 20.04 there it doesn't even start on Ubuntu 22.04 i copied you the root console:
What happens when you type mysql in the console? Does it connect?
What happened with Ubuntu 20.04? Why didn't it start?
 
Hello,
today I was trying to install OTS on fresh Ubuntu Server 20.4.6 LTS. Some time ago I was using same way to provision game server and It worked fine. However today I'm getting:

Lua:
root@tibiaots-srv2:~# ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning -t default
Starting Ansible Pull at 2023-10-20 19:55:40
/usr/bin/ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning -t default
[WARNING]: Could not match supplied host pattern, ignoring: tibiaots-srv2
localhost | SUCCESS => {
    "after": "24324ff2b415138e3d74ebabee54e23802c62377",
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "before": "24324ff2b415138e3d74ebabee54e23802c62377",
    "changed": false,
    "remote_url_changed": false
}
[WARNING]: Could not match supplied host pattern, ignoring: tibiaots-srv2
ERROR! couldn't resolve module/action 'community.general.composer'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/srv/otshosting-provisioning/tasks/phpmyadmin-sso.yml': line 16, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Install dependencies
  ^ here
root@tibiaots-srv2:~#
root@tibiaots-srv2:~#
root@tibiaots-srv2:~#


I was checking mentioned file and I don't see anything unusual with syntax...

Code:
---
- name: Give www-data access to MySQL
  mysql_user:
    name: www-data
    host: localhost
    priv: "*.*:ALL,GRANT"
    plugin: unix_socket
    plugin_hash_string: www-data
    check_implicit_admin: yes

- name: Download latest PMA SSO
  git:
    repo: https://gist.github.com/857dfc08aacb208bbade901ba7b9f9ba.git
    dest: /usr/local/share/pmasso

- name: Install dependencies
  community.general.composer:
    command: install
    working_dir: /usr/local/share/pmasso
  environment:
    COMPOSER_HOME: /root/.config/composer

- name: Activate PMA SSO
  file:
    src: /usr/local/share/pmasso/sso.php
    dest: /etc/phpmyadmin/conf.d/sso.php
    owner: root
    group: root
    state: link

May I ask for helping hand, please? :)
 
What happens when you type mysql in the console? Does it connect?
What happened with Ubuntu 20.04? Why didn't it start?

I have the same issue, I've got a fully fresh Ubuntu 22.04, and when following the first steps everything works perfectly but as soon as I do

Lua:
ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning -t default


I get this:

Code:
TASK [Set MySQL otsmanager password (localhost)] *******************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}

PLAY RECAP *********************************************************************
localhost                  : ok=21   changed=4    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0

When writing mysql on the console, this is what I get:


Code:
ubuntu@vps-ad999dd7:~$ mysql
ERROR 1698 (28000): Access denied for user 'ubuntu'@'localhost'

But works if I do sudo mysql
 
The entire ansible-pull command must be run as root, it makes sense you wouldn't be able to just use mysql as a non-root user.
 
The entire ansible-pull command must be run as root, it makes sense you wouldn't be able to just use mysql as a non-root user.

I did use it as root, yet I get the same issue. I tried once again to make sure I used root, here is the result


Lua:
ubuntu@vps-ad999dd7:~$ sudo ansible-pull -i localhost, -U https://github.com/Dev                                                                                                                                                             elopersPL/otshosting-provisioning.git -d /srv/otshosting-provisioning -t default
Starting Ansible Pull at 2024-01-20 12:41:05
/usr/bin/ansible-pull -i localhost, -U https://github.com/DevelopersPL/otshostin                                                                                                                                                             g-provisioning.git -d /srv/otshosting-provisioning -t default
[WARNING]: Could not match supplied host pattern, ignoring: vps-
ad999dd7.vps.ovh.net
[WARNING]: Could not match supplied host pattern, ignoring: vps-ad999dd7
localhost | CHANGED => {
    "after": "24324ff2b415138e3d74ebabee54e23802c62377",
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "before": null,
    "changed": true
}
[WARNING]: Could not match supplied host pattern, ignoring: vps-
ad999dd7.vps.ovh.net
[WARNING]: Could not match supplied host pattern, ignoring: vps-ad999dd7

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Fail if not running on Ubuntu] *******************************************
skipping: [localhost]

TASK [Fail if Ubuntu older than 20.04] *****************************************
skipping: [localhost]

TASK [Check available PHP package name/version] ********************************
ok: [localhost]

TASK [Register available PHP package name/version] *****************************
ok: [localhost]

TASK [Create /var/log/journal] *************************************************
ok: [localhost]

TASK [Create /etc/systemd/journald.conf.d] *************************************
changed: [localhost]

TASK [Install /etc/systemd/journald.conf.d/journald.conf] **********************
changed: [localhost]

TASK [Remove LXC, snapd in case it's installed (Ubuntu Cloud has it)] **********
changed: [localhost]

TASK [Upgrade whole system] ****************************************************
ok: [localhost]

TASK [Install admin essentials] ************************************************
changed: [localhost]

TASK [Create otsmanager system user] *******************************************
changed: [localhost]

TASK [Select editor for otsmanager] ********************************************
changed: [localhost]

TASK [Install .otsmanager shell configuration] *********************************
changed: [localhost]

TASK [Activate .otsmanager shell configuration file] ***************************
changed: [localhost]

TASK [Delete Ubuntu Cloud ad] **************************************************
ok: [localhost]

TASK [Install welcome message] *************************************************
changed: [localhost]

TASK [Install MySQL Server and backup packages] ********************************
changed: [localhost]

TASK [Change MySQL charset to prevent MySQL error 1709] ************************
changed: [localhost]

TASK [Start Mysql Service] *****************************************************
changed: [localhost]

TASK [Parse existing .my.cnf] **************************************************
changed: [localhost]

TASK [Generate random MySQL otsmanager password] *******************************
changed: [localhost]

TASK [set_fact] ****************************************************************
ok: [localhost]

TASK [Set MySQL otsmanager password (localhost)] *******************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}

RUNNING HANDLER [restart systemd-journald] *************************************

RUNNING HANDLER [restart mysql] ************************************************

PLAY RECAP *********************************************************************
localhost                  : ok=21   changed=14   unreachable=0    failed=1    skipped=2    rescued=0    ignored=0

ubuntu@vps-ad999dd7:~$
 
Back
Top