]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Modyfing serial and strategy in the main playbook and adding some modifications in...
authorFernando <fernando.alcocer.ochoa@ibm.com>
Fri, 9 May 2025 16:02:50 +0000 (10:02 -0600)
committerFernando <fernando.alcocer.ochoa@ibm.com>
Fri, 9 May 2025 16:02:50 +0000 (10:02 -0600)
maas.yml
roles/maas/README.md
roles/maas/tasks/config_dhcpd_subnet.yml

index 021e98b472c48ba9cceedaac5b0dc1334af420f7..f52a741b58edaa6ac77192f7d4a226d68fb9ae4b 100644 (file)
--- a/maas.yml
+++ b/maas.yml
@@ -1,7 +1,5 @@
 ---
 - hosts: maas
-  serial: 1
-  strategy: free
   roles:
     - maas
   become: true
index 1fc5cb943b7581faa19d27827e8e86f7ace37bd9..1e378080350314a3c9277e499cab0a22cafdfc59 100644 (file)
@@ -93,7 +93,7 @@ dhcp_maas_subnets: #This is a list of dictionaries, you can list here all the su
 
 This is large dictionary that gets parsed out into individual snippet files. Each top-level key (front and back in the example) will get its own snippet file created.
 
-Under each subnet, cidr, ipvar, and macvar are required. ipvar and macvar tell the Jinja2 template which IP address and MAC address should be used for each host in each subnet snippet, the value of those variables should correspond with a variable for each host in the inventory, if the variable is not defined in the inventory then that host will not be included into the subnet configuration.
+Under each subnet, cidr, ipvar, and macvar are required. ipvar and macvar tell the Jinja2 template which IP address and MAC address should be used for each host in each subnet snippet, the value of these variables should be the name of the variable that holds the ip address and mac address, respectively (for hosts that have more than one interface). That is, you might have "ipfront=1.2.3.4 ipback=5.6.7.8", and for the front subnet, 'ipvar' would be set to 'ipfront', and for the back network, 'ipvar' would be set to 'ipback', if those variables are not defined in the inventory then that host will not be included into the subnet configuration.
 
 Here's a line from our Ansible inventory host file
 
@@ -101,7 +101,7 @@ smithi001.front.sepia.ceph.com mac=0C:C4:7A:BD:15:E8 ip=172.21.15.1 ipmi=172.21.
 
 This will result in a static IP entry for smithi001-front with IP 172.21.15.1 and MAC 0C:C4:7A:BD:15:E8 in front_hosts snippet and a smithi001-ipmi entry with IP 172.21.47.1 with MAC 0C:C4:7A:6E:21:A7 in ipmi_hosts snippet.
 
-start_ip, end_ip and ip_range are required too in order to create an IP range. MAAS needs a range in order to enable DHCP on the subnet. In this case the ip_range is configured as dynamic, it could be dynamic or static.
+start_ip, end_ip and ip_range_type are required too in order to create an IP range. MAAS needs a range in order to enable DHCP on the subnet. In this case the ip_range_type is configured as dynamic, it could be dynamic or static.
 
 The classes are optional, they are groups of DHCP clients defined by specific criteria, allowing the possibility to apply custom DHCP options or behaviors to those groups. This enables more granular control over how DHCP services are delivered to different client types, like assigning specific IP addresses or configuring other network parameters based on device type or other characteristics. In this case we have virtual and lxc but you can include here any group you want with any name. In our specific case we are including into these groups hosts that match with an specific mac address criteria.
 
index 593c554e6fbd46a44629f6f291d803c7282cf080..6821ccb0f78fb102e836bd5b75f808177f89febb 100644 (file)
@@ -28,7 +28,7 @@
        vlan_id: "{{ subnet_info.stdout | from_json | json_query('vlan.id') }}"
    
    - name: Enabling DHCP on {{ subnet_name }} subnet
-     command: "maas {{ maas_admin_username }} vlan update {{ fabric_name }} {{ vlan_vid }} dhcp_on=True primary_rack={{ groups['maas_region_rack_server'][0] }}"
+     command: "maas {{ maas_admin_username }} vlan update {{ fabric_name }} {{ vlan_vid }} dhcp_on=True primary_rack={{ groups['maas_region_rack_server'][0] }} secondary_rack={{ groups['maas_rack_server'][0] }}"
    
    # This task creates the directory where the snippets are going to be copied