DEV-375 feat: new process for backup scheduling
parent
49aa913213
commit
80b321cd65
@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
### tags:
|
||||||
|
### update_configurations
|
||||||
|
|
||||||
|
- name: "Running all block tasks on locahost"
|
||||||
|
delegate_to: 127.0.0.1
|
||||||
|
become: false
|
||||||
|
block:
|
||||||
|
|
||||||
|
- name: "Checking connect is running on <{{ connect_base_url }}>"
|
||||||
|
uri:
|
||||||
|
url: "{{ http_s }}://{{ connect_base_url }}/api/profile-info"
|
||||||
|
method: GET
|
||||||
|
headers:
|
||||||
|
"Smardigo-User-Token": "{{ smardigo_auth_token_value }}"
|
||||||
|
status_code: [200]
|
||||||
|
register: connect_profile_info
|
||||||
|
delay: 15
|
||||||
|
retries: 10
|
||||||
|
until: connect_profile_info.status in [200]
|
||||||
|
tags:
|
||||||
|
- update_configurations
|
||||||
|
|
||||||
|
- name: "Creating archives of smardigo configuration"
|
||||||
|
ansible.builtin.tempfile:
|
||||||
|
state: directory
|
||||||
|
suffix: temp
|
||||||
|
register: temp
|
||||||
|
tags:
|
||||||
|
- update_configurations
|
||||||
|
|
||||||
|
- name: "Creating archives of smardigo configuration"
|
||||||
|
archive:
|
||||||
|
path: "./smardigo/{{ item }}"
|
||||||
|
dest: "{{ temp.path }}/{{ item }}.zip"
|
||||||
|
format: zip
|
||||||
|
with_items: "{{ connect_configurations }}"
|
||||||
|
tags:
|
||||||
|
- update_configurations
|
||||||
|
|
||||||
|
- name: "Upload configuration zip file to <{{ connect_base_url }}>"
|
||||||
|
uri:
|
||||||
|
url: "{{ http_s }}://{{ connect_base_url }}/api/v1/config/import-zip"
|
||||||
|
method: POST
|
||||||
|
headers:
|
||||||
|
Smardigo-User-Token: "{{ smardigo_auth_token_value }}"
|
||||||
|
body_format: form-multipart
|
||||||
|
body:
|
||||||
|
file:
|
||||||
|
filename: "{{ temp.path }}/{{ item }}.zip"
|
||||||
|
mime_type: "application/zip"
|
||||||
|
status_code: [200]
|
||||||
|
register: config_import_result
|
||||||
|
with_items: "{{ connect_configurations }}"
|
||||||
|
tags:
|
||||||
|
- update_configurations
|
||||||
|
|
||||||
|
- name: "Upload configuration zip file to <{{ connect_base_url }}>"
|
||||||
|
debug:
|
||||||
|
msg: '{{ config_import_result }}'
|
||||||
|
tags:
|
||||||
|
- update_configurations
|
||||||
@ -1 +0,0 @@
|
|||||||
---
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name" : "Policy Mapping",
|
||||||
|
"configKey" : "role-policy-mapping",
|
||||||
|
"configType" : "role-policy-mapping",
|
||||||
|
"rolePolicyMapping" : {
|
||||||
|
"maintainer" : [ "allow_read_write_variables_all" ],
|
||||||
|
"administrator" : [ "allow_read_write_variables_all" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
def parameters = [:]
|
|
||||||
parameters["default"] = "'1'"
|
|
||||||
|
|
||||||
def defaultFeatures = datasources.query("connect-features").processScope(contextScopeId, contextScopeTag).parameters(parameters).list();
|
|
||||||
|
|
||||||
def features = []
|
|
||||||
defaultFeatures.each { val -> features+= val.key }
|
|
||||||
|
|
||||||
features
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"name" : "Policy Mapping",
|
|
||||||
"configKey" : "role-policy-mapping",
|
|
||||||
"configType" : "role-policy-mapping",
|
|
||||||
"rolePolicyMapping" : {
|
|
||||||
"user" : [ "allow_read_write_variables_all" ],
|
|
||||||
"maintainer" : [ "allow_delete_process_all" ],
|
|
||||||
"administrator" : [ "allow_delete_process_all" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue