mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add an user facts module for Online (#44709)
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user