blob: b06c8f744db278660afcd0e032af50c21714ef9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
---
- hosts: localhost
tasks:
- name: Create a host in Foreman
foremanhost:
name: foobar
hostgroup: Medium/jenkins/blue
compute_resource: libvirt
state: present
image: Jessie
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
|