[dopr] add handlers

This commit is contained in:
Valentin Gologuzov 2015-06-11 14:51:19 +02:00
parent 12bda40c3d
commit 34c9acca16
2 changed files with 24 additions and 19 deletions

View file

@ -1,22 +1,22 @@
- name: clean known hosts
hosts: dopr-stg
remote_user: fedora
sudo: True
gather_facts: False
tasks:
- name: clean out old known_hosts for dopr-dev
local_action: known_hosts path={{item}} host=dopr-dev.cloud.fedoraproject.org state=absent
ignore_errors: True
with_items:
- /root/.ssh/known_hosts
- /etc/ssh/ssh_known_hosts
- name: clean out old known_hosts for dopr-dev ip
local_action: known_hosts path={{item}} host=209.132.184.42 state=absent
ignore_errors: True
with_items:
- /root/.ssh/known_hosts
- /etc/ssh/ssh_known_hosts
#- name: clean known hosts
# hosts: dopr-stg
# remote_user: fedora
# sudo: True
# gather_facts: False
#
# tasks:
# - name: clean out old known_hosts for dopr-dev
# local_action: known_hosts path={{item}} host=dopr-dev.cloud.fedoraproject.org state=absent
# ignore_errors: True
# with_items:
# - /root/.ssh/known_hosts
# - /etc/ssh/ssh_known_hosts
# - name: clean out old known_hosts for dopr-dev ip
# local_action: known_hosts path={{item}} host=209.132.184.42 state=absent
# ignore_errors: True
# with_items:
# - /root/.ssh/known_hosts
# - /etc/ssh/ssh_known_hosts
- name: provision dopr dev instance
hosts: dopr-stg

View file

@ -0,0 +1,5 @@
---
- include: "{{ handlers }}/restart_services.yml"
- name: restart postgresql
service: name=postgresql state=restarted