 Trevor
		
			Trevor
		
		
		.png) 
		
		
		
		
		
	
			
		
		
			
					
		Hello RHA,
Got some questions for you Ansible warriors. The questions are based of the following playbook code:
--- - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version yum: name: httpd state: latest - name: write the apache config file template: src: /srv/httpd.j2 dest: /etc/httpd.conf notify: - restart apache - name: ensure apache is running service: name: httpd state: started handlers: - name: restart apache service: name: httpd state: restarted
Question #1: How many lists are there in this code?
Question #2: How many members are there in each list?
Question #3: Identify each member
Calling all Ansible powerlifters! Thanks in advance your contribution to this query.
 
		
		
		
		
		
	
			
		
		
			
					
		 Trevor
		
			Trevor
		
		
		.png) 
		
		
		
		
		
	
			
		
		
			
					
		Hello Matteo,
I called myself sending this query to a different group in the community. I didn't think you would see this because I did specifiy the Red Hat Academy label. Well, my intentions were good - I wanted to give you a reprieve :-)
Once again, you're response is correcting something in my understanding, or should I say lack of understanding, of the YAML syntax.
Thanks again Matteo. You've moved the needle forward a little bit more.
 
		
		
		
		
		
	
			
		
		
			
					
		don't try to trick me ;)
if you have another question wait 5 mins, i'm going to sleep :D
glad to be helpful
bye
 Trevor
		
			Trevor
		
		
		.png) 
		
		
		
		
		
	
			
		
		
			
					
		With my questions alone, you've earned 10 hours of sleep!
Rest well!
 Vicente
		
			Vicente
		
		
		 
		
		
		
		
		
	
			
		
		
			
					
		 
		
		
		
		
		
	
			
		
		
			
					
		 Trevor
		
			Trevor
		
		
		.png) 
		
		
		
		
		
	
			
		
		
			
					
		Hello Vicente,
Thank you for your comment on "... a play, without a name, in the playbook."
If you don't mind, would you expound on that comment a little more.
Thanks Vicente.
 Vicente
		
			Vicente
		
		
		 
		
		
		
		
		
	
			
		
		
			
					
		 Trevor
		
			Trevor
		
		
		.png) 
		
		
		
		
		
	
			
		
		
			
					
		Thank you very much Vicente the additional information.
That part about the only keyword that cannot be left out of a play is the word "hosts" is a golden nugget!!!
Many, many thanks!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.