git clone https://github.com/AbdelatifAitBara/MediaWiki
IPs:
- Master : 192.168.10.10
- Database : 192.168.10.11
- MediaWiki: 192.168.10.12
Before starting connect to the "master machine" and copy the ssh key to the other nodes:
- ssh-copy-id [email protected]
- ssh-copy-id [email protected]
Add the bellow details to your inventory file: sudo nano /etc/ansible/hosts
[Database]
db ansible_host=192.168.10.11
[MediaWiki]
media_wiki ansible_host=192.168.10.12
On the "master" run : ansible-playbook install_media_wiki.yml
On "Database machine" run the following commands in order:
sudo mysql -u root
CREATE USER 'media_user'@'192.168.10.12' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON mediawiki.* TO 'media_user'@'192.168.10.12';
FLUSH PRIVILEGES;
exit
Install Mediawiki via : http://192.168.10.12/mediawiki
- Database host : 192.168.10.11
- Database name : mediawiki
- Database username : media_user
- Database password : password