frank6866.cobbler

Cobbler

This guide explains how to set up Cobbler.

Role Variables

---

### Cobbler Server Configuration
cobbler_default_password: changE_me                # Change this password
cobbler_default_time_zone: "Asia/Shanghai"       # Change to your timezone (e.g., America/New_York)
cobbler_manage_dhcp: 1                             # Enable DHCP management (1 for yes)
cobbler_pxe_just_once: 1                           # PXE boot once
cobbler_server: 192.168.168.200                    # Cobbler server IP
cobbler_next_server: 192.168.168.200               # Next server IP
cobbler_subnet: 192.168.168.0                       # Subnet
cobbler_netmask: 255.255.255.0                     # Netmask
cobbler_dynamic_bootp_start: 192.168.168.128      # Start of dynamic DHCP range
cobbler_dynamic_bootp_end: 192.168.168.172        # End of dynamic DHCP range
cobbler_routers: 192.168.168.1                     # Router IP
cobbler_domain_name_servers: 192.168.168.1         # DNS server IP
cobbler_subnet_mask: 255.255.255.0                 # Subnet mask

# Cobbler Web Configuration
cobbler_install_web: true                           # Install the web interface
cobbler_web_user_pwd:
 - user_name: cobbler
   password: Change!me
 - user_name: test1
   password: Change@me

# Distributions to Import
cobbler_distros:
  - distro_name: CentOS-7.1-sda                      # Name of the distribution
    device_or_iso_path: /dev/sr0                     # Path to ISO or device
    arch: x86_64                                       # Architecture type
    kickstart_file_name: centos7-customized-sda      # Kickstart file name

# Optional: Public Keys for Root
cobbler_root_public_keys:
  - xxxxxxxx                                          # Replace with actual public key

Required Variables

You need to set these variables for each host:

cobbler_default_password: to@change                  # Password to change
cobbler_server: 192.168.168.202                      # Cobbler server IP
cobbler_next_server: 192.168.168.202                 # Next server IP
cobbler_subnet: 192.168.168.0                         # Subnet
cobbler_netmask: 255.255.255.0                       # Netmask
cobbler_dynamic_bootp_start: 192.168.168.128        # Start of dynamic DHCP range
cobbler_dynamic_bootp_end: 192.168.168.172          # End of dynamic DHCP range

Example Inventory File

[cobbler]
vagrant1

Example Host Variables File for vagrant1

---

# Required Variables
cobbler_default_password: to@change                  # Password to change
cobbler_server: 172.16.7.18                          # Cobbler server IP
cobbler_next_server: 172.16.7.18                     # Next server IP
cobbler_subnet: 172.16.7.0                            # Subnet
cobbler_netmask: 255.255.255.0                       # Netmask
cobbler_dynamic_bootp_start: 172.16.7.192            # Start of dynamic DHCP range
cobbler_dynamic_bootp_end: 172.16.7.208              # End of dynamic DHCP range

# Optional Variables
cobbler_distros:
  - distro_name: CentOS-7.1
    device_or_iso_path: /dev/sr0                      # Path to ISO or device
    arch: x86_64                                       # Architecture type

cobbler_install_web: true                             # Install the web interface
cobbler_web_user_pwd:
  - user_name: cobbler
    password: to!change                                # Change this password

Optional Variables

# Set the timezone
cobbler_default_time_zone: "Asia/Shanghai"        # Change to your timezone (e.g., America/New_York)

# Routers for PXE Client
cobbler_routers: 192.168.168.1                      # Router IP

# DNS for PXE Client
cobbler_domain_name_servers: 192.168.168.1          # DNS server IP

# Import a Distribution and Profile
cobbler_distros:
  - distro_name: CentOS-7.1
    device_or_iso_path: /dev/sr0                     # Path to ISO or device
    arch: x86_64                                       # Architecture type

# Install Cobbler Web Interface
cobbler_install_web: true                             # Install the web interface
cobbler_web_user_pwd:
  - user_name: cobbler
    password: Change!me                                # Change this password

Example Playbook

- hosts: cobbler
  become: true                                         # Run as superuser
  roles:
  - frank6866.cobbler                                  # Role to include

Test Command

To test your setup, run:

$ sudo cobbler system add --name=pxe-test --profile=CentOS-7.1-sda-x86_64 --hostname=hn-pxe-test --mac=08:00:27:95:9F:2B --ip-address=192.168.168.199 --subnet=255.255.255.0 --gateway=192.168.168.1 --static=1 --interface=not_used

License

This documentation is licensed under the MIT License.

Informazioni sul progetto

Deploying cobbler

Installa
ansible-galaxy install frank6866.cobbler
Licenza
Unknown
Download
626
Proprietario