Skip to content

Commit 5aa04b8

Browse files
committed
Update README for setting/overriding variables
1 parent f553d68 commit 5aa04b8

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,36 @@ For all playbooks you will also need to have an appropriate Ansible `hosts` file
4343
see the supplied `inventory/hosts.example` for the structure and host groups that you need for these playbooks.
4444

4545
Ansible offers several ways to override any configuration parameters. Of course you can edit a playbook or the `all.yml` file,
46-
but it is best to keep these files unmodified. For temporarily overriding variables, you can use the command-line option `-e`, e.g.:
47-
```
48-
ansible-playbook -e some_parameter=new_value playbook.yml
49-
```
50-
If the setting is for a specific machine, it is recommended to make a file in the `inventory/host_vars` directory and use the machine name as name of the file.
46+
but it is best to keep these files unmodified.
47+
48+
#### Machine-specific configuration
49+
If the setting is for one specific machine (e.g. your Stratum 1 machine), it is recommended to make a file in the `inventory/host_vars` directory and use the machine name as name of the file.
5150
This file can contain any settings that should be overridden for this particular machine. See `stratum0host.example` in that directory for an example.
5251
Any other files that you will create in this directory will be ignored by git.
5352

54-
Similarly, if you need to override a setting for a group of machines, e.g. for all your clients or proxies,
55-
you can modify the corresponding file in `inventory/group_vars`, though you should be aware that these files are tracked by git. For this reason,
56-
some specific group variables involving IP addresses (for the proxies and clients) are put in the `hosts.examples` file.
53+
54+
#### Site-specific configuration
55+
Any other site-specific configuration items can go into a file `inventory/local_site_specific_vars.yml` (which will be ignored by git).
56+
We provided an example file that shows the kind of configuration that you should minimally provide.
57+
You can also add more items that you would like to override to this file. See the next section for instructions about passing
58+
your configuration file to the playbook.
59+
5760

5861
## Running the playbooks
5962

6063
In general, all the playbooks can be run like this:
6164
```
62-
ansible-playbook -b <name of playbook>.yml
65+
ansible-playbook -b -e @inventory/local_site_specific_vars.yml <name of playbook>.yml
6366
```
64-
Here `-b` means "become", i.e. run with `sudo`.
67+
Here the option `-e @/path/to/your/config.yml` is used to include your site-specific configuration file.
68+
The `-b` option means "become", i.e. run with `sudo`.
6569
If this requires a password, include `-K`, which will ask for the `sudo` password when running the playbook:
6670
```
6771
ansible-playbook -i hosts -b -K <name of playbook>.yml
6872
```
6973

70-
Before you run any of the commands below, make sure that you created a `inventory/hosts` file and updated the configuration files
71-
in `inventory/group_vars` and/or `inventory/host_vars`.
74+
Before you run any of the commands below, make sure that you created a `inventory/hosts` file, a site-specific configuration file,
75+
and, if necessary, created machine-specific configuration files in `inventory/host_vars`.
7276

7377
### Firewalls
7478
To make all communication between the CVMFS services possible, some ports have to be opened on the Stratum 0 (default: port 80),

0 commit comments

Comments
 (0)