Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.yml « tasks « deploy « roles « terraform « _support - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 152d844cbae0599e479a7f00f67189ed25564926 (plain)
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
- name: GCloud login
  block:
    - name: GCloud login status
      command: gcloud auth application-default print-access-token
      changed_when: false
  rescue:
    - name: GCloud login
      command: gcloud auth application-default login

- name: terraform.tfvars
  template:
    src: terraform.tfvars.j2
    dest: "{{ playbook_dir }}/terraform/terraform.tfvars"

- name: terraform apply
  terraform:
    project_path: "{{ playbook_dir }}/terraform"
    variables_file: terraform.tfvars
    force_init: true
  register: tfstate
  notify:
    - add hostkeys

- name: hosts.ini
  template:
    src: hosts.ini.j2
    dest: "{{ playbook_dir }}/hosts.ini"