Installs and configures Bitping on a Linux instance. https://www.bitping.com
It has being tested in:
- Ubuntu 20.04
- Ubuntu 18.04
- Ubuntu 16.04
- Debian 10
- Debian 9
- Debian 8
- Centos 7
- Amazon Linux 2 AMI (HVM)
Available variables are listed below, along with default values (see defaults/main.yml):
If any of the 5 next variables is empty, the role makes a call to the login API to fill these variables properly.
In order for the call to the Bitping login API to be successful, bitping_credentials_email
and bitping_credentials_password
must both be set!
No matter how many hosts you run this role against, the call to the Login API will only happen once.
If all of them are set, then the credentials.json
(credentials.json template) file will be generated from the set values without making a request to the Bitping login API.
bitping_credentials_email: "[email protected]"
bitping_credentials_password: "cHAngem3!123"
bitping_credentials_id: ""
bitping_credentials_name: ""
bitping_credentials_token: ""
These variables define the Linux user and the group that is going to be used to execute the Bitping service.
bitping_user: "bitping"
bitping_group: "bitping"
bitping_user_home: "/home/bitping"
The binary is going to be downloaded and unzipped at {{ bitping_directory }}
and the credentials.json
is going to be
generated under the home folder of the linux user.
The bitping_systemd_file_path
variable defines the place where the systemd configuration (template) for the Bitping service is going to live.
bitping_directory: "/opt/bitping"
bitping_credentials_file_path: "{{ bitping_user_home }}/.bitping/credentials.json"
bitping_systemd_file_path: "/etc/systemd/system/bitping.service"
These URLs are used to download Bitping and fetch the JWT token by logging the user to the Login API URL. It is highly unlikely they are going to change in the near future. However, I decided against hardcoding them.
bitping_download_url: "https://downloads.bitping.com/node/linux"
bitping_api_url: "https://api.bitping.com"
bitping_login_url: "{{ bitping_api_url }}/users/login"
None.
- hosts: ubuntu
vars:
bitping_credentials_email: "your_bitping_email"
bitping_credentials_password: "your_bitping_password"
roles:
- role: karvounis.bitping
Role is using molecule to perform testing https://molecule.readthedocs.io/en/latest/
MOLECULE_BITPING_EMAIL=email MOLECULE_BITPING_PASSWORD=password MOLECULE_DISTRO=ubuntu1804 molecule test
There are three environmental variables that you need to specify:
- MOLECULE_BITPING_EMAIL: a valid Bitping email
- MOLECULE_BITPING_PASSWORD: a valid Bitping password
- MOLECULE_DISTRO: Distribution to run the tests against. Valid values:
- ubuntu1804
- ubuntu1604
- ubuntu1404
- centos7
- centos6
- debian9
- debian8
- fedora29
- fedora27
MIT
Role was created in 2020 by Evangelos Karvounis.
If you think this role was useful, please send me a tip at [email protected]
.