Giter Club home page Giter Club logo

snipeit-ansible's Introduction

Snipe-IT Installation with Ansible

This repository contains Ansible Role for deploying Snipe-IT on Debian based systems.

  • Quick Installation can be performed on production/development server with attached script.
  • Sample playbook is available for standalone installations.
  • Vagrant file is attached for quickly testing Snipe-IT on VM.

Quick Installation

Requirements:

Ubuntu 12.04 and up. ( Testend on Ubuntu 14.04 )

Installation:

Connect to target Ubuntu machine and run:

wget --no-check-certificate https://raw.github.com/GR360RY/snipeit-ansible/master/scripts/snipeit.sh -O - | sh

Following the installation completion, open browser and connect to ubuntu machine using it's FQDN or IP Address.

Login Credentials

User: [email protected]
Password: bar

Installation will be performed using the default configuration values.

Default Configuration Values:

Variable Name Default Value
snipeit_source /opt/snipe-it
snipeit_version master
snipeit_dbuser snipeit
snipeit_dbuser_password secret
snipeit_dbname snipeit
smtp_host smtp.example.com
smtp_port 25
admin_first_name Admin
admin_last_name Admin
admin_email [email protected]
admin_password bar
disable_default_apache_site True
run_mysql_on_all_interfaces False

Customising Installation

This Snipe-IT installation playbook can be executed directly on the target machine or from remote host. To simplify the process we will assume that the installation is done directly from the ubuntu that we are deploying Snipe-IT on. Connect to the target ubuntu machine and run the following:

Install Ansible and git

sudo apt-get -y install python-software-properties software-properties-common
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get -y install ansible git

Clone the repository

cd $HOME
git clone https://github.com/GR360RY/snipeit-ansible.git

Modify the configuration

cd $HOME/snipeit-ansible

Edit snipeit.yml and overwrite the default values:

---
- hosts: snipeit 
  sudo: true

  vars:

    snipeit_source: /opt/snipe-it

    snipeit_dbname: snipeit
    snipeit_dbuser: snipeit
    snipeit_dbuser_password: secret

    smtp_host: smtp.example.com
    smtp_port: 25

    admin_first_name: Admin
    admin_last_name: Admin
    admin_email: [email protected]
    admin_password: bar

    disable_default_apache_site: True
    run_mysql_on_all_interfaces: False

    # If you want to import users from Active Directory to Snipe-IT, uncomment and modify the below values.
    # To import AD users, run /usr/local/bin/import_ad_users.py

    #ldap_uri: 'ldap://dc01.foo.com'
    #ldap_admin: 'CN=Administrator,DC=foo,DC=com'
    #ldap_passwd: 'your_secret_password'
    #users_ou: 'OU=Users,DC=foo,DC=com'

  roles:
    - snipeit-ansible

Install Snipe-IT

sudo ansible-playbook -i hosts -c local snipeit.yml

Active Directory User Import

One major feature that is missing from Snipe-IT is Active Directory user import/synchronization. It is important to say that this feature is on the roadmap. But what if you are eager to use Snipe-IT in production and do not want to add each and every user manually? This repository will also deploy simple python script that will import AD users directly into the Snipe-IT database. Make sure to modify the last block of the vars section. To import AD users, run /usr/local/bin/import_ad_users.py

Testing Snipe-IT with Vagrant

Install the following Requirements:

Note: Currently working and tested on OS X only but should work just fine on Linux/BSD system and even Windows.

  1. Clone the repository and run vagrant up
cd $HOME
git clone https://github.com/GR360RY/snipeit-ansible.git
cd $HOME/snipeit-ansible
vagrant up
  1. Open you browser and connect to http://172.20.1.2
  2. Login credentials:

User: [email protected]
Password: bar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.