ansible/playbooks/groups/copr-frontend.yml
Jakub Kadlcik 36a976c5ef copr: explicitly import handlers for copr-frontend.yml
Trying to solve this issue

    TASK [Mount swap]
    ERROR! The requested handler 'restart swap.swap' was not found in
    either the main handlers list nor in the listening handlers list
2022-11-18 18:29:25 +01:00

57 lines
1.5 KiB
YAML

- name: check/create instance
hosts: copr_front_dev_aws:copr_front_aws
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/private/ansible/files/openstack/passwords.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
# - import_tasks: "{{ tasks_path }}/persistent_cloud.yml"
# when: datacenter != "aws"
- import_tasks: "{{ tasks_path }}/aws_cloud.yml"
when: datacenter == "aws"
tags: always
- import_tasks: "{{ tasks_path }}/swap.yml"
when:
- datacenter == 'aws'
- swap_file_size_mb is defined
- name: cloud basic setup
hosts: copr_front_dev_aws:copr_front_aws
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"
tasks:
- import_tasks: "{{ tasks_path }}/cloud_setup_basic.yml"
- name: set hostname (required by some services, at least postfix need it)
hostname: name="{{copr_hostbase}}.cloud.fedoraproject.org"
when: datacenter != "aws"
- name: provision instance
hosts: copr_front_dev_aws:copr_front_aws
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
roles:
- base
- { role: sudo, sudoers: "{{ private }}/files/sudo/copr-sudoers", when: devel|bool }
- copr/copr-devel-server
- copr/frontend
- nagios_client