Skip to content

Commit

Permalink
remove 'when is defined' in main.yml (#28)
Browse files Browse the repository at this point in the history
Remove 'when is defined' for dostros/profils/systems

Remove conditions 'when is defined' for cobbler_distros,
cobbler_profiles and cobbler_systems, to avoid silent failure.

Set those vars empty as default.
(to avoid a breaking change caused by deleting "when is defined")

cobbler_distros: []
cobbler_profiles: []
cobbler_systems: []
  • Loading branch information
jsl6ul authored Apr 15, 2024
1 parent 7b44499 commit 21d5c30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ cobbler_autoinstall_templates: []
cobbler_settings:

# Cobbler distros (OS)
cobbler_distros: []
# cobbler_distros:
# - name: distro_name
# netboot: # Information about netboot files initrd and kernel
Expand All @@ -66,6 +67,7 @@ cobbler_settings:
# kernel: /var/lib/tftpboot/debian/11.2/debian-installer/amd64/linux

# Cobbler profiles
cobbler_profiles: []
# cobbler_profiles:
# - name: profile_name
# properties: # Dict of Cobbler properties, as defined in the plugin cobbler_profile
Expand All @@ -76,6 +78,9 @@ cobbler_settings:
# content: |
# any content to put in $SNIPPET('partition')

# Cobbler systems
cobbler_systems: []

## Dnsmasq
# To use Dnsmasq as DHCP and DNS servers managed by Cobbler, enable this
# module.
Expand Down
3 changes: 0 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,11 @@
- name: Configure distros
ansible.builtin.include_tasks:
file: "distros.yml"
when: cobbler_distros is defined

- name: Configure profiles
ansible.builtin.include_tasks:
file: "profiles.yml"
when: cobbler_profiles is defined

- name: Configure systems
ansible.builtin.include_tasks:
file: "systems.yml"
when: cobbler_systems is defined

0 comments on commit 21d5c30

Please sign in to comment.