✨ feat(infrastructure): introduce ansible deployment for taler services
- add ansible playbooks and roles for deploying taler exchange and merchant
- configure PostgreSQL, GNU Taler repositories, and services
🔧 chore(config): provide example env and gitignore for sensitive files
- create .env-example with placeholders for sensitive info
- add .gitignore entries for .env and common editor files
			
			
This commit is contained in:
		
							parent
							
								
									ca89a06864
								
							
						
					
					
						commit
						fdc9234540
					
				
					 18 changed files with 525 additions and 0 deletions
				
			
		
							
								
								
									
										53
									
								
								roles/postgres/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								roles/postgres/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,53 @@
 | 
			
		|||
---
 | 
			
		||||
- name: Ensure PostgreSQL server packages are present
 | 
			
		||||
  ansible.builtin.apt:
 | 
			
		||||
    name:
 | 
			
		||||
      - postgresql
 | 
			
		||||
      - python3-psycopg2
 | 
			
		||||
    state: present
 | 
			
		||||
 | 
			
		||||
- name: Ensure PostgreSQL service is running
 | 
			
		||||
  ansible.builtin.service:
 | 
			
		||||
    name: postgresql
 | 
			
		||||
    state: started
 | 
			
		||||
    enabled: true
 | 
			
		||||
 | 
			
		||||
- name: Create exchange database user
 | 
			
		||||
  community.postgresql.postgresql_user:
 | 
			
		||||
    name: "{{ taler_config.db.exchange.user }}"
 | 
			
		||||
    password: "{{ taler_config.db.exchange.password | default(omit) }}"
 | 
			
		||||
    login_user: "{{ taler_config.db.admin_user }}"
 | 
			
		||||
    login_password: "{{ taler_config.db.admin_password | default(omit) }}"
 | 
			
		||||
    login_host: "{{ taler_config.db.host }}"
 | 
			
		||||
    port: "{{ taler_config.db.port }}"
 | 
			
		||||
  no_log: true
 | 
			
		||||
 | 
			
		||||
- name: Create merchant database user
 | 
			
		||||
  community.postgresql.postgresql_user:
 | 
			
		||||
    name: "{{ taler_config.db.merchant.user }}"
 | 
			
		||||
    password: "{{ taler_config.db.merchant.password | default(omit) }}"
 | 
			
		||||
    login_user: "{{ taler_config.db.admin_user }}"
 | 
			
		||||
    login_password: "{{ taler_config.db.admin_password | default(omit) }}"
 | 
			
		||||
    login_host: "{{ taler_config.db.host }}"
 | 
			
		||||
    port: "{{ taler_config.db.port }}"
 | 
			
		||||
  no_log: true
 | 
			
		||||
 | 
			
		||||
- name: Ensure exchange database exists
 | 
			
		||||
  community.postgresql.postgresql_db:
 | 
			
		||||
    name: "{{ taler_config.db.exchange.name }}"
 | 
			
		||||
    owner: "{{ taler_config.db.exchange.user }}"
 | 
			
		||||
    encoding: UTF8
 | 
			
		||||
    login_user: "{{ taler_config.db.admin_user }}"
 | 
			
		||||
    login_password: "{{ taler_config.db.admin_password | default(omit) }}"
 | 
			
		||||
    login_host: "{{ taler_config.db.host }}"
 | 
			
		||||
    port: "{{ taler_config.db.port }}"
 | 
			
		||||
 | 
			
		||||
- name: Ensure merchant database exists
 | 
			
		||||
  community.postgresql.postgresql_db:
 | 
			
		||||
    name: "{{ taler_config.db.merchant.name }}"
 | 
			
		||||
    owner: "{{ taler_config.db.merchant.user }}"
 | 
			
		||||
    encoding: UTF8
 | 
			
		||||
    login_user: "{{ taler_config.db.admin_user }}"
 | 
			
		||||
    login_password: "{{ taler_config.db.admin_password | default(omit) }}"
 | 
			
		||||
    login_host: "{{ taler_config.db.host }}"
 | 
			
		||||
    port: "{{ taler_config.db.port }}"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue