Comments (3)
Hi,
If I understand you correctly, you'd like to have all tasks have a prefix. Should that prefix be selected from:
- prepare
- install
- environment
- config
Or is that prefix free-format?
I don't see why a prefix solves the observability issue, if unique name:
s are used, that should help the User right?
And another issue; ansible-lint would like all named tasks to start with a capital.
I'm curious to your way of thinking, please let me know.
from ansible-role-users.
First of all, this is only my opinionated suggestion. 😃
By the rules of ansible-lint, prefix should match the file name in which the task is defined.
Capitalized named tasks rule applies to - name: filename | This is the capitalized task name
part. Not to the prefix itself.
In your case prefixes would be:
- asert | Some task name in asert.yaml
- group | Other task in group.yaml
- user | One more task in user.yaml
enable_list: - name[prefix]
should be explicitly enabled in ansible-lint config.
There is some random documentation i just found about it Good Practices for Ansible - GPA
All of this does not matter much if you are working just with one or few roles.
But when you have entire playbooks which consumes 20-50-100 roles, this becomes quite important.
Because you have such generic role, i see it being used in larger playbooks and thus IMHO task naming becomes important.
I would suggest to try it locally and to play with --list-tasks
on entire playbook to see the effect.
from ansible-role-users.
This one if fixes, actually on all my roles.
And; indeed it's useful! Thanks for then hint. 👊🏻
from ansible-role-users.
Related Issues (20)
- Add update_password option HOT 2
- Option to copy SSH keys into authorized_keys from GitHub HOT 3
- no test named 'boolean' HOT 2
- Option to copy public key or generate SSH keys only on instance HOT 1
- Descriptions of more scary variable names HOT 1
- ERROR! this task 'ansible.builtin.import_tasks' has extra params... when running playbook with the role HOT 2
- Make role work well with usernames containing a '.' (dot) sign. HOT 1
- "msg": "groupdel: cannot remove the primary group of user HOT 2
- Allow private key to be given and placed on a machine.
- For root user wrong home directory is used HOT 2
- Error in "Ensure the sudoers.d directory is checked..." ? HOT 2
- syntax error near line 120 HOT 16
- My users are not created
- Ansible group management HOT 1
- authorized_key(s) issue HOT 1
- Allow disabling deployment of /etc/cron.allow
- Remove sudo options for user if user.sudo_options is not defined HOT 1
- local ssh_key_directory is created on every ansible (check) run HOT 3
- 'create local ssh_key_directory' should be optional? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-users.