From 9c6c4efdab172c005958f08a30f91fadf8268f03 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 16 Jun 2016 23:02:00 +0200 Subject: Update example --- README.md | 11 +++++------ example.json | 21 --------------------- example.yml | 3 ++- 3 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 example.json 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 -- cgit v1.2.3