pip. If you have
pipinstalled it's as easy as:
$ sudo pip install ansible
pipvia your system's package manager (you want the Python 2.7 version!).
ansibledirectory, 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:
rootuser'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
rootuser's password for the
requirements.ymlfile that will describe to
ansible-galaxyhow we want to fetch the role. So, create and open the file
roles/requirements.ymlusing your favorite editor. The contents of
requirements.ymlwill vary based on which version of Ansible you're running. Run
ansible --versionto find out.
~/ansible $ ansible-galaxy install -p roles/ -r roles/requirements.ymlThis 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.Serverrole in your
.ymldenotes a YAML document, which is what language you use to express most things in Ansible):
~/ansible $ touch rocket_chat.yml
ansible-playbookcommand, like so:
~/ansible $ ansible-playbook -i inventory rocket_chat.yml
rocket_chat.ymlplaybook with the inventory file
https://chat.my.domainand be greeted by a wonderful Rocket.Chat logo and login screen!