[PATCH RFT 0/6] Fix Ansible warnings and simplify build dependency order
Daniel Gomez <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
This series fixes Ansible warnings that appear during terraform setup and simplifies ansible-playbook calls by establishing proper Makefile target dependency order. Problem: Terraform targets were executing before ansible.cfg and hosts files existed, causing "No inventory was parsed" and "provided hosts list is empty" warnings. Root cause: The include order in Makefile caused terraform dependencies to be added to DEFAULT_DEPS before core Ansible files. Solution: 1. Establish correct dependency order: extra_vars.yaml → ansible.cfg → hosts → nodes → rest 2. Add missing localhost entry in the new generic inventory template (generic.j2) 3. Use explicit connection flags for bootstrap operations and remove warning suppressions. Note, this reintroduces the --connection and --inventory flags to the ansible.cfg and inventory targets. We only need these 2 here for obvious reasons. This allows to remove the warnings variables introduced after actually removing the flags. Being explicit with flags is preferred here than using ANSIBLE_* variables. Signed-off-by: Daniel Gomez <[email protected]> --- Daniel Gomez (6): Makefile: fix target dependency order gen_hosts: add localhost to generic workflow template ansible_cfg: fix Python interpreter discovery warning Makefile: remove warnings from ANSIBLE_CFG_FILE target Makefile: simplify KDEVOPS_NODES ansible-playbook call Makefile: add explicit connection for inventory generation Makefile | 41 ++++++++++++---------- playbooks/ansible_cfg.yml | 2 ++ .../roles/gen_hosts/templates/workflows/generic.j2 | 1 + 3 files changed, 25 insertions(+), 19 deletions(-) --- base-commit: 53943da513f1cfc857844bf5f961c27a13d3060d change-id: 20250922-makefile-targets-order-d917a35f550a Best regards, -- Daniel Gomez <[email protected]>