Guillaume Coré
2020-01-13 d154d4062c893621e91ea19da50076fe656276e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
# vim: set ft=ansible:
 
################################################################################
################################################################################
############ Step 0000 Setup Runtime
################################################################################
################################################################################
 
- import_playbook: setup_runtime.yml
  tags:
    - must
    - step0000
    - setup_runtime
 
################################################################################
################################################################################
############ Step 000 Pre Infrastructure Deploy Tasks
################################################################################
################################################################################
 
- import_playbook: "./configs/{{ env_type }}/pre_infra.yml"
  tags:
    - step000
    - pre_infra_tasks
 
#################################################################################
#################################################################################
############ Step 001 Deploy Infrastructure
#################################################################################
#################################################################################
 
# Use first found:
# - infra.yml in config directory
# - common cloud_provider
- vars:
    findme:
      - configs/{{ env_type }}/infra.yml
      - cloud_providers/{{ cloud_provider }}_infrastructure_deployment.yml
  import_playbook: "{{ lookup('first_found', findme) }}"
  tags:
    - step001
    - deploy_infrastructure
 
################################################################################
################################################################################
########### Step 002 Post Infrastructure Deploy Tasks
################################################################################
################################################################################
 
- import_playbook: "./configs/{{ env_type }}/post_infra.yml"
  tags:
    - step002
    - post_infra
    - post_infra_tasks
 
################################################################################
################################################################################
########### Step 003 Pre Software Deploy Tasks
################################################################################
################################################################################
 
- name: Pre Software
  import_playbook: "./configs/{{ env_type }}/pre_software.yml"
  tags:
    - step003
    - pre_software
    - pre_software_tasks
 
##################################################################################
##################################################################################
############ Step 004 Software Deploy Tasks
##################################################################################
##################################################################################
 
- name: Software
  import_playbook: "./configs/{{ env_type }}/software.yml"
  tags:
    - step004
    - deploy_software
 
- import_playbook: "./software_playbooks/{{ software_to_deploy | d('none')}}.yml"
  tags:
    - step004
    - deploy_software
 
################################################################################
################################################################################
############ Step 005 Post Software Deploy Tasks
################################################################################
################################################################################
 
- import_playbook: "./configs/{{ env_type }}/post_software.yml"
  tags:
    - step005
    - post_software
    - post_software_tasks