mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add an Online servers fact
This commit is contained in:
committed by
Michael Scherer
parent
4085d01617
commit
53886ecc9b
@@ -4,4 +4,5 @@
|
||||
connection: local
|
||||
|
||||
roles:
|
||||
- { role: online_server_facts, tags: test_online_server_facts }
|
||||
- { role: online_user_facts, tags: test_online_user_facts }
|
||||
|
||||
14
test/legacy/roles/online_server_facts/tasks/main.yml
Normal file
14
test/legacy/roles/online_server_facts/tasks/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
# ONLINE_TOKEN='XXX' ansible-playbook ./test/legacy/online.yml --tags test_online_server_facts
|
||||
|
||||
- name: Get server information and register it in a variable
|
||||
online_server_facts:
|
||||
register: servers_facts
|
||||
|
||||
- name: Display server variable
|
||||
debug:
|
||||
var: servers_facts
|
||||
|
||||
- name: Ensure retrieval of servers facts is success
|
||||
assert:
|
||||
that:
|
||||
- servers_facts is success
|
||||
Reference in New Issue
Block a user