GithubHelp home page GithubHelp logo

rxwatcher / cloudbox_mod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudbox/cloudbox_mod

1.0 2.0 0.0 21 KB

Blank Template to add custom Ansible role to Cloudbox.

License: GNU General Public License v3.0

cloudbox_mod's Introduction

cloudbox_mod

Blank Template to add custom Ansible roles to Cloudbox.

How to use this template

  1. Clone this repo:

    git clone https://github.com/Cloudbox/cloudbox_mod.git ~/cloudbox_mod
  2. CD into the cloudbox_mod folder:

    cd ~/cloudbox_mod
  3. If you have an Ansible vault password file, add the location to ansible.cfg:

    To edit:

    nano ~/cloudbox_mod/ansible.cfg

    Add line (with path to your vault password file):

    vault_password_file = ~/.ansible_vault

    Final result:

    [defaults]
    inventory = ~/cloudbox/inventories/local
    callback_whitelist = profile_tasks
    command_warnings = False
    retry_files_enabled = False
    hash_behaviour = merge
    role_path = ~/cloudbox/roles
    vault_password_file = ~/.ansible_vault
  4. Create folders for the Ansible role:

    mkdir -p ~/cloudbox_mod/roles/newrole/tasks/
  5. Place the task file there:

    touch ~/cloudbox_mod/roles/newrole/tasks/main.yml
  6. Add custom variables into settings.yml:

    ~/cloudbox_mod/settings.yml
    
  7. Add the Ansible role to cloudbox_mod.yml:

    To edit:

    nano ~/cloudbox_mod/cloudbox_mod.yml

    Add the following line under roles::

        - { role: newrole, tags: ['newrole'] }

    Final result:

    ---
    - hosts: localhost
      vars_files:
        - settings.yml
        - ['~/cloudbox/accounts.yml', '~/cloudbox/accounts.yml.default']
        - ['~/cloudbox/settings.yml', '~/cloudbox/settings.yml.default']
        - ['~/cloudbox/adv_settings.yml', '~/cloudbox/adv_settings.yml.default']
      roles:
        - { role: pre_tasks }
        - { role: myrole, tags: ['myrole'] }
        - { role: newrole, tags: ['newrole'] }

    Note: The pre_tasks role is required and should not be removed.

  8. Run the Ansible role:

    sudo ansible-playbook cloudbox_mod.yml --tags newrole

cloudbox_mod's People

Contributors

desimaniac avatar rxwatcher avatar

Stargazers

 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.