aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/qtip-generator/files/doctor/setup.yml
blob: 2a1f868d01e7035e2b74e6663f7a595e25f6632e (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
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
{% raw %}
##############################################################################
# Copyright (c) 2017 ZTE Corporation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

---
- hosts: doctor-tester

  gather_facts: no

  tasks:

  - name: creating doctor project
    os_project:
      name: "{{ doctor_project }}"
      description: test project for doctor verification
      domain: "{{ doctor_domain }}"
      enabled: true

  - name: creating doctor user
    os_user:
      name: "{{ doctor_user }}"
      password: "{{ doctor_pass }}"
      domain: "{{ doctor_domain }}"
      default_project: "{{ doctor_project }}"

  - name: assigning role to doctor user
    os_user_role:
      user: "{{ doctor_user }}"
      role: "{{ doctor_role }}"
      project: "{{ doctor_project }}"

  - name: adding admin user to doctor project
    os_user_role:
      user: admin
      role: admin
      project: "{{ doctor_project }}"

  - name: creating doctor network
    os_network:
      auth: "{{ doctor_auth }}"
      name: "{{ doctor_network }}"

  - name: creating doctor subnet
    os_subnet:
      auth: "{{ doctor_auth }}"
      name: "{{ doctor_subnet }}"
      cidr: "{{ doctor_cidr }}"
      network_name: "{{ doctor_network }}"
      enable_dhcp: false
{% endraw %}