mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-16 13:56:03 +08:00
logdetective: cleanup playbook (lint)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user