Skip to content

Commit 0023c18

Browse files
committed
ansible: use native verbosity config instead of custom AV variable
Replace the custom AV makefile variable and validate_av.py script with Ansible's native verbosity configuration. The verbosity level is now configured via the verbosity key in ansible.cfg, which can be set through the new ANSIBLE_CFG_VERBOSITY Kconfig option. This change removes the $(ANSIBLE_VERBOSE) variable from all 52 Makefiles that were passing it to ansible-playbook calls. Since ansible.cfg now contains the verbosity setting, the command-line argument is no longer needed. The runtime override is now done using the standard ANSIBLE_VERBOSITY environment variable instead of the custom AV=N syntax. Generated-by: Claude AI Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Gomez <[email protected]>
1 parent 979cadd commit 0023c18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+223
-233
lines changed

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ make mmtests-compare # Compare baseline vs dev results (A/B testing)
121121
```bash
122122
make help # Show available targets
123123
make V=1 [target] # Verbose build output
124-
make AV=1-6 [target] # Ansible verbose output (levels 0-6)
124+
ANSIBLE_VERBOSITY=1-6 make [target] # Ansible verbose output (levels 0-6)
125125
make dynconfig # Generate dynamic configuration
126126
make style # Check for whitespace issues - ALWAYS run before completing work
127127
make fix-whitespace-last-commit # Fixes commit white space damage
@@ -986,7 +986,7 @@ tasks complete, leading to variable access before they're properly set.
986986

987987
```bash
988988
# Run with verbose output to see variable resolution
989-
make target AV=3 # Ansible verbose level 3
989+
ANSIBLE_VERBOSITY=3 make target # Ansible verbose level 3
990990
```
991991

992992
### A/B Testing Variable Resolution Example
@@ -1045,7 +1045,7 @@ When developing features that involve per-node variables:
10451045
grep "active_.*:" extra_vars.yaml
10461046
10471047
# Verify node-specific settings
1048-
make target AV=2 | grep -A5 -B5 "Set.*fact"
1048+
ANSIBLE_VERBOSITY=2 make target | grep -A5 -B5 "Set.*fact"
10491049
```
10501050

10511051
### Common Patterns to Avoid

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ include scripts/gen-nodes.Makefile
234234
false)
235235

236236
$(ANSIBLE_CFG_FILE): .config
237-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
237+
$(Q)ansible-playbook --connection=local \
238238
--inventory localhost, \
239239
$(KDEVOPS_PLAYBOOKS_DIR)/ansible_cfg.yml \
240240
--extra-vars=@./.extra_vars_auto.yaml
@@ -264,13 +264,13 @@ include scripts/bringup.Makefile
264264
endif
265265

266266
$(ANSIBLE_INVENTORY_FILE): .config $(ANSIBLE_CFG_FILE) $(KDEVOPS_HOSTS_TEMPLATE) $(KDEVOPS_EXTRA_VARS)
267-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
267+
$(Q)ansible-playbook --connection=local \
268268
--inventory localhost, \
269269
$(KDEVOPS_PLAYBOOKS_DIR)/gen_hosts.yml \
270270
--extra-vars=@./extra_vars.yaml
271271

272272
$(KDEVOPS_NODES): .config $(ANSIBLE_CFG_FILE) $(KDEVOPS_NODES_TEMPLATE) $(KDEVOPS_EXTRA_VARS)
273-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
273+
$(Q)ansible-playbook \
274274
$(KDEVOPS_PLAYBOOKS_DIR)/gen_nodes.yml \
275275
--extra-vars=@./extra_vars.yaml
276276

Makefile.btrfs_progs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BTRFS_PROGS_SETUP_ARGS += btrfs_progs_build=True
55

66
PHONY += btrfs-progs
77
btrfs-progs: $(KDEVOPS_NODES)
8-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
8+
$(Q)ansible-playbook \
99
$(KDEVOPS_PLAYBOOKS_DIR)/btrfs-progs.yml \
1010
--extra-vars=$(BTRFS_PROGS_SETUP_ARGS) $(LIMIT_HOSTS)
1111

Makefile.build_qemu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ QEMU_BUILD_SETUP_ARGS += qemu_target="ppc64-softmmu"
2020
endif
2121

2222
qemu: $(KDEVOPS_EXTRA_VARS)
23-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
23+
$(Q)ansible-playbook \
2424
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
2525
--extra-vars=@./extra_vars.yaml
2626
PHONY += qemu
2727

2828
qemu-install: $(KDEVOPS_EXTRA_VARS)
29-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
29+
$(Q)ansible-playbook \
3030
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
3131
--extra-vars=@./extra_vars.yaml --tags vars,install
3232
PHONY += qemu-install
3333

3434
qemu-configure: $(KDEVOPS_EXTRA_VARS)
35-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
35+
$(Q)ansible-playbook \
3636
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
3737
--extra-vars=@./extra_vars.yaml --tags vars,configure
3838
PHONY += qemu-configure
3939

4040
qemu-build: $(KDEVOPS_EXTRA_VARS)
41-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
41+
$(Q)ansible-playbook \
4242
$(KDEVOPS_PLAYBOOKS_DIR)/build_qemu.yml \
4343
--extra-vars=@./extra_vars.yaml --tags vars,build
4444
PHONY += qemu-build

Makefile.docker-mirror

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ docker-mirror-help:
1616

1717
docker-mirror: $(KDEVOPS_EXTRA_VARS)
1818
@echo "Setting up Docker registry mirror with automatic background updates..."
19-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
19+
$(Q)ansible-playbook \
2020
--connection=local \
2121
--tags docker-mirror \
2222
$(KDEVOPS_PLAYBOOKS_DIR)/docker-mirror.yml \
@@ -52,7 +52,7 @@ docker-mirror-status:
5252
docker-mirror-pull: $(KDEVOPS_EXTRA_VARS)
5353
@echo "Manually triggering Docker image downloads..."
5454
@echo "This may take several minutes depending on image sizes and network speed."
55-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
55+
$(Q)ansible-playbook \
5656
--connection=local \
5757
--tags docker-mirror-pull \
5858
$(KDEVOPS_PLAYBOOKS_DIR)/docker-mirror.yml \

Makefile.hypervisor-tunings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ HYPERVISOR_TUNING_ARGS += hypervisor_tunning_zswap_max_pool_percent=$(ZSWAP_MAX_
1414
endif
1515

1616
kdevops_hypervisor_tunning: $(KDEVOPS_EXTRA_VARS)
17-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
17+
$(Q)ansible-playbook \
1818
$(KDEVOPS_PLAYBOOKS_DIR)/hypervisor-tuning.yml \
1919
--extra-vars=@./extra_vars.yaml
2020
PHONY += kdevops_hypervisor_tunning

Makefile.kdevops

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ kdevops_all: kdevops_deps
88
PHONY := kdevops_all
99

1010
kdevops_terraform_deps:
11-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
11+
$(Q)ansible-playbook \
1212
--inventory localhost, \
1313
$(KDEVOPS_PLAYBOOKS_DIR)/install_terraform.yml
1414
PHONY += kdevops_terraform_deps
1515

1616
kdevops_install_libvirt:
17-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
17+
$(Q)ansible-playbook \
1818
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_configuration=True"
1919

2020
kdevops_configure_libvirt:
21-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
21+
$(Q)ansible-playbook \
2222
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_install=True" \
2323
-e 'running_user=$(USER)'
2424

2525
kdevops_verify_libvirt_user:
26-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
26+
$(Q)ansible-playbook \
2727
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "only_verify_user=True"
2828

2929
PHONY += kdevops_verify_libvirt_user
3030

3131
kdevops_libvirt_storage_pool_create:
32-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
32+
$(Q)ansible-playbook \
3333
$(KDEVOPS_PLAYBOOKS_DIR)/libvirt_storage_pool_create.yml
3434

3535
PHONY += kdevops_libvirt_storage_pool_create

Makefile.postfix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ POSTFIX_SETUP_ARGS += postfix_relay_host_setup=True
77
POSTFIX_SETUP_ARGS += postfix_relay_host=$(POSTFIX_RELAY_HOST)
88

99
kdevops_postfix_setup_relay: $(KDEVOPS_EXTRA_VARS)
10-
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
10+
$(Q)ansible-playbook \
1111
$(KDEVOPS_PLAYBOOKS_DIR)/postfix_relay_host.yml \
1212
--extra-vars=@./extra_vars.yaml
1313
PHONY += kdevops_postfix_setup_relay

docs/fio-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ CI-specific optimizations:
308308
Enable verbose output:
309309
```bash
310310
make V=1 fio-tests # Verbose build output
311-
make AV=2 fio-tests # Ansible verbose output
311+
ANSIBLE_VERBOSITY=2 make fio-tests # Ansible verbose output
312312
```
313313

314314
## Performance considerations

docs/monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ grep -E "enable_monitoring|monitor_" .config
232232

233233
2. **Check ansible output for monitoring tasks**:
234234
```bash
235-
make fstests-tests AV=2 | grep -A5 -B5 monitoring
235+
ANSIBLE_VERBOSITY=2 make fstests-tests | grep -A5 -B5 monitoring
236236
```
237237

238238
3. **Look for error messages**:

0 commit comments

Comments
 (0)