summaryrefslogtreecommitdiff
path: root/test/legacy
diff options
context:
space:
mode:
authorRémy Léone <remy.leone@gmail.com>2018-08-31 20:02:40 +0200
committeransibot <ansibot@users.noreply.github.com>2018-08-31 14:02:40 -0400
commit5cf9644003eeb1936f9c9f269e6f979fcc913b8d (patch)
tree2af9b9c6ad88037a0f561a88c859743c39dde976 /test/legacy
parentd2570959767917b5b40ad6a4da7297a2844b4a8b (diff)
downloadansible-5cf9644003eeb1936f9c9f269e6f979fcc913b8d.tar.gz
Add an user facts module for Online (#44709)
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