Merge branch 'ubuntu_support' into 'newinfra'
Add ubuntu support See merge request nounous/ansible!119certbot_on_virtu
						commit
						07796220a0
					
				| 
						 | 
				
			
			@ -4,6 +4,8 @@ ldap:
 | 
			
		|||
  base: "dc=crans,dc=org"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Parameters for debian mirror
 | 
			
		||||
# Parameters for debian and ubuntu mirror
 | 
			
		||||
debian_mirror: http://mirror.adm.crans.org/debian
 | 
			
		||||
ubuntu_mirror: http://mirror.adm.crans.org/ubuntu
 | 
			
		||||
debian_components: main non-free
 | 
			
		||||
ubuntu_components: main restricted universe multiverse
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								hosts
								
								
								
								
							
							
						
						
									
										1
									
								
								hosts
								
								
								
								
							| 
						 | 
				
			
			@ -110,6 +110,7 @@ jitsi.adm.crans.org
 | 
			
		|||
kenobi.adm.crans.org
 | 
			
		||||
roundcube.adm.crans.org
 | 
			
		||||
horde.adm.crans.org
 | 
			
		||||
bigbluebutton.adm.crans.org
 | 
			
		||||
 | 
			
		||||
[ovh_physical]
 | 
			
		||||
sputnik.adm.crans.org
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
{{ ansible_header | comment }}
 | 
			
		||||
 | 
			
		||||
{% if ansible_lsb.id == "Debian" %}
 | 
			
		||||
# Mises à jour de sécurité
 | 
			
		||||
deb     {{ debian_mirror }}-security {{ ansible_lsb.codename }}/updates {{ debian_components }}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -8,3 +9,13 @@ deb     {{ debian_mirror }} {{ ansible_lsb.codename }} {{ debian_components }}
 | 
			
		|||
 | 
			
		||||
# Dépôt pour mises à jour fréquentes (volatile)
 | 
			
		||||
deb     {{ debian_mirror }} {{ ansible_lsb.codename }}-updates {{ debian_components }}
 | 
			
		||||
{% elif ansible_lsb.id == "Ubuntu" %}
 | 
			
		||||
# Mises à jour de sécurité
 | 
			
		||||
deb     {{ ubuntu_mirror }} {{ ansible_lsb.codename }}-security {{ ubuntu_components }}
 | 
			
		||||
 | 
			
		||||
# Dépôt classique
 | 
			
		||||
deb     {{ ubuntu_mirror }} {{ ansible_lsb.codename }} {{ ubuntu_components }}
 | 
			
		||||
 | 
			
		||||
# Dépôt pour mises à jour fréquentes (volatile)
 | 
			
		||||
deb     {{ ubuntu_mirror }} {{ ansible_lsb.codename }}-updates {{ ubuntu_components }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
  retries: 3
 | 
			
		||||
  until: apt_result is succeeded
 | 
			
		||||
  when:
 | 
			
		||||
    - ansible_lsb.codename == 'buster'
 | 
			
		||||
    - ansible_lsb.codename != 'stretch'
 | 
			
		||||
 | 
			
		||||
# Prometheus 2 node is in stretch-backports
 | 
			
		||||
- name: Install Prometheus node-exporter (stretch-backports)
 | 
			
		||||
| 
						 | 
				
			
			@ -46,3 +46,15 @@
 | 
			
		|||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0755
 | 
			
		||||
  when: ansible_lsb.id == 'Debian'
 | 
			
		||||
 | 
			
		||||
# Install new APT textfile collector, it might be upstreamed one day
 | 
			
		||||
# https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/pull/35
 | 
			
		||||
- name: Patch APT textfile collector
 | 
			
		||||
  copy:
 | 
			
		||||
    src: apt.sh
 | 
			
		||||
    dest: /usr/share/prometheus-node-exporter-collectors/apt.sh
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0755
 | 
			
		||||
  when: ansible_lsb.id == 'Ubuntu'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue