Simplify VPN connect and disconnect #7
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
RollenspielMonster/ansible_collection!7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "simplify-vpn"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ansible allows importing whole playbooks with 'import_playbook' or we
can just import tasks with the 'include_tasks' module. The latter in
combination with 'local_action' makes the playbooks quite a bit shorter.
so it executes the local command but as many times as hosts are selected?
Ah, good point. My test inventory only had one host in it.
I'll have a look at it later. That's an easy to solve problem with 'run_once: true' which can be added to any task as far as I know. I'll try it out and update the pull request accordingly.
Done. 🙂
Looks like the vpn taks is executed too late.
You are right. I'm sorry. Ansible is failing to "gather facts" about your targets. I didn't run into this issue, because I don't have an actual VPN connection I can test with. So your initial idea with using separate playbooks is correct, because then the tasks will be run only for 'localhost'.
We can still clean this up a bit.