Git Product home page Git Product logo

environment's Introduction

Environment

To build your develop environment gracefully.

Requirements

  • Master Machine

    • ansible (version >= 2.3)
  • Slave Machine (Which you want to build your environment)

    • openssh-server
    • Master machine accessible

Of course, you can build environment in master machine locally.

Usage

git clone github.com/aweimeow/environment
cd environment

Configuration File

If there are many slave machines going to install, you can write in hosts file. Take a look at hosts or following is an example configuration.

# global vars, for all target machine
[all:vars]
ansible_connection=ssh
ansible_ssh_user=<your_username>
ansible_ssh_pass=<your_password>

# And put ip addresses at here.
[targets]
172.17.0.2

Execute all tasks Ansible Playbook

Slave machine (not include localhost) must access by private-key or password.

ansible-playbook main.yml -i hosts

Execute only some tasks in Ansible Playbook

We have 4 tags for different proposals: server, terminal, editor, desktop.

  • server tag: Target machine is a server, without desktop environment, install setup_basic.yml, setup_terminal.yml and setup_editor.yml.
  • terminal tag: Only install setup_terminal.yml, use it when you only need terminal customization.
  • editor tag: Only install setup_editor.yml, use it when you only need editor(vim) customization.
  • desktop tag: Only install setup_desktop.yml, if you want to install environment in brand new Ubuntu Desktop, do not specific any tag.
# When you specific 1 tag
ansible-playbook main.yml -i hosts --tags editor
# When you specific multiple tags
ansible-playbook main.yml -i hosts --tags terminal,editor

How to custom my playbook ?

In this project, I split develop enviroment installation to 3 part.

  1. Basic Installation
    • apt: variable in vars/server
  2. Terminal Customization (Plugin like: powerline, syntax highlightin, ...)
    • git: variablein vars/terminal
  3. Editor Configuration
    • editor installation step in tasks/setup_editor.yml

Besides, I use Ubuntu 14.04.5, and package manager on Ubuntu is apt, if you want modify to fit other operating system, you can find more info in Packaging Modules - Ansible.

License

Licensed under the MIT license.

environment's People

Contributors

aweimeow avatar

Watchers

 avatar  avatar

environment's Issues

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.