Add lego certificate service to ansible
This commit is contained in:
		
							parent
							
								
									5246a6b101
								
							
						
					
					
						commit
						068a8e2cd7
					
				
					 13 changed files with 212 additions and 0 deletions
				
			
		
							
								
								
									
										31
									
								
								roles/lego/vars/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								roles/lego/vars/main.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
---
 | 
			
		||||
lego_svc:
 | 
			
		||||
  name: lego
 | 
			
		||||
 | 
			
		||||
lego_env:
 | 
			
		||||
  ACME_DNS_API_BASE: https://{{ acme_dns.host }}
 | 
			
		||||
  ACME_DNS_STORAGE_PATH: /config/acme-dns-accounts.json
 | 
			
		||||
 | 
			
		||||
  LEGO_EMAIL: "{{ admin_email }}"
 | 
			
		||||
  LEGO_PATH: /data
 | 
			
		||||
 | 
			
		||||
lego_compose:
 | 
			
		||||
  watchtower: false
 | 
			
		||||
  network: false
 | 
			
		||||
  image: goacme/lego
 | 
			
		||||
  volumes:
 | 
			
		||||
    - ./config:/config:ro
 | 
			
		||||
    - "{{ certificates_path }}:/certificates"
 | 
			
		||||
    - data:/data
 | 
			
		||||
  file:
 | 
			
		||||
    services:
 | 
			
		||||
      app:
 | 
			
		||||
        restart: never
 | 
			
		||||
        network_mode: "host"
 | 
			
		||||
        entrypoint:
 | 
			
		||||
          - /lego
 | 
			
		||||
          - --accept-tos
 | 
			
		||||
          - --email={{ admin_email }}
 | 
			
		||||
          - --dns=acme-dns
 | 
			
		||||
    volumes:
 | 
			
		||||
      data:
 | 
			
		||||
		Reference in a new issue