Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.62 KB

README.remote.rst

File metadata and controls

68 lines (44 loc) · 1.62 KB

Run Ansible from your local computer

The quickstart instructions tell you to log in via SSH to your remote server in order to run Ansible. However, it’s much better to run Ansible from your local computer.

Prepare Ansible

Install Ansible on your local computer and clone this repository.

$ git clone https://github.com/jamielinux/ansible-discourse
$ cd ansible-discourse

Configure hosts

The inventory file tells Ansible about your remote hosts and puts them into groups. Each section is a group of one or more servers. The deploy-local.sh script uses inventory/local.

Create inventory/remote with these contents. Replace 198.51.100.111 with the IP address of your remote server. You’ll need SSH access to a remote user with sudo permissions.

[postgres]
198.51.100.111

[redis]
198.51.100.111

[discourse]
198.51.100.111

Configure options

Get started with vars_example.yml:

$ cp vars_example.yml group_vars/all/main.yml

Edit the options in group_vars/all/main.yml.

Deploy

Replace USERNAME with the remote user on your server. Make sure your remote server has Python 2.x installed.

$ ansible-playbook -i inventory/remote \
    -s -K -u USERNAME master.yml