Giter Site home page Giter Site logo

ansible-role-env's Introduction

env

Build Status

Ansible role for env

This role was prepared and tested for Ubuntu 16.04.

Installation

$ ansible-galaxy install iroquoisorg.env

Usage

Environment variables

To set global environment variables, use env_vars variable in a following way:

env_vars:
    VARIABLE: 'value'
    OTHER_VARIABLE: 'some_value'

This role will update variables' value if necessary.

Pam environment variables - .pam_environment

In case you want to narrow down visibility of your environment variables to only one user (for example: www-data) and not expose them to everyone use env_pam_users option to set it. Read more: https://help.ubuntu.com/community/EnvironmentVariables#A.2BAH4-.2F.pam_environment

env_pam_users:
  - { name: "www-data", "template": "pam-environment.www-data.j2" }

Or for multiple users:

env_pam_users:
  - { name: "www-data", "template": "pam-environment.www-data.j2" }
  - { name: "test-user", "template": "pam-environment.test-user.j2" }

Place environment variables in a pam-env file located in your templates folder. They get overwritten with every deploy.

Default settings

---
env_hostname: ""
env_vars: {}
env_timezone: "Etc/UTC"
env_cron_jobs: []  # {job: "git status", name: "job name", user: "www-data", minute: "*", hour: "*", day: "*", weekday: "*", month: "*" }
env_hosts: []  # {ip: "127.0.0.1", host: "localhost"}
env_cron_host: false
env_pam_users: []

Development

Please check development guide for details about developing and testing this role.

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.