You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/books/learning_ansible/01-basic.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,7 +182,7 @@ There are two main configuration files:
182
182
* The main configuration file `ansible.cfg` where the commands, modules, plugins, and ssh configuration reside;
183
183
* The client machine management inventory file `hosts` where the clients, and groups of clients are declared.
184
184
185
-
If Ansible was installed via its RPM package, then the configuration file will have been automatically created. With a `pip` installation, this file does not exist. We'll have to create it by hand thanks to the `ansible-config` command:
185
+
The configuration file would automatically be created if Ansible was installed with its RPM package. With a `pip` installation, this file does not exist. We'll have to create it by hand thanks to the `ansible-config` command:
186
186
187
187
```
188
188
$ ansible-config -h
@@ -208,17 +208,17 @@ The `--disabled` option allows you to comment out the set of options by prefixin
208
208
209
209
!!! NOTE
210
210
211
-
You can also choose to embed the ansible configuration in your code repository, with ansible loading the configuration files it finds in the following order (processing the first file it finds and ignoring the rest):
211
+
You can also choose to embed the ansible configuration in your code repository, with Ansible loading the configuration files it finds in the following order (processing the first file it encounters and ignoring the rest):
212
212
213
213
* if the environment variable `$ANSIBLE_CONFIG` is set, load the specified file.
214
214
* `ansible.cfg` if exists in the current directory.
215
215
* `~/.ansible.cfg` if exists (in the user’s home directory).
216
216
217
-
If none of these three files is found, the default file is loaded.
217
+
The default file is loaded if none of these three files are found.
218
218
219
219
### The inventory file `/etc/ansible/hosts`
220
220
221
-
As Ansible will have to work with all your equipment to be configured, it is very important to provide it with one (or more) well-structured inventory file(s), which perfectly matches your organization.
221
+
As Ansible will have to work with all your equipment to be configured, providing it with one (or more) well-structured inventory file(s) that perfectly matches your organization is essential.
222
222
223
223
It is sometimes necessary to think carefully about how to build this file.
224
224
@@ -272,7 +272,7 @@ Go to the default inventory file, which is located under `/etc/ansible/hosts`. S
272
272
273
273
As you can see, the file provided as an example uses the INI format, which is well known to system administrators. Please note that you can choose another file format (like yaml for example), but for the first tests, the INI format is well adapted to our future examples.
274
274
275
-
Obviously, in production, the inventory can be generated automatically, especially if you have a virtualization environment like VMware VSphere or a cloud environment (Aws, Openstack or other).
275
+
The inventory can be generated automatically in production, especially if you have a virtualization environment like VMware VSphere or a cloud environment (Aws, OpenStack, or another).
276
276
277
277
* Creating a hostgroup in `/etc/ansible/hosts`:
278
278
@@ -302,7 +302,7 @@ ansible_clients
302
302
172.16.1.10
303
303
```
304
304
305
-
We won't go any further for the moment on the subject of inventory, but if you're interested, consider checking [this link](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html).
305
+
We won't go any further on inventory, but if you are interested, consider checking [this link](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html).
306
306
307
307
Now that our management server is installed and our inventory is ready, it's time to run our first `ansible` commands.
308
308
@@ -375,7 +375,7 @@ On both management machine and clients, we will create an `ansible` user dedicat
375
375
376
376
This user will be used:
377
377
378
-
* On the administration station side: to run `ansible` commands and ssh to managed clients.
378
+
* On the administration station side: to run `ansible` commands and SSH to managed clients.
379
379
* On the managed stations (here the server that serves as your administration station also serves as a client, so it is managed by itself) to execute the commands launched from the administration station: it must therefore have sudo rights.
380
380
381
381
On both machines, create an `ansible` user, dedicated to ansible:
@@ -686,7 +686,7 @@ The command returns the following error codes:
686
686
687
687
!!! Note
688
688
689
-
Please note that `ansible` will return Ok when there is no host matching your target, which might mislead you!
689
+
Please note that `ansible` will return Ok when no host matches your target, which might mislead you!
0 commit comments