Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change include to include_tasks #691

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

matthewandrews
Copy link
Member

include is deprecated from ansible 2.4. It appears to behave like the new import_* (preprocessing) as opposed to the new include_* (runtime parsing).

`include` is deprecated from ansible 2.4. It appears to behave like the new `import_*` (preprocessing) as opposed to the new `include_*` (runtime parsing).
Copy link
Collaborator

@vjrj vjrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, include is deprecated in recent versions. I didn't realized I was using it here.

@djtfmartin djtfmartin merged commit 29089b9 into master Oct 5, 2023
Copy link
Member

@djtfmartin djtfmartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matthewandrews matthewandrews deleted the avoid-docker-module-required-for-vm-deploys branch October 6, 2023 01:03
@vjrj
Copy link
Collaborator

vjrj commented Oct 6, 2023

As a side effect of this, now we cannot select tags inside the include_tasks.

An option is to use import_tasks instead (the number or skipped tasks will be increased). Other option is to add tags to the include_tasks (less useful because the internal tags will be ignored), see the tags that I just added here.

@matthewandrews
Copy link
Member Author

Ah, that's not good. The original reason we had a problem with include (or import_tasks) is that it required people to have ansible docker_stack_module installed, even if only using VMs.

@vjrj
Copy link
Collaborator

vjrj commented Oct 6, 2023

Strange, because I didn't installed the docker_stack_module.

@matthewandrews
Copy link
Member Author

Oh - possibly another module was required. The error we were getting was like this:

ERROR! couldn't resolve module/action 'docker_stack'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in 'ala-install/ansible/roles/docker-common/tasks/stack-create.yml': line 12, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Remove Docker Swarm stack
  ^ here

@vjrj
Copy link
Collaborator

vjrj commented Oct 6, 2023

After searching my shell history, but I don't find nothing related with some module installation.

I'll test it in a clean environment.

vjrj pushed a commit that referenced this pull request Nov 3, 2023
`include` is deprecated from ansible 2.4. It appears to behave like the new `import_*` (preprocessing) as opposed to the new `include_*` (runtime parsing).
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.

3 participants