-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.yml
51 lines (45 loc) · 3.67 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
uberspace_csrf_field: '<input type=\"hidden\" name=\"_csrf_token\" value=\"(.*)\" />'
uberspace_password_field: '<input type=\"password\" (.*) value=\"(.*)\" onkeyup=(.*) />'
uberspace_html_ipv4address: '<th>IPv4-Adresse</th>\s*<td>\s*<code>(.*)</code>'
uberspace_html_ipv6address: '<th>IPv6-Adresse</th>\s*<td>\s*<code>(.*)</code>'
uberspace_html_hostkeyfingerprint: "<th>{{ item.upper() }}</th>\\s*<td><code>(.*)</code>"
uberspace_html_hostname: '<th>Hostname</th>\s*<td>\s*<code>(.*)</code>'
uberspace_html_balance: '<h2><a name=\"balance\"></a>Dein Kontostand</h2>\s*<p>\s*… beträgt derzeit <strong>(.*) €</strong>'
uberspace_html_currentprice: '<input type=\"text\" id=\"price\" name=\"price\" value=\"(.*)\" size=\"3\"'
uberspace_url_main: "https://dashboard.uberspace.de/"
uberspace_url_dashboard: "{{ uberspace_url_main }}dashboard/"
uberspace_price_crossfinanced_limit: 5
uberspace_price_crossfinanced_check: "{{ (uberspace_price_goal >= uberspace_price_crossfinanced_limit) or ((uberspace_price_goal < uberspace_price_crossfinanced_limit) and uberspace_price_crossfinanced_request) }}"
uberspace_domain_short_official: uber.space
uberspace_domain_official: "{{ uberspace_loginname }}.{{ uberspace_domain_short_official }}"
uberspace_mail: "{{ uberspace_loginname }}@{{ uberspace_domain_short_official }}"
uberspace_services_dir: "{{ uberspace_spacedir }}/etc/services.d"
uberspace_certificates_dir: "{{ uberspace_spacedir }}/etc/certificates"
uberspace_urls:
# dashboard: "{{ uberspace_url_main }}dashboard/"
registerform: "{{ uberspace_url_main }}register"
register: "{{ uberspace_url_main }}register/check_name?login={{ uberspace_loginname }}&AjaxRequestUniqueId={{ lookup('pipe','date +%s%5N') }}"
create: "{{ uberspace_url_main }}register/create"
login: "{{ uberspace_url_main }}login"
check: "{{ uberspace_url_dashboard }}ajax_state?AjaxRequestUniqueId={{ lookup('pipe','date +%s%5N') }}"
firstboot: "{{ uberspace_url_dashboard }}firstboot"
authentication: "{{ uberspace_url_dashboard }}authentication"
setwebpassword: "{{ uberspace_url_dashboard }}set_web_password"
setprice: "{{ uberspace_url_dashboard }}set_price"
addkey: "{{ uberspace_url_dashboard }}add_ssh_key"
datasheet: "{{ uberspace_url_dashboard }}datasheet"
delete: "{{ uberspace_url_dashboard }}delete"
deletequeue: "{{ uberspace_url_dashboard }}delete_queue"
deleteresult_register: "{{ uberspace_url_dashboard }}../register"
deleteresult_login: "{{ uberspace_url_dashboard }}../login"
accounting: "{{ uberspace_url_dashboard }}accounting"
while_u_wait: "{{ uberspace_url_dashboard }}register/../dashboard/while_u_wait"
uberspace_headers:
Cookie: "{{ uberspace_cookie }}"
csrftoken: "{{ formresult.content | regex_search(uberspace_csrf_field) | regex_replace(uberspace_csrf_field, '\\1') }}"
parsed_ipv4address: "{{ datasheetresult.content | regex_search(uberspace_html_ipv4address) | regex_replace(uberspace_html_ipv4address, '\\1')}}"
parsed_ipv6address: "{{ datasheetresult.content | regex_search(uberspace_html_ipv6address) | regex_replace(uberspace_html_ipv6address, '\\1')}}"
parsed_hostname: "{{ datasheetresult.content | regex_search(uberspace_html_hostname) | regex_replace(uberspace_html_hostname, '\\1')}}"
parsed_hostkeyfingerprint: "{{ datasheetresult.content | regex_search(uberspace_html_hostkeyfingerprint) | regex_replace(uberspace_html_hostkeyfingerprint, '\\1')}}"
parsed_balance: "{{ accountingresult.content | regex_search(uberspace_html_balance) | regex_replace(uberspace_html_balance, '\\1') | replace(',','.') | float }}"
parsed_currentprice: "{{ accountingresult.content | regex_search(uberspace_html_currentprice) | regex_replace(uberspace_html_currentprice, '\\1') | replace(',','.') | float }}"