summaryrefslogtreecommitdiffstats
path: root/ansible_collections/infinidat/infinibox/playbooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 04:05:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 04:05:57 +0000
commit0dcbb2c58231264c2f0a0374733b5e9cf8747e1f (patch)
tree7f133117f9ebecefdc96e42e01ee7557247d5d8a /ansible_collections/infinidat/infinibox/playbooks
parentAdding debian version 9.4.0+dfsg-1. (diff)
downloadansible-0dcbb2c58231264c2f0a0374733b5e9cf8747e1f.tar.xz
ansible-0dcbb2c58231264c2f0a0374733b5e9cf8747e1f.zip
Merging upstream version 9.5.1+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/infinidat/infinibox/playbooks')
-rw-r--r--ansible_collections/infinidat/infinibox/playbooks/configure_array.yml134
1 files changed, 80 insertions, 54 deletions
diff --git a/ansible_collections/infinidat/infinibox/playbooks/configure_array.yml b/ansible_collections/infinidat/infinibox/playbooks/configure_array.yml
index bee0899d1..c3ab24c20 100644
--- a/ansible_collections/infinidat/infinibox/playbooks/configure_array.yml
+++ b/ansible_collections/infinidat/infinibox/playbooks/configure_array.yml
@@ -4,47 +4,6 @@
- name: Configure an Infinibox Array
hosts: localhost
gather_facts: false
- # vars:
- # - dataset_default_provisioning: THIN
- # - use_base2_units: true
- # - table_export_limit: 3000
- # - admin_user_name: admin
- # - admin_user_password: 123456
- # - admin_user_email: dev.mgmt@infinidat.com
- # - pool_admin_user_name: Commvault
- # - pool_admin_user_password: 123456
- # - pool_admin_user_email: dohlemacher@infinidat.com
- # - ldap_name: PSUS_ANSIBLE_ad
- # - setup_alerting_emails: ["dohlemacher@infinidat.com"]
- # - prod_alerting_emails: ["dohlemacher@infinidat.com"]
- # - alerting_event_levels: ["INFO", "WARNING", "ERROR", "CRITICAL"]
- # - alerting_includes: []
- # - alerting_excludes: ["EVENT_FLOOD", "USER_LOGIN_SUCCESS", "USER_LOGGED_OUT"]
- # - syslogs: # A list of syslog dictionaries
- # - target_name: syslog1_target
- # rule_name: syslog1
- # protocol: SYSLOG
- # host: 172.31.88.158
- # port: 514
- # facility: LOCAL7
- # transport: UDP
- # post_test: true # Not a real test if using UDP
- # - target_name: syslog2_target
- # rule_name: syslog2
- # protocol: SYSLOG
- # host: 172.31.88.158
- # port: 515
- # facility: LOCAL7
- # transport: UDP
- # post_test: true
- # - target_name: graylog_target
- # rule_name: graylog
- # protocol: SYSLOG
- # host: 172.31.77.214
- # port: 1514
- # facility: LOCAL7
- # transport: UDP
- # post_test: true
tasks:
- name: Configuration
ansible.builtin.debug:
@@ -55,7 +14,7 @@
- name: Pause
ansible.builtin.pause:
- seconds: 2
+ seconds: 3
- name: Create temporary setup email notification rule setup_email for addresses {{ setup_alerting_emails }}
infinidat.infinibox.infini_notification_rule:
@@ -293,31 +252,98 @@
password: "{{ password }}"
system: "{{ system }}"
- # - name: TODO by David - Configure Infinimetrics - Add Infinibox
- # ansible.builtin.debug:
- # msg: (9) Add Infinibox to Infinimetrics
+ - name: Configure infinimetrics readonly user
+ infinidat.infinibox.infini_user:
+ user_name: "{{ ibox_readonly_user }}"
+ user_email: "{{ ibox_readonly_email }}"
+ user_password: "{{ admin_user_password }}"
+ user_role: "read_only"
+ state: "present"
+ user: "{{ user }}"
+ password: "{{ password }}"
+ system: "{{ system }}"
+
+ - name: Remove Infinibox from Infinimetrics
+ infinidat.infinibox.infini_infinimetrics:
+ ibox_serial: "{{ ibox_serial }}"
+ imx_system: "{{ imx_system }}"
+ imx_user: "{{ imx_user }}"
+ imx_password: "{{ imx_password }}"
+ state: absent
+ user: "{{ user }}"
+ password: "{{ password }}"
+ system: "{{ system }}"
+
+ - name: Remove Infinibox from Infinimetrics again to test idempotency
+ infinidat.infinibox.infini_infinimetrics:
+ ibox_serial: "{{ ibox_serial }}"
+ imx_system: "{{imx_system}}"
+ imx_user: "{{ imx_user }}"
+ imx_password: "{{ imx_password }}"
+ state: absent
+ user: "{{ user }}"
+ password: "{{ password }}"
+ system: "{{ system }}"
+
+ - name: Add Infinibox to Infinimetrics
+ infinidat.infinibox.infini_infinimetrics:
+ ibox_serial: "{{ ibox_serial }}"
+ ibox_url: "{{ ibox_url }}"
+ ibox_readonly_user: "{{ ibox_readonly_user }}"
+ ibox_readonly_password: "{{ ibox_readonly_password }}"
+ imx_system: "{{imx_system}}"
+ imx_user: "{{ imx_user }}"
+ imx_password: "{{ imx_password }}"
+ state: present
+ user: "{{ user }}"
+ password: "{{ password }}"
+ system: "{{ system }}"
+
+ - name: Pause 25 seconds to allow IMX to reflect addition of Infinibox
+ ansible.builtin.pause:
+ seconds: 25
+
+ - name: Add Infinibox to Infinimetrics again to test idempotency
+ infinidat.infinibox.infini_infinimetrics:
+ ibox_serial: "{{ ibox_serial }}"
+ ibox_url: "{{ ibox_url }}"
+ ibox_readonly_user: "{{ ibox_readonly_user }}"
+ ibox_readonly_password: "{{ ibox_readonly_password }}"
+ imx_system: "{{imx_system}}"
+ imx_user: "{{ imx_user }}"
+ imx_password: "{{ imx_password }}"
+ state: present
+ user: "{{ user }}"
+ password: "{{ password }}"
+ system: "{{ system }}"
- name: Create pools
infinidat.infinibox.infini_pool:
- name: "{{ item }}"
- size: "{{ pool_size }}"
- vsize: "{{ pool_size }}"
+ name: "{{ item.name }}"
+ size: "{{ item.size }}"
+ vsize: "{{ item.vsize }}"
+ physical_capacity_warning: "{{ item.physical_capacity_warning }}"
+ physical_capacity_critical: "{{ item.physical_capacity_critical }}"
state: present
user: "{{ user }}"
password: "{{ password }}"
system: "{{ system }}"
loop:
- - pool-a
- - pool-b
- - pool-c
-
- - name: Set up pool admin user for pool
+ - { name: 'CDRFS', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '100', physical_capacity_critical: '100'}
+ - { name: 'HNS', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '80', physical_capacity_critical: '90' }
+ - { name: 'PHYSICAL', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '80', physical_capacity_critical: '90' }
+ - { name: 'POWER', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '80', physical_capacity_critical: '90' }
+ - { name: 'RECLAIM', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '80', physical_capacity_critical: '90' }
+ - { name: 'VIRTUAL', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '80', physical_capacity_critical: '90' }
+ - { name: 'VIRTUAL_REP', size: "{{ pool_size }}", vsize: "{{ pool_vsize }}", physical_capacity_warning: '80', physical_capacity_critical: '90' }
+
+ - name: Set up pool admin user for CDRFS pool
infinidat.infinibox.infini_user:
user_name: "{{ pool_admin_user_name }}"
user_email: "{{ pool_admin_user_email }}"
user_password: "{{ pool_admin_user_password }}"
user_role: "pool_admin"
- user_pool: "pool-a"
+ user_pool: "CDRFS"
state: "present"
user: "{{ user }}"
password: "{{ password }}"