Comments (3)
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the component bot command.
from ansible.
Hi!
Thanks very much for your submission to Ansible. It means a lot to us that you've taken time to contribute.
Unfortunately, we're not sure if we want this feature in the program, and I don't want this to seem confrontational.
Our reasons for this are:
- This is possible with the ansible.posix.profile_tasks callback
However, we're absolutely always up for discussion.
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:
In the future, sometimes starting a discussion on the development list prior to implementing a feature can make getting things included a little easier, but it's not always necessary.
Thank you once again for this and your interest in Ansible!
from ansible.
That's fair, but after close to a decade using Ansible to manage over a thousand servers, this was just 1 too many callbacks on top of other hacks, workarounds and frustrations.
We ended up creating our own solution which gave us these advantages:
- 11x fewer lines (35k lines of yml recipes down to 3k of clean/concise Ruby DSL)
- 35x faster to run (from 20 minutes with Ansible to around 34 seconds with Ruby)
- readable log output, easier profiling
- automatically creating backup files if a file changed
- ability to set timeouts and retries on tasks, etc
- other clever things like if a task is running for >5 min, it will log "Command still running:" with the command in question
Here is an example of the output, showing only the changes being made, with clear timestamps and durations. In contrast to having countless pages of difficult to parse Ansible output, not knowing what is currently running or when previous tasks were completed:
The recipes are much more concise, for example:
# note, the secret_key_base is generated in the erb template
template(secrets_path, 'secrets.sample.yml', mode: '644', user: 'deployer:deployer', overwrite: false)
Instead of:
- name: Check if secrets yml already exists
ansible.builtin.stat:
path: "{{ deploy_to }}/config/secrets.yml"
register: tetherbox_secrets_yml
- name: Generate Rails secret_key_base
ansible.builtin.command:
cmd: "openssl rand -hex 64"
register: secret_key_base
changed_when: false
when: tetherbox_secrets_yml.stat.exists is false
- name: Create secrets yml
ansible.builtin.template:
src: 'secrets.yml.j2'
dest: "{{ deploy_to }}/config/secrets.yml"
mode: '0644'
owner: '{{ username }}'
group: '{{ username }}'
when: tetherbox_secrets_yml.stat.exists is false
We will do a bit more testing and refining and will release this as open source as an alternative to those that want something a bit more opinionated and out of the box, without needing to do callbacks/hacks for basics like standard log output.
from ansible.
Related Issues (20)
- Ensure callbacks can properly detect the connection plugin used for a task HOT 1
- rpm_key does not work with ftp:// URLs HOT 2
- no_log does not honor variable interpretation. HOT 13
- ansible-galaxy collection/role install should have a parameter to ignore ssl certs on collections/roles with scm via https but with self-signed certs. HOT 5
- Test failure with cowsay installed/present HOT 3
- [ec2_asg] fail when update tags inside ASG with KeyError; 'LaunchTemplate HOT 3
- (facts) include microarch in system facts HOT 1
- urlencode doesn't encode `/` HOT 2
- The user module does not have an inactive parameter. HOT 8
- Add feature for ansible-pull supports s3 HOT 3
- Using Linux service_facts.py on a Windows VM instead of windows module win_service_info HOT 2
- Connection Plugins With Extra's Not Handling FQCN's HOT 6
- Interpreter discovery broken for rhel 8 based distros on 2.17 HOT 18
- to_yaml / to_nice_yaml is not able to decrypt Vault password HOT 2
- ansible service_facts module returning failed loaded service on ubuntu 20.04 HOT 10
- In examples truthy value should be one of [false, true] HOT 3
- git module can "lose" local commits HOT 4
- Ansible Playbook failing with OSError when using copy module. Throwing error "Could not replace file: [Errno 2] No such file or directory" HOT 2
- import_playbook needs some kind of Host limit or filter HOT 5
- dnf5 wildcard regression HOT 4
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.