Introduction
Introduction Statistics Contact Development Disclaimer Help
vagrant config with ansible provision playbook - warvox - VoIP based wardialing…
Log
Files
Refs
README
---
commit f906e2822e33420c52e994b4e56cdaa2293780ec
parent a1f6730b831422fc51fb5af175d279f97452983c
Author: Jay Scott <[email protected]>
Date: Tue, 19 Jul 2016 14:28:24 +0100
vagrant config with ansible provision playbook
Diffstat:
M .gitignore | 4 ++++
A Vagrantfile | 14 ++++++++++++++
A hosts | 2 ++
A playbook.yml | 8 ++++++++
A roles/ansible-role-warvox/README.md | 33 +++++++++++++++++++++++++++++…
A roles/ansible-role-warvox/defaults… | 8 ++++++++
A roles/ansible-role-warvox/handlers… | 2 ++
A roles/ansible-role-warvox/meta/mai… | 14 ++++++++++++++
A roles/ansible-role-warvox/tasks/ma… | 50 +++++++++++++++++++++++++++…
A roles/ansible-role-warvox/tasks/se… | 16 ++++++++++++++++
A roles/ansible-role-warvox/tests/in… | 2 ++
A roles/ansible-role-warvox/tests/te… | 5 +++++
A roles/ansible-role-warvox/vars/mai… | 2 ++
13 files changed, 160 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
@@ -24,3 +24,7 @@ config/secrets.yml
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
+
+# vagrant and ansible files
+.vagrant
+playbook.retry
diff --git a/Vagrantfile b/Vagrantfile
@@ -0,0 +1,14 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ config.vm.synced_folder ".", "/home/warvox", type: "rsync"
+ config.vm.box = "debian/jessie64"
+ config.vm.network :private_network, ip: "192.168.60.4"
+
+ config.vm.provision "ansible" do |ansible|
+ ansible.playbook = "playbook.yml"
+ end
+end
diff --git a/hosts b/hosts
@@ -0,0 +1,2 @@
+[warvox-app]
+192.168.60.4
diff --git a/playbook.yml b/playbook.yml
@@ -0,0 +1,8 @@
+---
+- hosts: all
+ become: yes
+ roles:
+ - ansible-role-warvox
+ tasks:
+
+
diff --git a/roles/ansible-role-warvox/README.md b/roles/ansible-role-warvox/RE…
@@ -0,0 +1,33 @@
+Role Name
+=========
+
+Provision warvox from source, rapid7/warvox.
+
+Requirements
+------------
+
+No pre-requisites.
+
+Role Variables
+--------------
+
+TBC
+
+Dependencies
+------------
+
+No dependencies
+
+Example Playbook
+----------------
+
+
+License
+-------
+
+None
+
+Author Information
+------------------
+
+Beardyjay
diff --git a/roles/ansible-role-warvox/defaults/main.yml b/roles/ansible-role-w…
@@ -0,0 +1,8 @@
+---
+
+rvm:
+ url: https://get.rvm.io
+ temp_installer_path: /tmp/rvm-installer.sh
+ default_ruby_version: ruby-2.2.3
+ root: "~/.rvm"
+ init_script: "~/.rvm/scripts/rvm"
diff --git a/roles/ansible-role-warvox/handlers/main.yml b/roles/ansible-role-w…
@@ -0,0 +1,2 @@
+---
+# handlers file for .
diff --git a/roles/ansible-role-warvox/meta/main.yml b/roles/ansible-role-warvo…
@@ -0,0 +1,14 @@
+galaxy_info:
+ author: Jay Scott
+ description: Beardyjay
+ license: NONE
+ min_ansible_version: 1.3
+ galaxy_tags:
+ - warvox
+ - voip
+ platforms:
+ - name: Debian
+ versions:
+ - jessie
+dependencies: []
+
diff --git a/roles/ansible-role-warvox/tasks/main.yml b/roles/ansible-role-warv…
@@ -0,0 +1,50 @@
+---
+
+# Setup/install tasks.
+- include: setup-RedHat.yml
+ when: ansible_os_family == 'RedHat'
+
+- include: setup-Debian.yml
+ when: ansible_os_family == 'Debian'
+
+ # RVM Install
+- name: check for mpapis gpg key
+ shell: gpg --list-keys mpapis
+ become: false
+ register: mpapis_gpg_key_exists
+ ignore_errors: true
+
+- name: import GPG key
+ shell: "curl -sSL https://rvm.io/mpapis.asc | gpg --import -"
+ become: false
+ when: mpapis_gpg_key_exists is defined and mpapis_gpg_key_exists.rc is defin…
+
+- name: download RVM
+ get_url:
+ url: "{{rvm.url}}"
+ dest: "{{rvm.temp_installer_path}}"
+
+- name: set executable
+ file:
+ path: "{{rvm.temp_installer_path}}"
+ mode: 0755
+
+- name: installing RVM
+ become: false
+ command: "{{rvm.temp_installer_path}} --path {{rvm.root}} stable"
+
+- name: setting RVM autolibs
+ become: false
+ command: "{{rvm.root}}/bin/rvm autolibs 3"
+
+ # Ruby Install
+- name: installing Ruby
+ become: false
+ command: "{{rvm.root}}/bin/rvm install {{rvm.default_ruby_version}}"
+
+- name: setting default Ruby
+ shell: "source {{rvm.init_script}} && rvm use {{rvm.default_ruby_version}} -…
+ become: false
+ register: rvm_select_ruby_version_root
+ ignore_errors: True
+ changed_when: False
diff --git a/roles/ansible-role-warvox/tasks/setup-Debian.yml b/roles/ansible-r…
@@ -0,0 +1,16 @@
+
+- name: install warvox deps
+ apt: "name={{ item }} state=installed"
+ with_items:
+ - gnuplot
+ - lame
+ - build-essential
+ - libssl-dev
+ - libcurl4-openssl-dev
+ - postgresql
+ - postgresql-contrib
+ - postgresql-common
+ - git-core
+ - curl
+ - libpq-dev
+ - sox
diff --git a/roles/ansible-role-warvox/tests/inventory b/roles/ansible-role-war…
@@ -0,0 +1 @@
+localhost
+\ No newline at end of file
diff --git a/roles/ansible-role-warvox/tests/test.yml b/roles/ansible-role-warv…
@@ -0,0 +1,5 @@
+---
+- hosts: localhost
+ remote_user: root
+ roles:
+ - .
diff --git a/roles/ansible-role-warvox/vars/main.yml b/roles/ansible-role-warvo…
@@ -0,0 +1,2 @@
+---
+# vars file for .
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.