mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2024-09-14 20:13:21 +02:00 
			
		
		
		
	Update postgres and prompts examples.
This commit is contained in:
		
							parent
							
								
									6ae99cdc7a
								
							
						
					
					
						commit
						12755b8961
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
  - name: ensure apt cache is up to date
 | 
			
		||||
    action: apt update_cache=yes
 | 
			
		||||
  - name: ensure packages are installed
 | 
			
		||||
    action: apt pkg=$item
 | 
			
		||||
    action: apt name={{item}}
 | 
			
		||||
    with_items:
 | 
			
		||||
        - postgresql
 | 
			
		||||
        - libpq-dev
 | 
			
		||||
| 
						 | 
				
			
			@ -32,10 +32,10 @@
 | 
			
		|||
 | 
			
		||||
  tasks:
 | 
			
		||||
  - name: ensure database is created
 | 
			
		||||
    action: postgresql_db db=$dbname
 | 
			
		||||
    action: postgresql_db db={{dbname}}
 | 
			
		||||
 | 
			
		||||
  - name: ensure user has access to database
 | 
			
		||||
    action: postgresql_user db=$dbname user=$dbuser password=$dbpassword priv=ALL
 | 
			
		||||
    action: postgresql_user db={{dbname}} user={{dbuser}} password={{dbpassword}} priv=ALL
 | 
			
		||||
 | 
			
		||||
  - name: ensure user does not have unnecessary privilege
 | 
			
		||||
    action: postgresql_user user=$dbuser role_attr_flags=NOSUPERUSER,NOCREATEDB
 | 
			
		||||
    action: postgresql_user user={{dbuser}} role_attr_flags=NOSUPERUSER,NOCREATEDB
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,11 +49,11 @@
 | 
			
		|||
 | 
			
		||||
  tasks:
 | 
			
		||||
 | 
			
		||||
  - name: imagine this did something interesting with $release_version
 | 
			
		||||
    action: shell echo foo >> /tmp/$release_version-alpha
 | 
			
		||||
  - name: imagine this did something interesting with {{release_version}}
 | 
			
		||||
    action: shell echo foo >> /tmp/{{release_version}}-alpha
 | 
			
		||||
 | 
			
		||||
  - name: look we crypted a password
 | 
			
		||||
    action: shell echo my password is $my_password2
 | 
			
		||||
    action: shell echo my password is {{my_password2}}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue