main.yml 3.38 KB
Newer Older
Andrew Schoen's avatar
Andrew Schoen committed
1
2
3
---
- name: validate provided configuration
  validate:
4
    mode: strict
5

6
7
8
9
10
11
12
- name: warning deprecation for fqdn configuration
  fail:
    msg: "fqdn configuration is not supported anymore. Use 'use_fqdn_yes_i_am_sure: true' if you really want to use it. See release notes for more details"
  when:
    - mon_use_fqdn or mds_use_fqdn
    - not use_fqdn_yes_i_am_sure

13
- name: debian based systems tasks
14
15
  when:
    - ansible_os_family == 'Debian'
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  block:
    - name: fail if local scenario is enabled on debian
      fail:
        msg: "'local' installation scenario not supported on Debian systems"
      when:
        - ceph_origin == 'local'
    - name: verify that ceph_rhcs_cdn_debian_repo url is valid for red hat storage
      fail:
        msg: "ceph_rhcs_cdn_debian_repo url is invalid, please set your customername:customerpasswd"
      when:
        - ceph_origin == 'repository'
        - ceph_repository == 'rhcs'
        - ceph_repository_type == 'cdn'
        - ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
        - ceph_repository not in ['rhcs', 'dev', 'obs']
31

32
33
34
35
36
37
38
- name: validate ntp daemon type
  fail:
    msg: "ntp_daemon_type must be one of chronyd, ntpd, or timesyncd"
  when:
    - ntp_service_enabled
    - ntp_daemon_type not in ['chronyd', 'ntpd', 'timesyncd']

Rishabh Dave's avatar
Rishabh Dave committed
39
# Since NTPd can not be installed on Atomic...
40
- name: abort if ntp_daemon_type is ntpd on Atomic
Rishabh Dave's avatar
Rishabh Dave committed
41
42
43
  fail:
    msg: installation can't happen on Atomic and ntpd needs to be installed
  when:
44
    - is_atomic | default(False)
Rishabh Dave's avatar
Rishabh Dave committed
45
46
47
    - ansible_os_family == 'RedHat'
    - ntp_daemon_type == 'ntpd'

48
49
50
51
52
53
54
55
- name: make sure journal_size configured
  debug:
    msg: "WARNING: journal_size is configured to {{ journal_size }}, which is less than 5GB. This is not recommended and can lead to severe issues."
  when:
    - journal_size|int < 5120
    - osd_objectstore == 'filestore'
    - osd_group_name in group_names

56
57
- name: include check_system.yml
  include_tasks: check_system.yml
Sébastien Han's avatar
Sébastien Han committed
58
59

- name: include check_devices.yml
60
  include_tasks: check_devices.yml
61
62
63
  when:
    - osd_group_name in group_names
    - not osd_auto_discovery | default(False)
64
    - devices|default([])|length > 0
65
66

- name: include check_eth_mon.yml
67
  include_tasks: check_eth_mon.yml
68
69
70
71
72
73
  when:
    - mon_group_name in group_names
    - monitor_interface != "dummy"
    - monitor_address == "0.0.0.0"
    - monitor_address_block == "subnet"

74
75
76
77
78
79
80
81
- name: include check_ipaddr_mon.yml
  include_tasks: check_ipaddr_mon.yml
  when:
    - mon_group_name in group_names
    - monitor_interface == "interface"
    - monitor_address == "0.0.0.0"
    - monitor_address_block != "subnet"

82
- name: include check_eth_rgw.yml
83
  include_tasks: check_eth_rgw.yml
84
85
86
87
  when:
    - rgw_group_name in group_names
    - radosgw_interface != "dummy"
    - radosgw_address == "0.0.0.0"
88
    - radosgw_address_block == "subnet"
89

90
91
- name: include check_rgw_multisite.yml
  include_tasks: check_rgw_multisite.yml
92
  when:
93
94
95
    - inventory_hostname in groups.get(rgw_group_name, [])
    - rgw_multisite

96
- name: include check_iscsi.yml
Guillaume Abrioux's avatar
Guillaume Abrioux committed
97
  include_tasks: check_iscsi.yml
98
99
  when:
    - iscsi_gw_group_name in group_names
100
101
102
103
104
105
106

- name: warn about radosgw_civetweb_num_threads option deprecation
  debug:
    msg: "WARNING: radosgw_civetweb_num_threads variable is deprecated. Please use radosgw_thread_pool_size instead"
  when:
    - radosgw_frontend_type == 'civetweb'
    - radosgw_civetweb_num_threads is defined