File tree Expand file tree Collapse file tree 3 files changed +8
-15
lines changed
Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 1919 when :
2020 - kdump_target.type | d(none) == 'ssh'
2121
22- - name : Get mode of /etc/ kdump.conf if it exists
22+ - name : Get mode of kdump configuration file if it exists
2323 stat :
24- path : /etc/kdump.conf
24+ path : " {{ __kdump_conf_file }} "
2525 register : __kdump_conf
2626
27- - name : Generate /etc/ kdump.conf
27+ - name : Generate kdump configuration file
2828 template :
29- src : kdump.conf .j2
30- dest : /etc/kdump.conf
29+ src : " {{ __kdump_conf_file.split('/')[-1] }} .j2"
30+ dest : " {{ __kdump_conf_file }} "
3131 backup : true
3232 mode : " {{ __kdump_conf.stat.mode | d('0644') }}"
3333 notify : Restart kdump
34- when : ansible_facts['os_family'] == 'RedHat'
35-
36- - name : Generate /etc/default/kdump-tools
37- template :
38- src : kdump-tools.j2
39- dest : /etc/default/kdump-tools
40- backup : true
41- mode : " {{ __kdump_conf.stat.mode | d('0644') }}"
42- notify : Restart kdump
43- when : ansible_facts['distribution'] in ['Ubuntu']
4434
4535- name : Find out reserved memory for the crash kernel
4636 slurp :
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ __kdump_packages:
66 - linux-crashdump
77 - openssh-client
88
9+ __kdump_conf_file : /etc/default/kdump-tools
910__kdump_service : kdump-tools
Original file line number Diff line number Diff line change @@ -45,3 +45,5 @@ __kdump_is_rh_distro_fedora: "{{ ansible_distribution in __kdump_rh_distros_fedo
4545# END - DO NOT EDIT THIS BLOCK - rh distros variables
4646
4747__kdump_service : kdump
48+
49+ __kdump_conf_file : /etc/kdump.conf
You can’t perform that action at this time.
0 commit comments