Skip to content

Commit

Permalink
Merge pull request #28 from jabl/remove-old-style-kickstart
Browse files Browse the repository at this point in the history
Remove old style kickstart generation.
  • Loading branch information
martbhell committed Sep 23, 2016
2 parents 2f55de1 + 9386cad commit 188aeae
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ hosts_file_login_group_to_populate: ""
hosts_file_extra_group_to_populate: ""
</pre>

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:

<pre>
hosts_file_use_custom_inventory: True
hosts_file_group_to_populate: "pxe_bootable_nodes"
hosts_file_inventory_location: "hosts"
</pre>
Expand Down
1 change: 0 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
9 changes: 1 addition & 8 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 188aeae

Please sign in to comment.