feat(server): Update the time of last access for scan agent

!11 closes #5
This commit is contained in:
2024-02-24 22:00:46 +09:30
parent 181a3bdc44
commit 46f25ea616
2 changed files with 29 additions and 0 deletions

View File

@ -38,6 +38,24 @@
register: mysql_query_agent_details
- name: Update Scan Agent Last seen
community.mysql.mysql_query:
login_host: "{{ nofusscomputing_phpipam_scan_server.mysql_host }}"
login_port: "{{ nofusscomputing_phpipam_scan_server.mysql_port | default(3306) | int }}"
login_user: "{{ nofusscomputing_phpipam_scan_server.mysql_user }}"
login_password: "{{ nofusscomputing_phpipam_scan_server.mysql_password }}"
login_db: 'phpipam'
query: |-
UPDATE
scanAgents
SET
last_access = '{{ ('%Y-%m-%d %H:%M:%S' | strftime) }}'
WHERE
id = '{{ mysql_query_agent_details.query_result[0][0].id }}'
single_transaction: true
- name: Confirm Subnet Assignment
community.mysql.mysql_query:
login_host: "{{ nofusscomputing_phpipam_scan_server.mysql_host }}"