mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Add an user facts module for Online (#44709)
This commit is contained in:
parent
d257095976
commit
5cf9644003
6 changed files with 248 additions and 0 deletions
7
test/legacy/online.yml
Normal file
7
test/legacy/online.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
connection: local
|
||||
|
||||
roles:
|
||||
- { role: online_user_facts, tags: test_online_user_facts }
|
14
test/legacy/roles/online_user_facts/tasks/main.yml
Normal file
14
test/legacy/roles/online_user_facts/tasks/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
# ONLINE_TOKEN='XXX' ansible-playbook ./test/legacy/online.yml --tags test_online_user_facts
|
||||
|
||||
- name: Get user information and register it in a variable
|
||||
online_user_facts:
|
||||
register: user
|
||||
|
||||
- name: Display user variable
|
||||
debug:
|
||||
var: user
|
||||
|
||||
- name: Ensure retrieval of user facts is success
|
||||
assert:
|
||||
that:
|
||||
- user is success
|
Loading…
Add table
Add a link
Reference in a new issue