Add option for setting CPU governor
Allows the administrator to set a CPU frequency governor if they need to, though the default of ondemand is usually sufficient.
This commit is contained in:
		| @@ -19,6 +19,10 @@ recursive_dns_search_domains: | |||||||
| # Cluster hardware model, used in pvc_user_configuration and grub_configuration below | # Cluster hardware model, used in pvc_user_configuration and grub_configuration below | ||||||
| cluster_hardware: default | cluster_hardware: default | ||||||
|  |  | ||||||
|  | # CPU governor, sets power and performance statistics of the system CPUs; default is ondemand | ||||||
|  | # > Valid options are (usually): conservative, ondemand, powersave, userspace, performance, schedutil | ||||||
|  | cpu_governor: ondemand | ||||||
|  |  | ||||||
| # Debian package repository URL | # Debian package repository URL | ||||||
| debian_main_repository: http://ftp.debian.org/debian | debian_main_repository: http://ftp.debian.org/debian | ||||||
| debian_security_repository: http://security.debian.org | debian_security_repository: http://security.debian.org | ||||||
|   | |||||||
| @@ -19,3 +19,5 @@ deploy_username: "deploy" | |||||||
|  |  | ||||||
| fail2ban_ignorelist: | fail2ban_ignorelist: | ||||||
|   - 10.0.0.0/8 |   - 10.0.0.0/8 | ||||||
|  |  | ||||||
|  | cpu_governor: "ondemand" | ||||||
|   | |||||||
| @@ -251,6 +251,7 @@ | |||||||
|       - lzop |       - lzop | ||||||
|       - xz-utils |       - xz-utils | ||||||
|       - haveged |       - haveged | ||||||
|  |       - cpufrequtils | ||||||
|       - ipmitool |       - ipmitool | ||||||
|       - grub-efi |       - grub-efi | ||||||
|       - plymouth |       - plymouth | ||||||
| @@ -324,6 +325,21 @@ | |||||||
|     - /etc/sysctl.d/pvc.conf |     - /etc/sysctl.d/pvc.conf | ||||||
|   tags: base-system |   tags: base-system | ||||||
|  |  | ||||||
|  | # cpufreq | ||||||
|  | - name: write the cpufrequtils governor | ||||||
|  |   template: | ||||||
|  |     src: etc/default/cpufrequtils.j2 | ||||||
|  |     dest: /etc/default/cpufrequtils | ||||||
|  |   register: cpufrequtils | ||||||
|  |   tags: base-system | ||||||
|  |  | ||||||
|  | - name: activate cpufrequtils governor | ||||||
|  |   service: | ||||||
|  |     name: cpufrequtils | ||||||
|  |     state: restarted | ||||||
|  |   when: cpufrequtils.changed | ||||||
|  |   tags: base-system | ||||||
|  |  | ||||||
| # sudo | # sudo | ||||||
| - name: write the sudoers file | - name: write the sudoers file | ||||||
|   template: |   template: | ||||||
| @@ -963,9 +979,10 @@ | |||||||
|     enabled: yes |     enabled: yes | ||||||
|   with_items: |   with_items: | ||||||
|     - acpid |     - acpid | ||||||
|     - rsyslog |     - cpufrequtils | ||||||
|     - postfix |  | ||||||
|     - ntp |     - ntp | ||||||
|  |     - postfix | ||||||
|  |     - rsyslog | ||||||
|     - ssh |     - ssh | ||||||
|   tags: base-services |   tags: base-services | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								roles/base/templates/etc/default/cpufrequtils.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								roles/base/templates/etc/default/cpufrequtils.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | # CPU Frequency Utils configuration | ||||||
|  | # {{ ansible_managed }} | ||||||
|  | GOVERNOR="{{ cpu_governor }}" | ||||||
| @@ -1,3 +1,5 @@ | |||||||
|  | # Locales configuration | ||||||
|  | # {{ ansible_managed }} | ||||||
| LANGUAGE=en_CA.UTF-8 | LANGUAGE=en_CA.UTF-8 | ||||||
| LC_ALL=en_CA.UTF-8 | LC_ALL=en_CA.UTF-8 | ||||||
| LANG=en_CA.UTF-8 | LANG=en_CA.UTF-8 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user