logdetective: cleanup playbook (lint)

This commit is contained in:
Pavel Raiskup 2024-10-15 16:21:08 +02:00
parent 2ac3166624
commit f3cca61957

View file

@ -1,48 +1,39 @@
---
- name: check/create instance
hosts: logdetective
user: root
gather_facts: False
gather_facts: false
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- import_tasks: "{{ tasks_path }}/aws_cloud.yml"
when: datacenter == 'aws'
- import_tasks: "{{ tasks_path }}/aws_cloud.yml"
when: datacenter == 'aws'
- import_tasks: "{{ tasks_path }}/swap.yml"
when:
- datacenter == 'aws'
- swap_file_size_mb is defined
- name: cloud basic setup
hosts: logdetective
become: True
become_user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
- import_tasks: "{{ tasks_path }}/swap.yml"
when:
- datacenter == 'aws'
- swap_file_size_mb is defined
- name: provision instance
hosts: logdetective
become: True
become: true
become_user: root
gather_facts: True
gather_facts: true
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
# Roles are run first, before tasks, regardless of where you place them here.
roles:
- base
- logdetective
- nagios_client
- base
- logdetective
- nagios_client