Skip to content

Update Variables

rjshrjndrn edited this page Nov 27, 2017 · 17 revisions

Notes

All of these points are applicable for dev/staging environments

Variables can be found in below locations

  • sunbird-devops/{{ env }}/defaults/main.yml

  • sunbird-devops/{{ env }}/group_vars/main.yml

  • sunbird-devops/{{ env }}/secrets.yml

Variables: General guidelines

If you're updating a new variable in code, then please follow below guidelines.

  • Static values can be hard-coded in sunbird-devops/{{ env }}/defaults/main.yml

    example

    version: 1.2.3
    
  • All user defined variables must be initialized in sunbird-devops/{{ env }}/defaults/main.yml

    example

    sunbird_actor_system_name: ""
    
  • All secrets must be preceded with vault_ and declare in sunbird-devops/{{ env }}/defaults/main.yml

    example

    keystore_password: "{{vault_keystore_password}}"
    

    Actual secret have to be defined in sunbird-devops/{{ env }}/secrets.yml

    ansible-vault edit sunbird-devops/{{ env }}/secrets.yml
    
    vault_keystore_password: sample_password_123