Change include to include_task in Ansible roles
pull/372/head
Aidaho 2023-12-19 12:06:44 +03:00
parent 87657806ab
commit b3bea63275
6 changed files with 8 additions and 11 deletions

View File

@ -54,9 +54,6 @@
become: yes
gather_facts: no
tasks:
- name: Set SSH port
set_fact:
ansible_port: "{{SSH_PORT}}"
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
file:
path: "{{ service_dir }}"

View File

@ -1,5 +1,5 @@
---
- include: preflight.yml
- include_tasks: preflight.yml
- name: Create the Apache Exporter group
become: true

View File

@ -6,13 +6,13 @@
- name: populate service facts
service_facts:
- include: configure.yml
- include_tasks: configure.yml
- include: installation.yml
- include_tasks: installation.yml
- include: logs.yml
- include_tasks: logs.yml
- name: Add syn_flood tasks
include: syn_flood.yml
include_tasks: syn_flood.yml
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)

View File

@ -93,7 +93,7 @@
notify: restart haproxy_exporter
- name: install service
include: service-{{ prometheus_exporter_service_mgr }}.yml
include_tasks: service-{{ prometheus_exporter_service_mgr }}.yml
- name: Service Enabled
become: true

View File

@ -107,5 +107,5 @@
- name: Add syn_flood tasks
include: ../../haproxy/tasks/syn_flood.yml
include_tasks: ../../haproxy/tasks/syn_flood.yml
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)

View File

@ -133,7 +133,7 @@
notify: restart nginx_exporter
- name: install service
include: service-{{ prometheus_exporter_service_mgr }}.yml
include_tasks: service-{{ prometheus_exporter_service_mgr }}.yml
- name: Service Enabled
become: true