Created
June 5, 2020 00:29
-
-
Save nicolas17/aa3cb704ae0c1b699a257d3d68f10b3f to your computer and use it in GitHub Desktop.
Vagrantfile for KDE monitoring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
gather_facts: no | |
tasks: | |
- raw: apt-get install -y python | |
- lineinfile: | |
path: /etc/hosts | |
line: "127.0.0.1 {{inventory_hostname}}" | |
- hostname: | |
name: "{{inventory_hostname}}" | |
- apt: | |
name: avahi-daemon | |
state: present | |
- import_playbook: ../monitoring-server.yml | |
- import_playbook: ../monitoring-agent.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
if Vagrant.has_plugin?("vagrant-cachier") | |
config.cache.scope = :machine | |
end | |
config.vm.define "random" do |machine| | |
machine.vm.box = "ubuntu/bionic64" | |
end | |
config.vm.define "overwatch" do |machine| | |
machine.vm.box = "ubuntu/xenial64" | |
# last machine sets up the provisioner | |
config.vm.provision :ansible do |ansible| | |
ansible.limit = "all" | |
ansible.compatibility_mode = "2.0" | |
ansible.become = true | |
ansible.verbose = true | |
ansible.config_file = '../ansible.cfg' | |
ansible.playbook = "playbook.yml" | |
ansible.host_vars = { | |
} | |
ansible.groups = { | |
"monitoring-server" => ["overwatch"], | |
"all:vars" => { | |
'enable_ssl': false, | |
'grafana_use_ldap': false, | |
'grafana_hostname': 'overwatch.local', | |
'influxdb_hostname': 'overwatch.local', | |
'influxdb_admin_password': 'ioashdfsopdfns', | |
'influxdb_user_password': 'ergjetioehrots', | |
'grafana_admin_password': 'cvoijboweijrio' | |
} | |
} | |
end | |
end | |
# Create a public network, which generally matched to bridged network. | |
# Bridged networks make the machine appear as another physical device on | |
# your network. | |
config.vm.network "public_network" | |
# Provider-specific configuration so you can fine-tune various | |
# backing providers for Vagrant. These expose provider-specific options. | |
# Example for VirtualBox: | |
# | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "512" | |
vb.linked_clone = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment