pip
. If you have pip
installed it's as easy as: $ sudo pip install ansible
pip
via your system's package manager (you want the Python 2.7 version!).root
user.ansible
:ansible
directory, we're going to make an inventory file. This is a simple formatted file that contains a list of systems that we want to connect to and control using Ansible. It can contain single hosts, group hosts together, groups of groups, set variables on a host or group basis... there are lots of things you can do with the inventory, but that's outside the scope of this document's intended teachings.inventory
, for simplicity's sake: ~/ansible $ touch inventory
[chat_servers]
line? This denotes a group, simply called "chat_servers". Any hostnames/FQDNs/IP addresses under this will be members of the "chat_servers" group. If you want to add another server, just drop it in like so:root
user's password here in the inventory file. This is, of course, insecure, and is considered bad practice - so should only be temporary. Let's set the root
user's password for the chat.my.domain
host:ansible-galaxy
.roles
directory:requirements.yml
file that will describe to ansible-galaxy
how we want to fetch the role. So, create and open the file roles/requirements.yml
using your favorite editor. The contents of requirements.yml
will vary based on which version of Ansible you're running. Run ansible --version
to find out.requirements.yml
:requirements.yml
:ansible-galaxy
command: ~/ansible $ ansible-galaxy install -p roles/ -r roles/requirements.yml
This command says "Hey, I want to install any roles I have defined in requirements.yml
". Hopefully, after a couple of seconds, you should have the RocketChat.Server
role in your roles
directory:rocket_chat.yml
(the .yml
denotes a YAML document, which is what language you use to express most things in Ansible): ~/ansible $ touch rocket_chat.yml
rocket_chat.yml
playbook:ansible-playbook
command, like so: ~/ansible $ ansible-playbook -i inventory rocket_chat.yml
rocket_chat.yml
playbook with the inventory file inventory
.".https://chat.my.domain
and be greeted by a wonderful Rocket.Chat logo and login screen!