Fix buster detection
							parent
							
								
									322a1e8dd6
								
							
						
					
					
						commit
						4bab036827
					
				| 
						 | 
					@ -101,7 +101,7 @@ remplacés par une condition :
 | 
				
			||||||
  * pour tester les versions de Debian,
 | 
					  * pour tester les versions de Debian,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ```YAML
 | 
					    ```YAML
 | 
				
			||||||
    ansible_distribution_release == 'stretch'
 | 
					    ansible_lsb.codename == 'stretch'
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  * pour tester si c'est un CPU Intel x86_64,
 | 
					  * pour tester si c'est un CPU Intel x86_64,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
# Doesn't work on Debian Stretch
 | 
					# Doesn't work on Debian Stretch
 | 
				
			||||||
- name: Make Prometheus node-exporter listen on adm only
 | 
					- name: Make Prometheus node-exporter listen on adm only
 | 
				
			||||||
  when:
 | 
					  when:
 | 
				
			||||||
    - ansible_distribution_release == 'buster'
 | 
					    - ansible_lsb.codename == 'buster'
 | 
				
			||||||
  lineinfile:
 | 
					  lineinfile:
 | 
				
			||||||
    path: /etc/default/prometheus-node-exporter
 | 
					    path: /etc/default/prometheus-node-exporter
 | 
				
			||||||
    regexp: '^ARGS='
 | 
					    regexp: '^ARGS='
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,9 +24,9 @@
 | 
				
			||||||
# Doesn't work on Debian Stretch
 | 
					# Doesn't work on Debian Stretch
 | 
				
			||||||
- name: Make Prometheus snmp-exporter listen on adm only
 | 
					- name: Make Prometheus snmp-exporter listen on adm only
 | 
				
			||||||
  when:
 | 
					  when:
 | 
				
			||||||
    - ansible_distribution_release == 'buster'
 | 
					    - ansible_lsb.codename == 'buster'
 | 
				
			||||||
  lineinfile:
 | 
					  lineinfile:
 | 
				
			||||||
    path: /etc/default/prometheus-node-exporter
 | 
					    path: /etc/default/prometheus-snmp-exporter
 | 
				
			||||||
    regexp: '^ARGS='
 | 
					    regexp: '^ARGS='
 | 
				
			||||||
    line: "ARGS=\"--web.listen-address={{ ansible_fqdn }}:9116\""
 | 
					    line: "ARGS=\"--web.listen-address={{ ansible_fqdn }}:9116\""
 | 
				
			||||||
  notify: Restart prometheus-snmp-exporter
 | 
					  notify: Restart prometheus-snmp-exporter
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue