File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ uv run scripts/tools.py -h
569569This command performs an update operation on remote targets.
570570
571571``` bash
572- uv run scripts/tools.py update primary1 primary2
572+ uv run scripts/tools.py update -H primary1 primary2
573573```
574574
575575For each primary target :
@@ -578,3 +578,41 @@ For each primary target :
5785782 . Update with repository manager (yum): Optionally enables repositories
5795793 . Reboot
5805804 . Get attached secondary hosts and repeats three previous steps for each secondary
581+
582+ ** Inventory file**
583+
584+ ` update ` command can read an inventory file in [ TOML v1.0.0] ( https://toml.io/en/v1.0.0 ) format:
585+
586+ ``` bash
587+ uv run scripts/tools.py update -i my_inventory.toml
588+ ```
589+
590+ > [ !NOTE]
591+ > You can use either ` -i/--inventory ` or ` -H/--hosts ` .
592+ >
593+ > ** Above flags can't be used together**
594+
595+ Take a look at an example inventory file:
596+
597+ ``` toml
598+ # my_inventory.toml
599+
600+ [all ]
601+ enablerepos = [" xcp-ng-base" ]
602+
603+ [servers ]
604+
605+ [servers ."ip_or_hostname-1" ]
606+
607+ [servers ."ip_or_hostname-2" ]
608+
609+ enablerepos = [" xcp-ng-updates" ]
610+ ```
611+
612+ > [ !IMPORTANT]
613+ > Config values under ` servers ` override values under ` all ` . For instance, the above inventory would produce
614+ > the following python dict:
615+ >
616+ > ` {'ip_or_hostname-1': {'enablerepos': ['xcp-ng-base']}, 'ip_or_hostname-2': {'enablerepos': ['xcp-ng-updates']}} `
617+ >
618+ > Using * enablerepo flag* ` -e ` with inventory is still possible, it won't be used though.
You can’t perform that action at this time.
0 commit comments