Skip to content

fix(ansible): per-play strategy=free; compatible with add_host#174

Open
ch4r10t33r wants to merge 1 commit into
mainfrom
fix/ansible-strategy-free-add-host
Open

fix(ansible): per-play strategy=free; compatible with add_host#174
ch4r10t33r wants to merge 1 commit into
mainfrom
fix/ansible-strategy-free-add-host

Conversation

@ch4r10t33r
Copy link
Copy Markdown
Contributor

Problem

Ansible fails when ansible.cfg sets global strategy = free and a playbook uses add_host:

The 'add_host' module bypasses the host loop, which is currently not supported in the free strategy

This affected stop-nodes.yml, deploy-nodes.yml, clean-node-data.yml, and copy-genesis.yml (dynamic groups via add_host).

Change

  • Remove global strategy = free from ansible/ansible.cfg (keep forks tuning and document the constraint).
  • Set strategy: free only on plays that do not use add_host: prepare.yml, remote deploy/sync plays in deploy-nodes.yml, stop-nodes.yml remote play, clean-node-data.yml remote play.
  • Update ansible/README.md, site.yml header, and inventory/group_vars/all.yml comments.

Verification

ansible-playbook --syntax-check on the touched playbooks passes.

Global strategy=free in ansible.cfg breaks playbooks that call add_host
(deploy-nodes, stop-nodes, clean-node-data, copy-genesis). Remove it from
ansible.cfg and set strategy: free only on plays that do not use add_host.
Update README, site.yml, and group_vars comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant