1 00:00:00,740 --> 00:00:05,150 In this video, we will take a look at Ansible configuration file. 2 00:00:05,690 --> 00:00:15,350 Every application or package that is installed on any operating system comes with a configuration file. 3 00:00:15,350 --> 00:00:21,230 And I would say nine out of ten times those packages will always have a configuration file. 4 00:00:21,650 --> 00:00:28,370 Ansible Just like any package when installed on your operating system, it has its own configuration 5 00:00:28,370 --> 00:00:29,360 file as well. 6 00:00:29,990 --> 00:00:37,700 Some of the most common parameters that can be defined in Ansible, CFG and short for configuration 7 00:00:37,700 --> 00:00:39,410 file is asphalt. 8 00:00:40,160 --> 00:00:46,370 So you could define the list of these parameters in your configuration file, but if you go into your 9 00:00:46,370 --> 00:00:55,160 configuration file and cat it and try to read it, you will see none of the parameters that are defined 10 00:00:55,160 --> 00:00:56,810 right here, which I'm going through. 11 00:00:56,840 --> 00:01:04,430 You could add them in there, but by default the configuration file comes empty or it has comments in 12 00:01:04,430 --> 00:01:04,760 it. 13 00:01:05,180 --> 00:01:11,720 So the very first parameters and by the way, these are just a common parameters you could define. 14 00:01:11,720 --> 00:01:13,520 You could change it, you could remove it. 15 00:01:13,610 --> 00:01:18,410 It depends on your system or your environment requirement. 16 00:01:18,800 --> 00:01:19,040 All right. 17 00:01:19,040 --> 00:01:20,500 So the first one, let's take a look. 18 00:01:20,510 --> 00:01:24,200 Remote underscore user equal ansible. 19 00:01:24,200 --> 00:01:28,520 Then you had that parameter set up in your configuration file. 20 00:01:28,520 --> 00:01:35,630 It means it's a name of the user account used to connect to your remote clients. 21 00:01:35,960 --> 00:01:42,980 Then we have host underscore key underscore checking equal false, which means it specifies whether 22 00:01:43,100 --> 00:01:46,070 a search key or host key should be checked. 23 00:01:46,550 --> 00:01:53,960 So if a host is reinstalled and has a different key in known underscore host file where the keys are. 24 00:01:54,140 --> 00:01:58,070 This will result in an error message until corrected. 25 00:01:58,520 --> 00:02:02,000 So when you have it false, then it will skip that part. 26 00:02:02,450 --> 00:02:04,820 Then you have the inventory. 27 00:02:04,820 --> 00:02:09,920 This is where you specify the location of your inventory file. 28 00:02:09,950 --> 00:02:16,850 You could change the default location from Ansible and host file to any location of your choice. 29 00:02:16,850 --> 00:02:21,650 And you can specify right here in ansible cfg file. 30 00:02:21,680 --> 00:02:27,960 If you do not specify then will take it by the default one or it will take it that you specify what 31 00:02:27,980 --> 00:02:32,150 by minus I option, which by the way, we will cover later on. 32 00:02:32,300 --> 00:02:35,990 Then you have additional parameters for privilege escalations. 33 00:02:36,140 --> 00:02:38,530 Some of them like become equal. 34 00:02:38,540 --> 00:02:44,330 True, which means whether escalation is needed for root and if it does, how it's going to change it. 35 00:02:44,330 --> 00:02:49,010 What should be used on a local or client system for privileged access? 36 00:02:49,310 --> 00:02:56,120 Then when become user, what user should become and it should be root, which is the administrative 37 00:02:56,120 --> 00:03:03,920 account on Linux machine, which indicates that the name of the user account used to run escalated commands. 38 00:03:04,610 --> 00:03:10,520 All right, so when we are running escalated command, then you specify this parameters which tells 39 00:03:10,520 --> 00:03:16,640 you or prompts you for root need a password for root needed when running escalated commands. 40 00:03:16,640 --> 00:03:23,420 So if you specify false then of course it will not prompt you for root password. 41 00:03:24,080 --> 00:03:30,950 So this is a very common, very basic configuration parameters that you could specify in your configuration 42 00:03:30,950 --> 00:03:31,400 file. 43 00:03:31,400 --> 00:03:39,410 But as a beginner I would say you could leave the Ansible dot cfg file as is and you could make changes 44 00:03:39,410 --> 00:03:45,080 to it once you have a good understanding of how ansible automation works.