blob: decda18649d90c95714e1ebb117441fb71bae0c8 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
---
# file: roles/vexx_hosts/tasks/main.yaml
- name: Ensure the system exists in Cobbler
cobbler_system:
host: "{{ cobbler_hostname }}"
port: 60080
interfaces:
br1:
ipaddress: "{{ ansible_default_ipv4.address }}"
macaddress: "{{ ansible_default_ipv4.macaddress }}"
name: "{{ hostname }}"
password: "{{ cobbler_password }}"
properties:
hostname: "{{ hostname }}"
gateway: "{{ ansible_default_ipv4.gateway }}"
profile: "{{ cobbler_profile }}"
name_servers: "{{ name_servers }}"
kickstart: "/var/lib/cobbler/kickstarts/{{ cobbler_profile }}.seed"
kernel_options: '"interface={{ ansible_default_ipv4.interface }}"'
netboot_enabled: yes
username: "{{ cobbler_username }}"
use_ssl: no
validate_certs: no
when: provision_enabled
delegate_to: localhost
tags:
- cobbler-include
- name: Commit Cobbler changes
cobbler_sync:
host: "{{ cobbler_hostname }}"
port: 60080
password: "{{ cobbler_password }}"
username: "{{ cobbler_username }}"
use_ssl: no
validate_certs: no
run_once: yes
when: provision_enabled
delegate_to: localhost
register: __included_in_cobbler
notify:
- "Boot from network"
- "Reboot server"
tags:
- cobbler-include
- meta: flush_handlers
|