-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy pathmain.yml
More file actions
58 lines (50 loc) · 2.03 KB
/
main.yml
File metadata and controls
58 lines (50 loc) · 2.03 KB
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
49
50
51
52
53
54
55
56
57
58
---
- name: 'Setup CentOS 9 provisioning'
import_tasks: configure_centos_9.yml
- name: 'Setup Fedora 27 provisioning'
import_tasks: configure_fedora_27.yml
- name: 'Setup Debian 9.3 provisioning'
import_tasks: configure_debian_9_3.yml
- name: 'Setup Ubuntu 17.10 provisioning'
import_tasks: configure_ubuntu_17_10.yml
# TODO verify - should not be needed, DNS should work just fine
- name: 'set unattended_url'
shell: >
{{ foreman_provisioning_hammer }} settings set --name unattended_url --value 'http://{{ foreman_provisioning_ip_address }}'
- name: 'find hostgroup Base'
shell: >
{{ foreman_provisioning_hammer }} hostgroup info --name 'Base'
register: foreman_provisioning_hostgroup_base
ignore_errors: True
- name: 'create hostgroup Base'
shell: >
{{ foreman_provisioning_hammer }} hostgroup create
--name 'Base'
--architecture x86_64
--domain {{ foreman_provisioning_domain }}
--environment production
--puppet-ca-proxy-id {{ foreman_provisioning_smart_proxy.Id }}
--puppet-proxy-id {{ foreman_provisioning_smart_proxy.Id }}
--subnet '{{ foreman_provisioning_network }}/24'
--compute-profile libvirt-profile
--compute-resource libvirt
--root-pass changeme
--pxe-loader "PXELinux BIOS"
--organization '{{ foreman_provisioning_organization }}'
{{ foreman_provisioning_hammer_taxonomy_params }}
when: foreman_provisioning_hostgroup_base.stderr.find('not found') != -1
- name: 'find hostgroup CentOS 7'
shell: >
{{ foreman_provisioning_hammer }} hostgroup info --name 'CentOS 7 Mirror'
register: foreman_provisioning_hostgroup_centos_mirror
ignore_errors: True
- name: 'create hostgroup CentOS 7 Mirror'
shell: >
{{ foreman_provisioning_hammer }} hostgroup create
--name 'CentOS 7 Mirror'
--operatingsystem 'CentOS 7'
--medium '{{ centos_medium_name }}'
--partition-table 'Kickstart default'
--parent 'Base'
{{ foreman_provisioning_hammer_taxonomy_params }}
when: foreman_provisioning_hostgroup_centos_mirror.stderr.find('not found') != -1