aboutsummaryrefslogtreecommitdiff
path: root/example.yml
diff options
context:
space:
mode:
Diffstat (limited to 'example.yml')
-rw-r--r--example.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/example.yml b/example.yml
new file mode 100644
index 0000000..7f7e36e
--- /dev/null
+++ b/example.yml
@@ -0,0 +1,26 @@
+---
+- hosts: localhost
+ tasks:
+ - name: Create a host in Foreman
+ foremanhost:
+ name: foobar
+ hostgroup: Medium/jenkins/blue
+ state: present
+ json: "{{ lookup('template', 'example.json') }}"
+ api_user: foreman
+ api_password: changeme
+ api_url: https://127.0.0.1
+ ssl_verify: False
+ register: result
+
+ - debug:
+ msg: Got "{{ result }}"
+
+ - name: Delete a host in Foreman
+ foremanhost:
+ name: foobar.example.com
+ state: absent
+ api_user: foreman
+ api_password: changeme
+ api_url: https://127.0.0.1
+ ssl_verify: False