read some more values from account.txt
This commit is contained in:
parent
dfd5d4af55
commit
5ab02fc3a0
2 changed files with 4 additions and 98 deletions
|
|
@ -9,14 +9,14 @@
|
||||||
tasks:
|
tasks:
|
||||||
- name: Account data
|
- name: Account data
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
account: "{{ lookup('ansible.builtin.file','account.txt') | from_yaml }}"
|
account: "{{ lookup('ansible.builtin.file','../files/account.txt') | from_yaml }}"
|
||||||
|
|
||||||
- name: Set variables
|
- name: Set variables
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
aid: "{{ account.account.aid }}"
|
aid: "{{ account.account.aid }}"
|
||||||
mysterious_id: "{{ account.account.mysterious_id }}"
|
mysterious_id: "{{ account.account.mysterious_id }}"
|
||||||
|
channel_id: "{{ account.account.channel_id }}"
|
||||||
user_id: "{{ account.account.user_id }}"
|
user_id: "{{ account.account.user_id }}"
|
||||||
mysterious_id: "{{ account.account.mysterious_id }}"
|
|
||||||
|
|
||||||
- name: "Subscribe to info for RE 7"
|
- name: "Subscribe to info for RE 7"
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
|
|
@ -31,26 +31,9 @@
|
||||||
TE: trailers
|
TE: trailers
|
||||||
register: subscribe_re7
|
register: subscribe_re7
|
||||||
|
|
||||||
- name: "Print Result: Subscribe to RE 7"
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: "{{ subscribe_re7 }}"
|
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
subscription_id: "{{ subscribe_re7.json.svcResL[0].res.subscrId }}"
|
subscription_id: "{{ subscribe_re7.json.svcResL[0].res.subscrId }}"
|
||||||
|
|
||||||
- name: "Verify Subscription"
|
- name: "Print Result: Subscribe to RE 7"
|
||||||
ansible.builtin.uri:
|
|
||||||
url: "https://www.zuginfo.nrw/gate/?requestId={{ mysterious_id }}&hciMethod=SubscrDetails&hciVersion=1.24&hciClientType=WEB&hciClientVersion=10104&aid={{ aid }}&rnd={{ unix_time_millis }}"
|
|
||||||
method: POST
|
|
||||||
body: "{{ lookup('ansible.builtin.template','verify_subscription.json.j2') }}"
|
|
||||||
headers:
|
|
||||||
Accept-Encoding: gzip, deflate, br, zstd
|
|
||||||
Content-Type: application/json
|
|
||||||
Origin: https://www.zuginfo.nrw/
|
|
||||||
Referer: https://www.zuginfo.nrw/
|
|
||||||
TE: trailers
|
|
||||||
register: verify_subscription
|
|
||||||
|
|
||||||
- name: "Print Result: Verify Subscription"
|
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ verify_subscription }}"
|
msg: "{{ subscription_id }}"
|
||||||
|
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
{
|
|
||||||
"id": "{{ mysterious_id }}",
|
|
||||||
"ver": "1.24",
|
|
||||||
"lang": "deu",
|
|
||||||
"auth": {
|
|
||||||
"type": "AID",
|
|
||||||
"aid": "{{ aid }}"
|
|
||||||
},
|
|
||||||
"client": {
|
|
||||||
"id": "HAFAS",
|
|
||||||
"type": "WEB",
|
|
||||||
"name": "webapp",
|
|
||||||
"l": "vs_webapp",
|
|
||||||
"v": 10104
|
|
||||||
},
|
|
||||||
"formatted": false,
|
|
||||||
"ext": "VRR.1",
|
|
||||||
"svcReqL": [
|
|
||||||
{
|
|
||||||
"meth": "SubscrCreate",
|
|
||||||
"req": {
|
|
||||||
"statSubscr": {
|
|
||||||
"hysteresis": {
|
|
||||||
"himFltrL": [
|
|
||||||
{
|
|
||||||
"type": "HIMCAT",
|
|
||||||
"mode": "INC",
|
|
||||||
"value": "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "HIMCAT",
|
|
||||||
"mode": "INC",
|
|
||||||
"value": "4"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "HIMCAT",
|
|
||||||
"mode": "INC",
|
|
||||||
"value": "2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "HIMCAT",
|
|
||||||
"mode": "INC",
|
|
||||||
"value": "3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "HIMCAT",
|
|
||||||
"mode": "INC",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"jnyFltrL": [
|
|
||||||
{
|
|
||||||
"type": "LINEID",
|
|
||||||
"mode": "INC",
|
|
||||||
"value": 90407
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"serviceDays": {
|
|
||||||
"selectedWeekdays": "1111111",
|
|
||||||
"beginDate": "20250615",
|
|
||||||
"endDate": "20331211",
|
|
||||||
"beginTime": "000000",
|
|
||||||
"endTime": "235959"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userId": "{{ user_id }}",
|
|
||||||
"channels": [
|
|
||||||
{
|
|
||||||
"channelId": "{{ channel_id }}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"id": "1|5|"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue