bugfix: connect-wordpress orchestration

- added missing configuration to wordpress service
  REALM_ID
  REGISTRATION_ID
  CLIENT_ID
  CLIENT_SECRET
  CLIENT_USERNAME
  CLIENT_PASSWORD
  SMARDIGO_AUTH_TOKEN_NAME
  SMARDIGO_AUTH_TOKEN_VALUE
master
Sven Ketelsen 4 years ago
parent e297432988
commit 212ef00807

@ -90,23 +90,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -123,23 +123,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -182,3 +182,19 @@
es_dashboard_uuid: '{{ es_dashboard_name | to_uuid }}' es_dashboard_uuid: '{{ es_dashboard_name | to_uuid }}'
tags: tags:
- es-importobjects - es-importobjects
#############################################################
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local
run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks:
- name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
include_tasks: tasks/smardigo_management_message.yml

@ -84,23 +84,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -134,26 +134,12 @@
- hosts: "stage_{{ stage }}" - hosts: "stage_{{ stage }}"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
connection: local
gather_facts: false gather_facts: false
connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -80,23 +80,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -163,6 +163,8 @@ connect_base_url: "{{ connect_id }}.{{ domain }}"
wordpress_id: "{{ inventory_hostname }}-wordpress" wordpress_id: "{{ inventory_hostname }}-wordpress"
wordpress_base_url: "{{ wordpress_id }}.{{ domain }}" wordpress_base_url: "{{ wordpress_id }}.{{ domain }}"
smardigo_auth_token_name: "Smardigo-User-Token"
filebeat_certificate: "{{ stage }}-elastic-stack-filebeat" filebeat_certificate: "{{ stage }}-elastic-stack-filebeat"
logstash_certificate: "{{ stage }}-elastic-stack-logstash-01" logstash_certificate: "{{ stage }}-elastic-stack-logstash-01"

@ -10,5 +10,5 @@ connect_wordpress_oidc_provider_url: "{{ http_s }}://{{ shared_service_keycloak
connect_wordpress_oidc_client_id: "{{ cluster_name }}" connect_wordpress_oidc_client_id: "{{ cluster_name }}"
connect_wordpress_oidc_client_secret: "{{ cluster_name }}" connect_wordpress_oidc_client_secret: "{{ cluster_name }}"
smardigo_auth_token_name: "" connect_wordpress_buergerportal_username: "buergerportal"
smardigo_auth_token_value: "" connect_wordpress_buergerportal_password: "buergerportal"

@ -6,7 +6,7 @@ connect_image_version: "latest"
connect_admin_username: "{{ management_admin_username }}" connect_admin_username: "{{ management_admin_username }}"
connect_admin_password: "{{ management_admin_password }}" connect_admin_password: "{{ management_admin_password }}"
connect_workflow_env: "stage:{{ stage }};smardigoUserToken:{{ management_smardigo_user_token }}" connect_workflow_env: "stage:{{ stage }};smardigoUserToken:{{ smardigo_auth_token_value }}"
connect_process_search_module: "external" connect_process_search_module: "external"
connect_oidc_client_secret: "{{ management_oidc_client_secret }}" connect_oidc_client_secret: "{{ management_oidc_client_secret }}"
spring_profiles_include: "prod,postgres,elastic,swagger" spring_profiles_include: "prod,postgres,elastic,swagger"

@ -271,7 +271,6 @@ management_oidc_realm: "management"
management_oidc_client_id: "smardigo" management_oidc_client_id: "smardigo"
smardigo_management_url: "{{ http_s }}://{{ management_service_connect_hostname }}/api/v1/scopes/{{ scope_id }}/processes/{{ process_instance_id }}/messages" smardigo_management_url: "{{ http_s }}://{{ management_service_connect_hostname }}/api/v1/scopes/{{ scope_id }}/processes/{{ process_instance_id }}/messages"
smardigo_management_token: "{{ management_smardigo_user_token_vault }}"
connect_element_template_enabled: "true" connect_element_template_enabled: "true"
connect_external_task_script_worker_enabled: "true" connect_external_task_script_worker_enabled: "true"
@ -319,5 +318,3 @@ netgo_msteams_hook_alerting: "{{ netgo_msteams_hook_alerting_vault }}"
docker_registry_oidc_client_secret: "{{ docker_registry_oidc_client_secret_vault }}" docker_registry_oidc_client_secret: "{{ docker_registry_oidc_client_secret_vault }}"
management_oidc_client_secret: "{{ management_oidc_client_secret_vault }}" management_oidc_client_secret: "{{ management_oidc_client_secret_vault }}"
management_smardigo_user_token: "{{ management_smardigo_user_token_vault }}"

@ -1,70 +1,61 @@
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
32306134373236346231396562396163656363356664636430633438663366383963303134356532 34393233353963366133646463313361373039326638396230333164303231316231373931353434
3363393762333138656238336366623065326539306663650a616566343765386464323162316138 3032313438633331626138646333353763623461376230630a653939636564383966333337643837
65613934386161366436616338613265636237323137386263633234333061653936663635303334 65356466383333313131353430656666623233626539363461613832616138333765373333663665
3336386637356165630a613737323630303562393030656566643633323266663836393632653737 6433303132636637650a313465613534663237643231663563343034666231386662376261623439
31343736303463386131306433643336623434353631626130336233663430306366393732386138 33666130646563353931376134366139343333326335323939313234373138303736626138396131
62653337303338633162333663626266653461303736666261356639646533353438343539343466 34306164303734333635666133653263313034616239386534633066623231333166333239323235
64313139373163343039666133386238396362336466653762613136613333303265366236393166 64396338383062366461386239343836343238623138353737376634393561363534393830326331
62663362333235323139393334663266386230323534396339373432353031366466636637316533 39656631646432386363386364353261643632363432623161333463356465616635353165626632
64376330373336306662303433393465336465666332653330323539316665356335343738303133 62303562313630336332306236653330626165303038333330373861383161633861383064633536
66653938383462383432366364633938373164643035613964303939666237323163363862646538 63656666613133326132643538636664653466373165386331353336393934333534333837373830
37626336316339366162636639646263633334333562346339666430616134306561616636646264 62623532643738623535313963343238366535343561626131636233306261303133353835656436
33356665383636623138393033643263636432636331373266346138616564353631313262373833 32386565363230346339663134363839613332303863396464633962353166333936323135306365
63313031643433323634323661666435316362346466636333383166323137646436663265396333 62303132663463306464313665633932626432356131653033666430333862366137363632346361
33343264313061646134313963396635373232643966313263616536393065326333366162663836 36396362353836633261323731356130313433313564653737643930393962633161663236376433
32366666633739643366633364333064313232613537653034653734646338353062613335353262 61623538356433363162663637373537313437373434356230386632633931626237313337353138
36663131633835363337343236343432303335623861313965326433363964373361373536623166 66373534376634393464353361363034613038373033653761316330626532356533363861636464
39313265363039303038323837376533356236333264303839363361623131343466623861656137 38613031336164313037313262376566656565653439313863383565303130343466306638643366
32646631653238366533353231636538313135633362376363323833303831356137326530363031 61613536336230366534316338343138303537623563663564333838653761613630353466366566
62316636646332323130373065323238306533666235636230326431333432636463336433363030 36626332626665336530306334303234373966373436396530326635633636656137626566346132
34323438613833633632353965386138323739626163646431653039313364306161633962356133 63346234613831333939356239343736316664656665656264636539366565643735613631643739
31346131383166393038303466376138343764656132336666613536326364636533353162313861 66616332653930653436383662373434663965323437373437366562616430656436656438363837
37323161343832346333396361333363383938346632333836306336353337633062336561336631 66363861336635666230376334656166376237316666316337623239633662343030366233383365
39353537313366306234363064333932646363316461653339653765333037636263343732343432 62393734323462333363343962363462643832386133663935626239633163303635353430643131
30656536313862643435623335393262623762353635646638333532613065656664386634346436 31653836666163326363653964623832663330383362316463356635626437316636653265303264
62643337663832396463636335376263373938623766383564323937613534363462653434316631 65616662626532313638326666363132633334333831306236313065353734326361326435653863
30393764386335646134366566343436646462316363323539373764333437373138636231613939 65386462326534663438393065616436653130386533353732626633313263663965633937306535
37306161316139653866336335386639616330636336616237333664613234663031383333383132 62333466393266356132353963313139656563326464326635363535653131373462613562623962
62373039346632623766313739393666643531306665336337303363323461376136656339336463 38323264386365616433386337383333313933376132306335623163313634653038373066623334
31613830373039316564333731333466623465323865663339653134643337313564613064323264 34623331393339303836393838663439343130343231646364343139313563626535653033383563
65623863633138313866376230303964383631303938636134323365316537356233646439373361 34383666623037646264393963396562313736363334666233373965333063376630613134633135
32613430343639363938373833646661643831326333633235643463336439663833363165656134 64633835633864363166326237636361363232343564346465333639393261336632643231343930
33616563393438346230623234616332643238653735313362373831356239613433616537633939 65303536366162333236373038663632333432633730333164393337366338653562303865633565
31653161643966313363363638383731333833366564303661353362636534656336303131643663 37323163666132383062616636323262303733306363316132393035626139313135313034373931
66663631333633343733393564326265386132616638333465343236313562343036646261303131 62356163343064633363326263346637383237333934323935616164376435633536333938663337
65306231386330653731633430363261623765666163633563326438623031616265303736656539 62313061313032303730613564613839316464616234376565326363333965643365363366333738
31373564633031363162333336343339343661636663343666306163653763356261383164623264 33633733373033363365313864303362653633326235333936353562303765303966363064623031
63323864613032306364326136636531363639663830396535313234656461613736353737623733 37383135386261313030363361663733346335386330393635376230346133313462663363326563
31393361313362386437663833656237613136343038383231336436363531343562356263386233 31393034383635633332363330326431373563623163653138626165666339376230343236333935
32373963363762616331363733303965306462646134303163626238303266336439306539613764 32333236363865653134333666356562666333316139366262656264356165623532346437323433
62326566386162663133333137613666653239633834363433313966343537323536323039666538 62306532326135326466613066373030386164666365313834636664326362326437386137356265
37666639646337336466326137306233363632323734363533373834323761393934353733396232 37373931393031393661363965383062643661373030353463333935373537626638303933313335
31646535373666333861376266303031393230666164353965383765623333366537656466373062 36643138633735306132326465376634616365333866333931333336393662393463333734646663
33336237343237393362333539326466383464623761666432626362353864393063356639356366 36323961613262666261666331363336346438373631313966303332613236626533333266343430
63313234626533643430323530363265646433613436316662356463326533653537306330616638 35653635393462346635313232663361346365616132646662386432633834323261383933373662
34323330326434643439356632376432366363326163316332363139633965653063626361616235 32373565656534306464623334636263633035333036303637303463623835653866333830303538
33303934353165653735653736313539643231323735633365666165663438303462353939633238 66646163626137393731613664656138366131666433633161343531346436316336666238323966
30323564346336393531663562623766323661333333616464393563633764313837376263353038 38346264363234356266643565336635656133623737646431383462386432383434616437643739
38636235633834666430626439313434393233303339663330656534333734663265353239656130 61363130353863323164633333313738396332386562333830393630646530346632313038633134
62323933336464666235303266343561333131373131353162316566383036323130653063646234 37616132376134363862366236623537323038623631393630666365623932356362346534356638
32313938306638333736646537333462633539633236646134343134613662643730323733663230 64643266666161316636343237666239643535326231303330613339333562333236623339376266
64613436633265316663386262333465313732663333393933636461303430383566383962616166 33306664333039383466626461653961646432353239633562643332313634383831656539363931
65396566663432623837363461343436313466356366386530663966393031666336343063373162 32643461313962323236663032313263326230373764313866663938646564613732396266633034
38373037336237626436336437376339396664646461336439336363666137613136646266336365 65386537653565386531623430386633666134323831336664623633623935383761366232376264
35346362366166383634333430376465636361643638636363343062626363623132663233636231 62346364383434343061613536373735643166663262303030383235386537323763303366363434
63333732653462623164396133343930313163636661346436633564623030633163356439393762 31303638313763353633396537313230663930366161383466663137343832323437323361343062
33333330663931303437646234646134303465616365313336363335363363366137336163643939 34356435303738663365616234306563363436666164326537613266303961306633343635383362
62306462323764346632343361326462383033313261666435626434326236396164356464326333 39366163326435383365303632613764613730366634356163313262376239653361663835323535
65633138653735353336333530396236636630343839626330643961663666336536396165653638 33323966666439323261623563353536643936663034623764363333653538336333663563613764
64623238623636363430636635393630663338646130333436656638623038626331643136323333 66633831393037303335333938623334393338633831663937333832323332336631383038653964
35343638666636343537356365646136346337396635626333666436383465343630306135363261 36626232646638666437
39633739326537393161663234333636353538633831303232366466366234626163666333643034
61653432616366633536636138346636613064633861386661613039396338623736663330333033
38643432396130626136656466633936626630333837636264356466613963333166326466633266
31393032316136366562623766336138653730626136316138663361333732623838366434363363
63656362336530646463373761613661613961623836663332316561326337653165343562633766
37623833613634346531613432353266313936623563373461663438396233396437386339613732
33636165313730393637333334396531383164363132303761623361666261323664323762313864
63393136646632653935393634653365386465373865303234613339633161383037393066343166
3266

@ -270,7 +270,6 @@ management_oidc_realm: "management"
management_oidc_client_id: "smardigo" management_oidc_client_id: "smardigo"
smardigo_management_url: "{{ http_s }}://{{ management_service_connect_hostname }}/api/v1/scopes/{{ scope_id }}/processes/{{ process_instance_id }}/messages" smardigo_management_url: "{{ http_s }}://{{ management_service_connect_hostname }}/api/v1/scopes/{{ scope_id }}/processes/{{ process_instance_id }}/messages"
smardigo_management_token: "{{ management_smardigo_user_token_vault }}"
connect_element_template_enabled: "true" connect_element_template_enabled: "true"
connect_external_task_script_worker_enabled: "true" connect_external_task_script_worker_enabled: "true"
@ -321,5 +320,3 @@ netgo_msteams_hook_alerting: "{{ netgo_msteams_hook_alerting_vault }}"
docker_registry_oidc_client_secret: "{{ docker_registry_oidc_client_secret_vault }}" docker_registry_oidc_client_secret: "{{ docker_registry_oidc_client_secret_vault }}"
management_oidc_client_secret: "{{ management_oidc_client_secret_vault }}" management_oidc_client_secret: "{{ management_oidc_client_secret_vault }}"
management_smardigo_user_token: "{{ management_smardigo_user_token_vault }}"

@ -1,82 +1,74 @@
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
35393237356663343935636433353239373533633162393730386361336536323136653362653934 39366430386363366135343934373164336233313763626331636632323163323339326563376232
3735336130373233386136306139326562363736383962610a363466666331313032396237663065 3734616230343030663564366339323139646437663064610a626265623062633631333461376537
64363765383530643661626365303134323036613663353331323663333833356235316264653632 32663837333065613638646432343931636133326164613836623834326232633961646561613933
3433613932346236350a303236383638666435306164333630376138396235616561626433336265 3132623066633364390a613635636332393164663963623065373161313230383832336161323864
37653831366464373961393738656634653664653438333764363461653761373935393334313138 32376533663166663839646330343733613339643762623665323534616466633662313430393766
35333236663037303735363466353832383762386432623761306463613330626630663162616335 32393731376236356536633638633865396238333466303735303939333337313463363139346662
32656530326664666131633766663537356165343331626661646430336266653161626136323836 35636330383262643839363065346232653139633863653330353837663964393138393564623966
30353230646237396362333464653830346364353062633364353964353161393030336633626535 34373262643364313330616138623864666135383063373433666134326365313437396165363037
31313231636437343331363666656632386231383239653336313237376332323431316663383463 39343561303638653837376362323066363235383233393035373064383363306663646431643932
64343963323962633632396463393536356563616630353139623464343635373534313634643437 35646335386162346637663766663932373936383665323133626536306638373331316562386439
63353233343338346232356165643532366534636336656564393265323865396162663462663636 38663962386238346130353033356663643330616563393035353030653331666466376436663837
30313066626437393437356266623535393565363536616138366537636433646439623632356366 66636235396539396365323335653231626564663432363864636531313339306439343632333366
63336263356335356561643032623131386432316564343137333439336138643437623563636433 61663963396366653661653764653337336535396338333461396337356435646336653266393364
64373337646231333263626665333837623639613136393738353932663338323435333138656365 39626661646539656135393533326364363534313335636266636163396565363833613466336161
38333265643636353462383832613231316438306165306162346134336637613839636362653462 36333037623734336664653164316337323931303261643663653637643537666236386165623033
63313238326461326237623234383437353036646633646133626239653432363931623538633838 37383733633731303466396266336362386335356234646234313363363036633938303239346233
62393162336534316536353863393363313263316534643331636130373430656264346134633535 31336435616133643437363664633762633935623264346264383164326135373330333035613264
31646439393662656261303865353566303563363362653532343637653862646565303833366265 31316437343234323634373734363739373737643433373161323861363032623662356261663535
63336362306335333465336634613839336665383136616638663465383235306565366235626636 36396338643833646461323461383032653066616332656536313939313362666539633339373936
35303430633335323039643435383861363431663539396438393666333131353533616135636539 35623563353236643062376331616163383730353061353565373039376264643633333866396465
61623637333163336238653066393132623035383036396165316533363361386263386463643133 66393635396133643531336437333366653034366535663031373832613162636265626139333066
37626664356136646234613133636535333162623738303532616436336337643836653931383563 39316332366438633066643663346630386363366166316566306238313731326663336436653261
32663733333531663637633932306637373235333332666461653262656135313636396530626362 37636362616662303063663230323837393938393338303738393535663239383030383061313236
62643132623562323430643335313036623236396330353635656165623036653534326438373431 66313566323735323337633735323061383162393266326635363365633363623834646364633562
61666163336364613730306432303762373236653336393262333632613464363934313666663037 37616530626536333834653363393936343731383631306265613463336638643038303162616533
63373739386132633734633363643633306233626134613832303263346430366363306233663664 30323335323334613565616331613530383637396465323134646562633531396130353465616134
30383231653332623637613032626663646165643538666330306234653138376337393165363131 36633263353936393331343436373565346434633434386265386133313939366433363633373363
36313335626437353132323164616331393139303536356336353234383437366537303037346339 64613631656463613238626363643631656162393531313339613063343435376338356465356234
63366239653136363466343164333265303661313838663163346365353431633264643135313137 30646431646237376365666432626431363161303638623136626439373862313965376534393533
31656137643936646439336365343033393231343531623730323961393961616362636531613738 36343761646235333165393165626133326233656263613466356461393762393566626436643866
64633333646637633661646636366230396438333837303830663531656433323132613431346533 61353064653036636566303637616433363964313462356263623132653161326632656434336532
32353939383234336534316433336462616639316562383764323563393932376332613934666165 36366638333337383832373733303334643438343463646439313734316664313563373561663265
39373238663036306434666462333033383530393735643230376235303336376434356465363762 37616534656637393938393739366239353761383139326532383062633664653333656663636237
62383939613036353461393830346433376466373964303661333033356131643531633834353539 30373963636361653561393537386133383866363435613638333432626432306632323736363065
63336363343339343938313836336330633363613663306632333162306566323734393330316138 31386136613337323263353635313330373534373835613434643066353063663066333638343830
37396235666266343436633536663939653530666333663962613738303737353033626638373436 38303664613266626339396361643939356364626238333637373966376363663833613631366632
34343462366564363134656334636132326565633530303437303439386162653830313862343264 64656631373233633063353731343730303439303637383965356231643331623936353139343462
35623731653561356466343763376638356336323934613137306530333337666238336635356134 37323339616636336130363666616339316234383238383434363336336664646234393938366338
38623665663761353239306632366236656637613830616464653039323733373537613232323234 35346261623363323164353537343632663236653232643137623230393133383736626462363065
31326531326134633263303231353465363762613035313966656630613037333333333031333037 30633262353135633631663662373638346233323435306337323964353164626664633437363333
39623461326133316632386265646432383134326137666363663938643662373065646166333030 34333462386361636662346636343261623134623466343465643835633832643937623235303635
61343962353563316630636431626664383066363937356138376561333133323632633934383465 36343833373865643638343735363937306662306234366566346335626262383630616238316364
62336230653936303765326135643561386362613738333137653662363165323238383433653232 36306138393531333061646232313962333330306564393031363139666361663466613163393236
65346262663264356232623864346661623639373738663834396563346361383462356533643630 61366331333761306664643933346131643463653164376162386530343061656230363430343433
30373365633265323632346535353066373539663335626261336636656232656633333463386631 35396330613764303539343833316236383362626565656639333331363137643536373064393435
34653961613463376637656336303365623433343636386530306339343131313839383832353033 65373631396431336561313838643164336533636139343564346663316332623536383361323764
30343339393865323230663866623662326138623962353132346633663233666431626166636239 33313033656437653162366265646132366336316661393138336532333636313236333066613738
30636163663463316463663765353233663436376138306231386431643661626131363531366232 35336132313466353138336464643033633236346538356438616262653461623161613934326139
30353433646330626534363739303733653663653762313165313038663630396433643233373032 35386561303734656335626663383639333130303665336536316435643164353232363235636163
32643137323864623135633439383636366133306436653137343435323732636430303066326362 35653763356236356661383239363235653563333737373163366234396531376561343664653963
66393163643234303934376632336232343638396466653439313232613562613836663530333362 33663839613634346461386239343333383561336462303936393935353735376166393831303737
66663661326463663036353439636263636638623037316133336538633863353866353336356461 36353262356432336336613535306338326437313237636262313338373063303434373862303466
36336436333235323766633936393261313462363138393435613865343630336264613032633865 65353065383233313230353164323034373461653865373839386462346635663631393239653837
63306365666563653539616237616438613664623566333639316565383664653864363836346438 32303939383837363764393939633263333234613133366638623161656236643036306663323939
33356439613763313435356661323332343137323637623631333037636336316633623935323738 65363235313762633136653930323536343734643337323937643332353561366566363534306566
31333536346538333635623462363435393537303638303065346361363433633162303330363637 32313934353163633964353632356333383839303363643834366235333335303735656439353965
32626563333131666334356537373130373363656531303262623030646135646634386635373534 36623638656435376332323264336439303963376536306366306335333466373637396164663936
62303964633166336133306663333931323064613532623035643433633664646239663038376565 63396536633734613533333461356335363865323337643266303735316561643063636432656434
39643162366233303233326363653733623862393239616463323530316134653432633036653734 37313834316437373238393535343237636465343439323061633762663465303932323030353931
62393838363737316566303963306536633531316563373435353933336563353330613732346638 61633534346466396132663534383765613165306531383932346261643761326561623363643433
63313236393233346537313766333135623534366566383962613066373965663732613534313764 31323166343563656165626538363964383930333035376233393136393431666237653464336533
37633537383163613431353563646663626536643632656466653939363233623531396533353134 36346136643535306163393665623462623030306532666638383563383065356238376135336163
64386262333361663863376533396537633234636362303637366532643137393262373065316530 61376439653966376631353766363733396337313665363865306362376133613161393564666364
37643832366361313035376362346139616363343365656666323263336466653138663636306138 66366537643463326465333763346263396637376638363963663530313165613261633135636136
39316135653636393430636235643236653761326136383132393634353736636563353434633831 37306161616262323336366365333935326632633262396536313937336239363535303439366134
32396638336237326138643832363561643235396630633862653762333962623231386162383134 30626663623036616564656366353132613364336439386663616532316464376337656334343061
36326466383465333532646465643936356166323136333632656566636633366233353035666362 38656564396566376463343464323161373034343037353535396337616364316463306430626232
34616561353963663239393635346364626434306438386234383538623737336136303765356236 66636535343339333761613336633063613765333465333162316433396233303765373430663465
65333465616161353963663637343462653031643961393031343930386339656563636363383033 31646434383565633331666362633362303630353738303634393834616433376333323431333530
34656461316666316162613930663338303932613762613430343633396232666266326634633362 30353038616433653939383633383131633161383262326264613366333732623364636137353135
37623335356362316335323164376230373131626539386562643436623266653561656362313834 33643566613632653130326432323465623733383462636335666366373133613437393538393734
31643765373839666262633036343331356563323830363161346439656665643862613161396333 37333062383139616161366338646230353637643462316332383164616237356336396338653861
31633837326264626662396566356639623336383438363838393361343263373139313332353333 6538
30346237633830306361396565373866376534313233613339353830643666323738306664656330
39316132353130396131663062366133326361646533333233333239313663633933343136656166
62663334353531333132656432656136356665616237643036653766353466613438333238653266
61363537373433653638363037663837326337363730643338613061633735663162316663333937
39353830623132303633373238663435366164306537363163313262613938393135303962373232
37366239373030306633386430653962333862653732636666613866363365326566376332306431
36396331343639653431623965333263323365663432633036386539343961633433363938373665
31653138613861663033666234623030653635363831346365323765663766306639

@ -80,26 +80,12 @@
- hosts: "stage_{{ stage }}" - hosts: "stage_{{ stage }}"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
connection: local
gather_facts: false gather_facts: false
connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
post_tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -0,0 +1,36 @@
#!/usr/bin/python
DOCUMENTATION = '''
---
module: smardigo_user_token
short_description: create smardigo user token
'''
EXAMPLES = '''
- hosts: localhost
tasks:
- name: create smardigo user token
smardigo_user_token:
secret: ""
user_id: ""
register: result
- debug: var=result
'''
from jose import jwe
from ansible.module_utils.basic import *
def main():
fields = {
"secret": {"default": False, "type": "str"},
"user_id": {"default": False, "type": "str"}
}
module = AnsibleModule(argument_spec=fields)
token = jwe.encrypt('{"sub":"' + module.params["user_id"] + '"}', module.params["secret"], algorithm='dir', encryption='A128CBC-HS256')
module.exit_json(changed=True, token=token)
if __name__ == '__main__':
main()

@ -6,3 +6,4 @@ dnspython
hcloud>=1.16.0 hcloud>=1.16.0
jmespath jmespath
netaddr netaddr
python-jose>=3.3.0

@ -103,26 +103,12 @@
- hosts: "stage_{{ stage }}" - hosts: "stage_{{ stage }}"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
connection: local
gather_facts: false gather_facts: false
connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
post_tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -78,19 +78,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1

@ -78,24 +78,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_token is defined
- smardigo_management_action is defined

@ -91,19 +91,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1

@ -90,23 +90,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -27,6 +27,7 @@ awx_ansible_password: "ansible"
awx_job_templates: awx_job_templates:
- name: "create-database" - name: "create-database"
- name: "create-database-backup" - name: "create-database-backup"
- name: "create-kibana-objects"
- name: "create-realm" - name: "create-realm"
- name: "create-server" - name: "create-server"
- name: "create-service" - name: "create-service"

@ -27,12 +27,25 @@ current_realm_clients: [
} }
] ]
current_realm_users: [ current_realm_users_base: [
{ {
"username": "{{ connect_client_admin_username }}", "username": "{{ connect_client_admin_username }}",
"password": "{{ connect_client_admin_password }}", "password": "{{ connect_client_admin_password }}",
} }
] ]
current_realm_users_wordpress: [
{
"username": "{{ connect_wordpress_buergerportal_username }}",
"password": "{{ connect_wordpress_buergerportal_password }}",
}
]
current_realm_users: >-
{%- if 'connect_wordpress' in groups -%}
[{{ current_realm_users_base + current_realm_users_wordpress }}]
{%- else -%}
[{{ current_realm_users_base }}]
{%- endif -%}
current_realm_admin_users: [ current_realm_admin_users: [
{ {
"username": "{{ connect_realm_admin_username }}", "username": "{{ connect_realm_admin_username }}",

@ -3,6 +3,21 @@
### tags: ### tags:
### update_deployment ### update_deployment
- name: "Creating smardigo user token"
smardigo_user_token:
secret: "{{ connect_jwt_secret }}"
user_id: "{{ connect_admin_username }}"
register: smardigo_user_token_result
delegate_to: 127.0.0.1
tags:
- update_deployment
- name: "Setting smardigo_auth_token_value as fact"
set_fact:
smardigo_auth_token_value: "{{ smardigo_user_token_result.token }}"
tags:
- update_deployment
- name: "Setup DNS configuration for {{ wordpress_id }}" - name: "Setup DNS configuration for {{ wordpress_id }}"
include_role: include_role:
name: _digitalocean name: _digitalocean

@ -44,12 +44,12 @@ wordpress_docker: {
" define( 'WP_SITEURL', 'https://{{ wordpress_base_url }}' );", " define( 'WP_SITEURL', 'https://{{ wordpress_base_url }}' );",
"AUTH_API: \"https://{{ shared_service_keycloak_hostname }}\"", "AUTH_API: \"https://{{ shared_service_keycloak_hostname }}\"",
"RESOURCE_API: \"https://{{ connect_base_url }}\"", "RESOURCE_API: \"https://{{ connect_base_url }}\"",
"REALM_ID: \"{{ current_realm_name | default('none') }}\"", "REALM_ID: \"{{ current_realm_name }}\"",
"REGISTRATION_ID: \"{{ wordpress_oidc_client_id | default('none') }}\"", "REGISTRATION_ID: \"{{ connect_wordpress_oidc_client_id }}\"",
"CLIENT_ID: \"{{ wordpress_oidc_client_id | default('none') }}\"", "CLIENT_ID: \"{{ connect_wordpress_oidc_client_id }}\"",
"CLIENT_SECRET: \"{{ wordpress_oidc_client_secret | default('none') }}\"", "CLIENT_SECRET: \"{{ connect_wordpress_oidc_client_secret }}\"",
"CLIENT_USERNAME: \"{{ wordpress_buergerportal_username | default('none') }}\"", "CLIENT_USERNAME: \"{{ connect_wordpress_buergerportal_username }}\"",
"CLIENT_PASSWORD: \"{{ wordpress_buergerportal_password | default('none') }}\"", "CLIENT_PASSWORD: \"{{ connect_wordpress_buergerportal_password }}\"",
"SK_NRW_ISSUER: \"{{ connect_wordpress_oidc_issuer }}\"", "SK_NRW_ISSUER: \"{{ connect_wordpress_oidc_issuer }}\"",
"SK_NRW_PROVIDER_URL: \"{{ connect_wordpress_oidc_provider_url }}\"", "SK_NRW_PROVIDER_URL: \"{{ connect_wordpress_oidc_provider_url }}\"",
"SK_NRW_CLIENT_ID: \"{{ connect_wordpress_oidc_client_id }}\"", "SK_NRW_CLIENT_ID: \"{{ connect_wordpress_oidc_client_id }}\"",

@ -40,6 +40,14 @@
when: when:
- debug - debug
- name: "Printing usernames for realm {{ current_realm_name }}"
debug:
msg: "{{ current_realm_admin_users }}"
delegate_to: 127.0.0.1
become: false
when:
- debug
- name: "Creating users for realm {{ current_realm_name }}" - name: "Creating users for realm {{ current_realm_name }}"
uri: uri:
url: "{{ keycloak_server_url }}/auth/admin/realms/{{ current_realm_name }}/users" url: "{{ keycloak_server_url }}/auth/admin/realms/{{ current_realm_name }}/users"

@ -41,6 +41,14 @@
when: when:
- debug - debug
- name: "Printing usernames for realm {{ current_realm_name }}"
debug:
msg: "{{ current_realm_users }}"
delegate_to: 127.0.0.1
become: false
when:
- debug
- name: "Creating users for realm {{ current_realm_name }}" - name: "Creating users for realm {{ current_realm_name }}"
uri: uri:
url: "{{ keycloak_server_url }}/auth/admin/realms/{{ current_realm_name }}/users" url: "{{ keycloak_server_url }}/auth/admin/realms/{{ current_realm_name }}/users"

@ -2,6 +2,21 @@
### tags: ### tags:
- name: "Creating smardigo user token"
smardigo_user_token:
secret: "{{ connect_jwt_secret }}"
user_id: "{{ connect_admin_username }}"
register: smardigo_user_token_result
delegate_to: 127.0.0.1
tags:
- update_deployment
- name: "Setting smardigo_auth_token_value as fact"
set_fact:
smardigo_auth_token_value: "{{ smardigo_user_token_result.token }}"
tags:
- update_deployment
- name: "Create database for <{{ inventory_hostname }}> if necessary" - name: "Create database for <{{ inventory_hostname }}> if necessary"
include_role: include_role:
name: connect-postgres name: connect-postgres

@ -0,0 +1,34 @@
---
- name: "Creating smardigo user token"
smardigo_user_token:
secret: "{{ connect_jwt_secret }}"
user_id: "{{ connect_jwt_username }}"
register: smardigo_user_token_result
delegate_to: 127.0.0.1
tags:
- update_deployment
- name: "Setting smardigo_auth_token_value as fact"
set_fact:
smardigo_auth_token_value: "{{ smardigo_user_token_result.token }}"
tags:
- update_deployment
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>"
uri:
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_auth_token_value }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -67,30 +67,14 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-prometheus-01" - hosts: "stage_{{ stage }}"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined
tags:
- always

@ -79,23 +79,9 @@
gather_facts: false gather_facts: false
connection: local connection: local
run_once: true run_once: true
vars:
connect_jwt_username: "{{ management_admin_username }}"
tasks: tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>" - name: "Sending smardigo management message to <{{ smardigo_management_url }}>"
uri: include_tasks: tasks/smardigo_management_message.yml
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
retries: 5
delay: 5
delegate_to: 127.0.0.1
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

@ -77,33 +77,3 @@
when: when:
- "'connect_wordpress' in group_names" - "'connect_wordpress' in group_names"
- "upload_file is defined" - "upload_file is defined"
#############################################################
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
serial: "{{ serial_number | default(1) }}"
connection: local
gather_facts: false
run_once: true
post_tasks:
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>"
uri:
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_management_token }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined

Loading…
Cancel
Save