diff --git a/group_vars/constellation.yml b/group_vars/constellation.yml index 30709052566af7581505b5c24c35d10e6e542de2..f560fc2d76e4ae220b96fdf47a5a7d248c9c6308 100644 --- a/group_vars/constellation.yml +++ b/group_vars/constellation.yml @@ -1,6 +1,6 @@ --- glob_constellation: - django_secret_key: "{{ vault.constellation_django_secret_key }}" + django_secret_key: "{{ vault.constellation.django_secret_key }}" admins: - ('Root', 'root@crans.org') allowed_hosts: @@ -18,7 +18,7 @@ glob_constellation: host: "{{ query('ldap', 'ip', 'tealc', 'adm') | ipv4 | first }}" port: 5432 user: 'constellation' - password: "{{ vault.constellation_django_db_password }}" + password: "{{ vault.constellation.django_db_password }}" name: 'constellation' front: true crontab: true @@ -32,12 +32,16 @@ glob_constellation: - 'member' - 'topography' - 'unix' - comnpay: - tpe: 'VAD-941-415' - secret: '{{ vault.comnpay_secret }}' + stripe: + private_key: '{{ vault.constellation.stripe.live.private_key }}' + public_key: '{{ vault.constellation.stripe.live.public_key }}' + note: + url: 'https://note.crans.org/' + client_id: '{{ vault.constellation.note.client_id }}' + client_secret: '{{ vault.constellation.note.client_secret }}' debug: false owner: root group: _nounou - version: master + version: main settings_local_owner: www-data settings_local_group: _nounou diff --git a/host_vars/constellation-dev.adm.crans.org.yml b/host_vars/constellation-dev.adm.crans.org.yml index 3cb7621d981d78316ba01f35a722d9f1fdafc2b2..fe0fcc4d1360b9377778dfa292a7e50d2d30da1b 100644 --- a/host_vars/constellation-dev.adm.crans.org.yml +++ b/host_vars/constellation-dev.adm.crans.org.yml @@ -9,19 +9,23 @@ loc_constellation: database: user: 'constellation-dev' name: 'constellation-dev' - applications: - - 'access' - - 'billing' - - 'dnsmanager' - - 'firewall' - - 'layers' - - 'management' - - 'member' - - 'topography' - - 'unix' - - 'debug' - comnpay: - tpe: 'HOM-832-854' - secret: '{{ vault.comnpay_homologation_secret }}' + applications: + - 'access' + - 'billing' + - 'debug' + - 'dnsmanager' + - 'firewall' + - 'layers' + - 'management' + - 'member' + - 'topography' + - 'unix' + stripe: + private_key: '{{ vault.constellation.stripe.test.private_key }}' + public_key: '{{ vault.constellation.stripe.test.public_key }}' + note: + url: 'https://note-dev.crans.org/' + client_id: '{{ vault.constellation.note.client_id }}' + client_secret: '{{ vault.constellation.note.client_secret }}' debug: true version: dev diff --git a/roles/constellation/templates/constellation/settings_local.py.j2 b/roles/constellation/templates/constellation/settings_local.py.j2 index a396676fb599f83faa17b831db7baecff6cba59e..b55d1e36d19095e74a39f7816ae7ec523c1f7086 100644 --- a/roles/constellation/templates/constellation/settings_local.py.j2 +++ b/roles/constellation/templates/constellation/settings_local.py.j2 @@ -55,6 +55,21 @@ EMAIL_HOST_USER = '{{ constellation.email.user }}' EMAIL_HOST_PASSWORD = '{{ constellation.email.password }}' SERVER_EMAIL = '{{ constellation.email.from }}' DEFAULT_FROM_EMAIL = '{{ constellation.email.from_full }}' +{% if constellation.front %} +{% if constellation.comnpay is defined %} COMNPAY_ID_TPE = '{{ constellation.comnpay.tpe }}' COMNPAY_SECRET_KEY = '{{ constellation.comnpay.secret }}' +{% endif %} +{% if constellation.stripe is defined %} + +STRIPE_PRIVATE_KEY = "{{ constellation.stripe.private_key }}" +STRIPE_PUBLIC_KEY = "{{ constellation.stripe.public_key }}" +{% endif %} +{% if constellation.note is defined %} + +NOTE_KFET_URL = "{{ constellation.note.url }}" +NOTE_KFET_CLIENT_ID = "{{ constellation.note.client_id }}" +NOTE_KFET_CLIENT_SECRET = "{{ constellation.note.client_secret }}" +{% endif %} +{% endif %}