mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-03 00:58:53 +00:00
Add an Online servers fact
This commit is contained in:
parent
4085d01617
commit
53886ecc9b
6 changed files with 192 additions and 3 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue