Conversation
Signed-off-by: Fernando <fernando.alcocer.ochoa@ibm.com>
Signed-off-by: Fernando <fernando.alcocer.ochoa@ibm.com>
| @@ -9,6 +9,7 @@ postgres_version: "16" | |||
| maas_version: "3.6" | |||
There was a problem hiding this comment.
commit message: this is a "task", not a module
There was a problem hiding this comment.
I will squash all my commits later.
| existing_end_ips: "{{ ip_ranges_raw.stdout | from_json | map(attribute='end_ip') | list }}" | ||
|
|
||
| - name: Create IP Range for {{ subnet_name }} subnet | ||
| command: "maas {{ maas_admin_username }} ipranges create type={{ subnet_data.ip_range_type }} start_ip={{ subnet_data.start_ip }} end_ip={{ subnet_data.end_ip }}" |
There was a problem hiding this comment.
subnet= is also required
There was a problem hiding this comment.
I am re-configuring all the DHCP task, because right now for our needs is useless.
There was a problem hiding this comment.
Did you reconfigure the tasks?
| existing_start_ips: "{{ ip_ranges_raw.stdout | from_json | map(attribute='start_ip') | list }}" | ||
| existing_end_ips: "{{ ip_ranges_raw.stdout | from_json | map(attribute='end_ip') | list }}" |
There was a problem hiding this comment.
What was the design decision behind this? Why not search for the cidr in maas admin ipranges read output?
There was a problem hiding this comment.
I am re-configuring all the DHCP task, because right now for our needs is useless.
|
|
||
| # This section verifies if the snippets already exist and creates the name variables | ||
| - name: Get current snippet names | ||
| command: bash -c "maas {{ maas_admin_username }} dhcpsnippets read" |
There was a problem hiding this comment.
I am re-configuring all the DHCP task, because right now for our needs is useless.
|
The README should mention that the MAAS server should have a network interface on every subnet prior to running the playbook. And why. |
|
The ansible should handle:
|
| vlan_id: "{{ (subnet_info.stdout | from_json).id }}" | ||
|
|
||
| - name: Enable 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].split('.')[0] }} secondary_rack={{ groups['maas_rack_server'][0].split('.')[0] }}" |
There was a problem hiding this comment.
primary_rack={{ groups['maas_region_rack_server'][0].split('.')[0] }} secondary_rack={{ groups['maas_rack_server'][0].split('.')[0] }}
Why?
There was a problem hiding this comment.
I configured this playbook to run on at least 2 MAAS servers in order to have HA, that command enables DHCP on the region controller but in order to do the same on the secondary rack you need to run the command specifying the secondary rack.
roles/maas/tasks/config_maas.yml
Outdated
| mode: '0644' | ||
|
|
||
| - name: Check curtin scripts directory | ||
| shell: "ls {{ maas_home_dir }}/usr/lib/python3/dist-packages/curtin/commands/install_grub.py" |
There was a problem hiding this comment.
The stat module would be more appropriate
| 94_configure_sudo: ["curtin", "in-target", "--", "sh", "-c", "printf '%%sudo ALL=(ALL) NOPASSWD: ALL\nDefaults !requiretty\nDefaults visiblepw' >> /etc/sudoers.d/cephlab_sudo"] | ||
| 96_create_ssh_directory: ["curtin", "in-target", "--", "sh", "-c", "mkdir -p /home/cm/.ssh"] | ||
| 98_copy_ssh_keys_cm: ["curtin", "in-target", "--", "sh", "-c", "echo '{{ cm_user_ssh_keys|join('\n') }}' >> /home/cm/.ssh/authorized_keys"] | ||
| block: |2 |
There was a problem hiding this comment.
why change the indent level and add this weird indent-removal character?
There was a problem hiding this comment.
When you add the block inside the curtin script you need to use the exact indent level the file already has otherwise curtin will ignore those commands.
| @@ -49,15 +49,13 @@ | |||
|
|
|||
There was a problem hiding this comment.
why are these changes in this commit? config_maas.yml existed before the addition of console=, yes?
There was a problem hiding this comment.
At the end I will just squash all my commits together, but you are right, I will try to separate my commits better in order to do this review process easier.
roles/maas/tasks/config_maas.yml
Outdated
| when: "maas_install_method == 'snap' and not maas_x1.stat.exists" | ||
| register: maas_snap | ||
|
|
||
| - name: Unsquahs MAAS FS |
Signed-off-by: Fernando <fernando.alcocer.ochoa@ibm.com>
…hings and things that were added with the latest tasks. Signed-off-by: Fernando <fernando.alcocer.ochoa@ibm.com>
|
@falcocer-ibm is this ready to go now? |
… of shell commands for improved reliability and clarity
No description provided.