Auto-fix usage of modules via FQCN

Since ansible-core 2.10 it is recommended to use modules via FQCN
In order to align with recommendation, we perform migration
by applying suggestions made by `ansible-lint --fix=fqcn`

Change-Id: Ib419694a702f1fe680f360aa8c50f9abc4691fec
This commit is contained in:
Dmitriy Rabotyagov 2025-02-13 08:00:23 +01:00
parent b25db7deda
commit 3f632b2900
4 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Restart memcached
systemd:
ansible.builtin.systemd:
name: "memcached"
state: "restarted"
enabled: true

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Gather variables for each operating system
include_vars: "{{ lookup('first_found', params) }}"
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
@ -29,14 +29,14 @@
- always
- name: Importing memcached_install tasks
import_tasks: memcached_install.yml
ansible.builtin.import_tasks: memcached_install.yml
tags:
- memcached_server-install
- name: Importing memcached_config tasks
import_tasks: memcached_config.yml
ansible.builtin.import_tasks: memcached_config.yml
tags:
- memcached_server-config
- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Apply memcached config
template:
ansible.builtin.template:
src: "{{ memcached_conf_template }}"
dest: "{{ memcached_conf_dest }}"
owner: "root"
@ -23,7 +23,7 @@
notify: Restart memcached
- name: Override systemd service file
copy:
ansible.builtin.copy:
src: "{{ memcached_systemd_service }}"
dest: "/etc/systemd/system/memcached.service"
owner: "root"
@ -33,7 +33,7 @@
notify: Restart memcached
- name: Create memcached systemd service config dir
file:
ansible.builtin.file:
path: "/etc/systemd/system/memcached.service.d"
state: "directory"
group: "root"
@ -41,7 +41,7 @@
mode: "0755"
- name: Apply systemd options
template:
ansible.builtin.template:
src: "{{ item.src }}"
dest: "/etc/systemd/system/memcached.service.d/{{ item.dest }}"
mode: "0644"
@ -54,7 +54,7 @@
- Restart memcached
- name: Configure soft file limits
lineinfile:
ansible.builtin.lineinfile:
dest: "/etc/security/limits.conf"
regexp: "^{{ memcached_user }}.*soft.*nofile.*"
state: "present"
@ -62,7 +62,7 @@
insertbefore: "^# End of file"
- name: Configure hard file limits
lineinfile:
ansible.builtin.lineinfile:
dest: "/etc/security/limits.conf"
regexp: "^{{ memcached_user }}.*hard.*nofile.*"
state: "present"

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Install distro packages
package:
ansible.builtin.package:
name: "{{ memcached_distro_packages }}"
state: "{{ memcached_package_state }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"