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: 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_main_repository: http://ftp.debian.org/debian | ||||
| debian_security_repository: http://security.debian.org | ||||
|   | ||||
| @@ -19,3 +19,5 @@ deploy_username: "deploy" | ||||
|  | ||||
| fail2ban_ignorelist: | ||||
|   - 10.0.0.0/8 | ||||
|  | ||||
| cpu_governor: "ondemand" | ||||
|   | ||||
| @@ -251,6 +251,7 @@ | ||||
|       - lzop | ||||
|       - xz-utils | ||||
|       - haveged | ||||
|       - cpufrequtils | ||||
|       - ipmitool | ||||
|       - grub-efi | ||||
|       - plymouth | ||||
| @@ -324,6 +325,21 @@ | ||||
|     - /etc/sysctl.d/pvc.conf | ||||
|   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 | ||||
| - name: write the sudoers file | ||||
|   template: | ||||
| @@ -963,9 +979,10 @@ | ||||
|     enabled: yes | ||||
|   with_items: | ||||
|     - acpid | ||||
|     - rsyslog | ||||
|     - postfix | ||||
|     - cpufrequtils | ||||
|     - ntp | ||||
|     - postfix | ||||
|     - rsyslog | ||||
|     - ssh | ||||
|   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 | ||||
| LC_ALL=en_CA.UTF-8 | ||||
| LANG=en_CA.UTF-8 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user