diff --git a/README.md b/README.md index 8baa920..1d4df57 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,9 @@ hosts_file_login_group_to_populate: "" hosts_file_extra_group_to_populate: "" -Using a custom inventory script to only write kickstart templates once per child group of a group by: +Using the custom inventory script to only write kickstart templates once per child group of a group by:
-hosts_file_use_custom_inventory: True
 hosts_file_group_to_populate: "pxe_bootable_nodes"
 hosts_file_inventory_location: "hosts"
 
diff --git a/defaults/main.yml b/defaults/main.yml index f35c673..907d100 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -26,7 +26,6 @@ hosts_file_login_group_to_populate: "{{ groups.login }}" hosts_file_extra_group_to_populate: "" #hosts_file_inventory_location points to where the ansible inventory file is -hosts_file_use_custom_inventory: False hosts_file_group_to_populate: "pxe_bootable_nodes" hosts_file_inventory_location: "hosts" diff --git a/tasks/redhat.yml b/tasks/redhat.yml index 6090445..4a7abc8 100644 --- a/tasks/redhat.yml +++ b/tasks/redhat.yml @@ -53,14 +53,7 @@ - name: print each host debug: var=item verbosity=1 with_items: "{{ hosts_file_my_group }}" - when: hosts_file_use_custom_inventory -- name: copy over kickstart file (new and faster style) +- name: copy over kickstart file template: src="kickstart.cfg" dest="{{ ksBootSrvDir }}/{{ hostvars[item].kickstart_profile }}" owner=apache group=apache mode=0644 with_items: "{{ hosts_file_my_group }}" - when: hosts_file_use_custom_inventory - -- name: copy over kickstart file (old style) - template: src="kickstart.cfg" dest="{{ ksBootSrvDir }}/{{ hostvars[item].kickstart_profile }}" owner=apache group=apache mode=0644 - with_items: "{{ groups.pxe_bootable_nodes }}" - when: hosts_file_use_custom_inventory == False diff --git a/tests/test.yml b/tests/test.yml index ee253e9..e98c710 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -13,7 +13,6 @@ - rootpwhash: "SHAFOOO" - hosts_file_login_group_to_populate: "" - hosts_file_inventory_location: "/ansible-role-pxe_config/tests/inventory" - - hosts_file_use_custom_inventory: True - hosts_file_extra_group_to_populate: "{{ groups.switches }}" pre_tasks: - name: touch hosts_file_to_populate