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

ansible bug: notify on a block #236

Open
ckonstanski-olo opened this issue Jun 20, 2024 · 5 comments
Open

ansible bug: notify on a block #236

ckonstanski-olo opened this issue Jun 20, 2024 · 5 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@ckonstanski-olo
Copy link

Describe the Issue
ERROR! 'notify' is not a valid attribute for a Block The error appears to be in '/var/buildagent/work/7c4acd731f0a163f/ansible/playbooks/roles/ubuntu22-cis/tasks/section_1/cis_1.1.1.x.yml': line 3, column 3, but may be elsewhere in the file depending on the exact syntax problem.

Environment (please complete the following information):

  • branch being used: main
  • Ansible Version: ansible 2.9.22
  • Host Python Version: 3.10.13
  • Ansible Server Python Version: 3.10.13
  • Additional Details: The illegal use of notify: is here:
    notify: Update_Initramfs
@ckonstanski-olo ckonstanski-olo added the bug Something isn't working label Jun 20, 2024
@MrSteve81
Copy link
Contributor

Please update your Ansible to at least 2.12 the notify was introduced in later versions after 2.9

@ckonstanski-olo
Copy link
Author

Not everyone has the luxury of updating past ansible 2.9. We are using tower which has us version-pinned.

@uk-bolly uk-bolly self-assigned this Jun 25, 2024
@uk-bolly
Copy link
Member

uk-bolly commented Jul 9, 2024

hi @ckonstanski-olo

It is possible to create and run later version of ansible that can be utilised by tower in some versions with the use of virtual environments. It is something that i have personally used in the past.
This article may help
https://docs.ansible.com/ansible-tower/latest/html/upgrade-migration-guide/virtualenv.html

I know that Tower is no longer supported and they have moved to AAP, but ansible versions have also moved on alot, it is extremely difficulty (almost impossible) to maintain backwardly compatible code whilst trying to use some of the new and improved features without a huge effort on an opensource project

I understand that this is frustrating with the ansible versions.

I hope that it goes some way to help.

Many thanks

uk-bolly

@uk-bolly uk-bolly added invalid This doesn't seem right and removed bug Something isn't working labels Jul 9, 2024
@uk-bolly
Copy link
Member

hi @ckonstanski-olo

I am hoping that you have managed a work around for this issue and the suggestion helped to point you to a suitable solution.
Please let us know if you have managed to get around this, it would be great to add to readthedocs documentation to assist other in the community.

Many thanks

uk-bolly

@kbknapp
Copy link

kbknapp commented Nov 6, 2024

Maybe just updating the documentation to say Ansible 2.11 is required?

It took me a few minutes to figure out what was going on because the docs all say Ansible 2.9 is required, and I was running 2.10 (which is what is available in the Ubuntu 22.04 repositories which this projects targets) but ran into this as well. Of course adding the ppa:ansible/ansible allows one to update to a newer Ansible, but that isn't always possible in some systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants