aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-06-16 23:02:00 +0200
committerGuido Günther <agx@sigxcpu.org>2016-06-17 14:50:54 +0200
commit9c6c4efdab172c005958f08a30f91fadf8268f03 (patch)
tree8cc351f10ae276a1c3b75b8989efcb729edcea2e
parent5625919c37b1f2f13bc78c64172482326587dfb5 (diff)
Update example
-rw-r--r--README.md11
-rw-r--r--example.json21
-rw-r--r--example.yml3
3 files changed, 7 insertions, 28 deletions
diff --git a/README.md b/README.md
index 0b63857..2ad5986 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,13 @@
-A simple module to create hosts in [the Foreman][] via [Ansible][]
+A simple module to create image based VMs in [the Foreman][] via [Ansible][]
+
+For setting up Foreman itself check out the excellent [ansible-module-foreman][].
Usage:
ansible-playbook --module-path . -c local -i localhost, example.yml
-The file example.yml has an example.
-
-Simple example:
-
- - foremanhost: name=foo hostgroup=bar state=present api_user=foreman api_password=changeme api_url: https://127.0.0.1
+The file [example.yml][] has an example.
[the Foreman]: http://theforeman.org
[Ansible]: http://ansible.com
+[ansible-module-foreman]: https://github.com/Nosmoht/ansible-module-foreman
diff --git a/example.json b/example.json
deleted file mode 100644
index abca893..0000000
--- a/example.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "host": {
- "provision_method": "image",
- "build": true,
- "enabled": true,
- "managed": true,
- "subnet_id": 1,
- "location_id": 1,
- "compute_resource_id": 1,
- "image_id": 1,
- "compute_attributes": {
- "start": "1"
- }
- },
- "interfaces": {
- "0": {
- "primary": true,
- "provision": true
- }
- }
-}
diff --git a/example.yml b/example.yml
index 7f7e36e..b06c8f7 100644
--- a/example.yml
+++ b/example.yml
@@ -5,8 +5,9 @@
foremanhost:
name: foobar
hostgroup: Medium/jenkins/blue
+ compute_resource: libvirt
state: present
- json: "{{ lookup('template', 'example.json') }}"
+ image: Jessie
api_user: foreman
api_password: changeme
api_url: https://127.0.0.1