Git Product home page Git Product logo

p038-dev-env-ansible's Introduction

Development Environment with Ansible

Requirements

sudo apt-get install gcc python3-dev

git clone https://github.com/181192/P038-dev-env-ansible
cd P038-dev-env-ansible

./setup-direnv.sh
direnv allow

pip install -r requirements.txt

Install / setup

ansible-playbook main.yaml --ask-become-pass

# With debug (-v -vv -vvv -vvvv)
ansible-playbook main.yaml --ask-become-pass -vvvv

Install with tags:

ansible-playbook main.yaml --tags "utilities,code" --ask-become-pass -vvvv

ansible-playbook main.yaml --tags utilities --ask-become-pass -vvvv

ansible-playbook main.yaml --skip-tags "code" --ask-become-pass -vvvv

Testing

Molecule is used for E2E testing.

pip install molecule

To run E2E test go to roles/<role> and run:

molecule test

Developing

To add a new role go to the roles and run

molecule init role -r my-new-role

Updating requirements.txt

Using pur updating dependecies is a breeze. pur will only update the requirements.txt without distrupting your python env.

To actually install the changes use pip install -r requirements.txt, be aware of dependencies conflicts.

pur -r requirements.txt
pip install -r requirements.txt

OS flags

RHEL/CentOS

when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat
Enterprise Linux'

DEBIAN/Ubuntu

when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
when: ansible_os_family == "CentOS"
when: ansible_os_family == "Redhat"
when: ansible_os_family == "Darwin"
when: ansible_os_family == "Debian"
when: ansible_os_family == "Windows"
OS_FAMILY = dict(
    RedHat = 'RedHat',
    Fedora = 'RedHat',
    CentOS = 'RedHat',
    Scientific = 'RedHat',
    SLC = 'RedHat',
    Ascendos = 'RedHat',
    CloudLinux = 'RedHat',
    PSBM = 'RedHat',
    OracleLinux = 'RedHat',
    OVS = 'RedHat',
    OEL = 'RedHat',
    Amazon = 'RedHat',
    XenServer = 'RedHat',
    Ubuntu = 'Debian',
    Debian = 'Debian',
    SLES = 'Suse',
    SLED = 'Suse',
    OpenSuSE = 'Suse',
    SuSE = 'Suse',
    Gentoo = 'Gentoo',
    Archlinux = 'Archlinux',
    Mandriva = 'Mandrake',
    Mandrake = 'Mandrake',
    Solaris = 'Solaris',
    Nexenta = 'Solaris',
    OmniOS = 'Solaris',
    OpenIndiana = 'Solaris',
    SmartOS = 'Solaris',
    AIX = 'AIX',
    Alpine = 'Alpine',
    MacOSX = 'Darwin',
    FreeBSD = 'FreeBSD',
    HPUX = 'HP-UX'
)

p038-dev-env-ansible's People

Contributors

181192 avatar dependabot[bot] avatar

Watchers

 avatar  avatar

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.