-
Notifications
You must be signed in to change notification settings - Fork 1
Core OAH Roles
| Sr No | OAH Ansible Name | Version | Status | Link To Readme | Open Issues |
|---|---|---|---|---|---|
| 1 | ansible-role-oah | 0.0.1-a.1 | DEV |
ansible-role-oah | |
| 2 | ansible-role-oah-users | 0.0.1-a.1 | DEV |
ansilbe-role-oah-users | |
| 3 | ansible-role-oah-shell | 0.0.1-a.1 | DEV |
ansible-role-oah-shell | |
| 4 | ansible-role-oah-usage | 0.0.1-a.1 | DEV |
ansible-role-oah-usage | |
| 5 | ansible-role-oah-desktop | 0.0.1-a.1 | DEV |
ansible-role-oah-desktop | |
| 6 | ansible-role-oah-enterprise | 0.0.1-a.1 | DEV |
ansible-role-oah-enterprise |
Please note each of the enabled oah core roles will be called during the execution of the 5 oah playbooks in a oah-xxx-vm . “oah_command” variable will tell you which playbook is being executed, so in the task file associated with each oah role you have to check the oah_command variable and determine which of the task must be executed.
a. Tasks for oah.users role
i. Check add oah_user
ii. Check add oah_env_user
iii. Initialize oah_env_user_group
iv. Validate oah_env_user
1. Prompt for oah_env_user unique tokens (gitlab token) in case of oah install/oah use ,oah update, oah validate , oah remove and oah reset
v. Add validated user to oah_env_user_group (linux user group), if the group was not present previously.
vi. Check if there is already a user in oah_env_user_group (linux user group) and the user is the current user
b. Task for oah.usage role
Depending on the playbook being executed the role must have some of the following
1. Check Initialize oah_usage_cron.
2. Initialize usage git repo @ {{oah_dir}}/.oah/data (where ~ is the oah_dir) ,
Steps to initialize are given below.
a. git init ,
b. add remote branch usage , oah_env_usage_stat_staging_repo)
c. Add oah_env_user_data i.e {“oah_env_user_id”:”the validated user”,”timestamp”:”date -s”,”oah_env_uptime”:””} to .oah/data/{{ oah_env_user }}.json
3. Capture the oah_usage data for oah_env_user
i.e Update {“oah_env_user_id”:{{ oah_env_user }},”timestamp”:”date -s”,”oah_env_uptime”:”xxxxx”,”oah_env_name”:”oah-xxx-env”,”oah_project_name”:”xxx_projectname”} to .oah/data/{{ oah_env_user }}.json
4. Update to oah_env_usage_stats_staging_repo
a. Attempt a git push ( Handle conflicts automatically and i.e do stash and update if fetch fails etc)
c. Tasks for oah.projects.
i. This role will make use of oah_projects param in the oah_config.yml for any given oah-XXX-vm and make necessary changing in the oah environment e.g checking out git repo urls, project specific ide plugins etc. An example of how the oah_config.yml fragment for the same will be in given below.
oah_projects :
- name : some projects
oah_source_repo_type : “gitlab|github”
- oah_project_Repo_url: “gitlab|github git url”
- oah_project_check_out_location: “checkout location”
- oah_project_build_hook: “param1..” // optional for now
oah_project_ide:
- type : “atom|eclipse”
- Plugins :
- “some_package1”
- “some_package1”
d. Tasks for oah.oah :
This is the top level role has no logic in it at all . It has just has reference to other oah core roles ?All you need is to check if the oah-config.yml params are set or not (i.e if oah.desktop & oah.projects role must be added for any specific oah-xxx-vm )