Last active
August 29, 2015 14:23
-
-
Save grimrose/e08e1b4261a904d01d6d to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
_script_dir=$(cd $(dirname $BASH_SOURCE); pwd) | |
_packer_path="$_script_dir/packer-templates/centos-7.1"; | |
cd $_packer_path; | |
rm -rf output-virtualbox-iso; | |
packer build --only=virtualbox-iso template.json; | |
echo "FINISHED"; |
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
--- | |
## install influxdb | |
- name: install | |
yum: name=https://s3.amazonaws.com/influxdb/influxdb-latest-1.x86_64.rpm state=present | |
- name: setup service | |
service: name=influxdb state=started enabled=yes | |
- name: check firewalld | |
command: systemctl is-active firewalld | |
register: firewalld_is_active | |
changed_when: False | |
ignore_errors: True | |
- name: open influxdb's port | |
firewalld: port={{ item.port }} permanent={{ item.permanent }} state=enabled | |
with_items: | |
- { port: "8083/tcp", permanent: True } # GUI | |
- { port: "8083/tcp", permanent: False } | |
- { port: "8086/tcp", permanent: True } # API | |
- { port: "8086/tcp", permanent: False } | |
when: firewalld_is_active.stdout == "active" | |
- name: restart firewalld | |
service: name=firewalld state=restarted |
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| | |
config.vm.box = "centos7" | |
config.vm.box_url = "file://./packer-templates/centos-7.1/centos-7-1-x64-virtualbox.box" | |
config.vm.box_check_update = false | |
config.ssh.forward_agent = true | |
config.vm.network "private_network", ip: "192.168.33.24" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false | |
vb.customize ["modifyvm", :id, "--memory", "1024"] | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | |
end | |
config.vm.provision "ansible" do |ansible| | |
ansible.playbook = "site.yml" | |
ansible.verbose = "vv" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment