Skip to content

Commit

Permalink
Remove unused imports and enable Ansible task profiling
Browse files Browse the repository at this point in the history
Removed unnecessary imports from the project, including `SsmAnsible` and `UserRepo`, to streamline the codebase. Enabled the `profile_tasks` callback in the Ansible configuration to support performance profiling.
  • Loading branch information
SquirrelDevelopper committed Nov 12, 2024
1 parent d2b2e0f commit 16c26de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/src/ansible/default-ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# (integer) Expiration timeout for the cache plugin data
;fact_caching_timeout=86400
# (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activated by default.
;callbacks_enabled=
callbacks_enabled=profile_tasks
# (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansible`).
;collections_on_ansible_version_mismatch=warning
# (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, not directly in these directories. For example, if ``COLLECTIONS_PATHS`` includes ``'{{ ANSIBLE_HOME ~ "/collections" }}'``, and you want to add ``my.collection`` to that directory, it must be saved as ``'{{ ANSIBLE_HOME} ~ "/collections/ansible_collections/my/collection" }}'``.
Expand Down
3 changes: 1 addition & 2 deletions server/src/core/startup/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Repositories, SettingsKeys, SsmAnsible } from 'ssm-shared-lib';
import { Repositories, SettingsKeys } from 'ssm-shared-lib';
import { getFromCache, setToCache } from '../../data/cache';
import initRedisValues from '../../data/cache/defaults';
import { ContainerCustomStackModel } from '../../data/database/model/ContainerCustomStack';
import { DeviceModel } from '../../data/database/model/Device';
import { PlaybookModel } from '../../data/database/model/Playbook';
import UserRepo from '../../data/database/repository/UserRepo';
import { copyAnsibleCfgFileIfDoesntExist } from '../../helpers/ansible/AnsibleConfigurationHelper';
import PinoLogger from '../../logger';
import AutomationEngine from '../../modules/automations/AutomationEngine';
Expand Down

0 comments on commit 16c26de

Please sign in to comment.