summaryrefslogtreecommitdiff
path: root/test/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'test/legacy')
-rw-r--r--test/legacy/online.yml7
-rw-r--r--test/legacy/roles/online_user_facts/tasks/main.yml14
2 files changed, 21 insertions, 0 deletions
diff --git a/test/legacy/online.yml b/test/legacy/online.yml
new file mode 100644
index 0000000000..108663c269
--- /dev/null
+++ b/test/legacy/online.yml
@@ -0,0 +1,7 @@
+---
+- hosts: localhost
+ gather_facts: no
+ connection: local
+
+ roles:
+ - { role: online_user_facts, tags: test_online_user_facts }
diff --git a/test/legacy/roles/online_user_facts/tasks/main.yml b/test/legacy/roles/online_user_facts/tasks/main.yml
new file mode 100644
index 0000000000..6603ef4cc6
--- /dev/null
+++ b/test/legacy/roles/online_user_facts/tasks/main.yml
@@ -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