mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	Certbot and Nginx disappeared in Ansible conf
This commit is contained in:
		
							
								
								
									
										21
									
								
								ansible/roles/4-certbot/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								ansible/roles/4-certbot/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
---
 | 
			
		||||
- name: Install basic APT packages
 | 
			
		||||
  apt:
 | 
			
		||||
    update_cache: true
 | 
			
		||||
    name:
 | 
			
		||||
      - certbot
 | 
			
		||||
      - python3-certbot-nginx
 | 
			
		||||
  register: pkg_result
 | 
			
		||||
  retries: 3
 | 
			
		||||
  until: pkg_result is succeeded
 | 
			
		||||
 | 
			
		||||
- name: Create /etc/letsencrypt/conf.d
 | 
			
		||||
  file:
 | 
			
		||||
    path: /etc/letsencrypt/conf.d
 | 
			
		||||
    state: directory
 | 
			
		||||
 | 
			
		||||
- name: Add Certbot configuration
 | 
			
		||||
  template:
 | 
			
		||||
    src: "letsencrypt/conf.d/nk20.ini.j2"
 | 
			
		||||
    dest: "/etc/letsencrypt/conf.d/nk20.ini"
 | 
			
		||||
    mode: 0644
 | 
			
		||||
@@ -0,0 +1,20 @@
 | 
			
		||||
{{ ansible_managed | comment }}
 | 
			
		||||
 | 
			
		||||
# To generate the certificate, please use the following command
 | 
			
		||||
# certbot --config /etc/letsencrypt/conf.d/nk20.ini certonly
 | 
			
		||||
 | 
			
		||||
# Use a 4096 bit RSA key instead of 2048
 | 
			
		||||
rsa-key-size = 4096
 | 
			
		||||
 | 
			
		||||
# Always use the staging/testing server
 | 
			
		||||
# server = https://acme-staging.api.letsencrypt.org/directory
 | 
			
		||||
 | 
			
		||||
# Uncomment and update to register with the specified e-mail address
 | 
			
		||||
email = notekfet2020@lists.crans.org
 | 
			
		||||
 | 
			
		||||
# Uncomment to use a text interface instead of ncurses
 | 
			
		||||
text = True
 | 
			
		||||
 | 
			
		||||
# Use DNS-01 challenge
 | 
			
		||||
authenticator = nginx
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user