From 7a34249e3f327acb965df4fed3ae153c6a6c7096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toshio=20=E3=81=8F=E3=82=89=E3=81=A8=E3=81=BF?= Date: Tue, 6 Nov 2012 18:00:07 +0000 Subject: [PATCH] Add a test persistent host --- inventory/host_vars/209.132.184.113 | 9 +++++++++ inventory/inventory | 1 + playbooks/hosts/209.132.184.113.yml | 28 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 inventory/host_vars/209.132.184.113 create mode 100644 playbooks/hosts/209.132.184.113.yml diff --git a/inventory/host_vars/209.132.184.113 b/inventory/host_vars/209.132.184.113 new file mode 100644 index 0000000000..d92c7335c1 --- /dev/null +++ b/inventory/host_vars/209.132.184.113 @@ -0,0 +1,9 @@ +instance_type: m1.large +image: emi-B8793915 +keypair: admin +security_group: webserver +zone: fedoracloud +hostbase: hostname_base- +public_ip: 192.168.3.113 +root_auth_users: skvidal toshio +description: test instance, delete at will diff --git a/inventory/inventory b/inventory/inventory index 6898465799..8edc1049f6 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -297,3 +297,4 @@ virthost-comm01.qa.fedoraproject.org 209.132.184.100 209.132.184.111 209.132.184.112 +209.132.184.113 diff --git a/playbooks/hosts/209.132.184.113.yml b/playbooks/hosts/209.132.184.113.yml new file mode 100644 index 0000000000..ea901e0aa3 --- /dev/null +++ b/playbooks/hosts/209.132.184.113.yml @@ -0,0 +1,28 @@ +- name: check/create instance + hosts: 209.132.184.113 + user: root + gather_facts: False + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - ${private}/vars.yml + + tasks: + - include: $tasks/persistent_cloud.yml + +- name: provision instance + hosts: 209.132.184.113 + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - ${private}/vars.yml + - ${vars}/${ansible_distribution}.yml + + tasks: + - include: $tasks/cloud_setup_basic.yml + # fill in other actions/includes/etc here + + handlers: + - include: $handlers/restart_services.yml