Explorar o código

Further 'include' cleanups

cmacrae %!s(int64=10) %!d(string=hai) anos
pai
achega
bf1467661a
Modificáronse 8 ficheiros con 9 adicións e 33 borrados
  1. 1 3
      tasks/client.yml
  2. 1 5
      tasks/dashboard.yml
  3. 1 3
      tasks/plugins.yml
  4. 2 8
      tasks/rabbit.yml
  5. 1 5
      tasks/redis.yml
  6. 1 3
      tasks/server.yml
  7. 1 3
      tasks/ssl.yml
  8. 1 3
      tasks/ssl_generate.yml

+ 1 - 3
tasks/client.yml

@@ -1,9 +1,7 @@
 ---
 # tasks/client.yml: Deploy various client-side configurations for Sensu
   
-  - include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution }}.yml"
+  - include_vars: "{{ ansible_distribution }}.yml"
 
   - name: Ensure the Sensu config directory is present
     file:

+ 1 - 5
tasks/dashboard.yml

@@ -1,10 +1,6 @@
 ---
 # tasks/dashboard.yml: Deployment of the Uchiwa dashboard
-  - include: SmartOS/dashboard.yml
-    when: ansible_distribution == "SmartOS"
-
-  - include: Ubuntu/dashboard.yml
-    when: ansible_distribution == "Ubuntu"
+  - include: "{{ ansible_distribution }}/dashboard.yml"
 
   - name: Ensure Uchiwa server service is running
     service: name=uchiwa state=started enabled=yes

+ 1 - 3
tasks/plugins.yml

@@ -1,9 +1,7 @@
 ---
 # tasks/plugins.yml: Deploy available checks/plugins/handlers/filters/mutators
 
-  - include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution }}.yml"
+  - include_vars: "{{ ansible_distribution }}.yml"
 
   - name: Ensure Sensu plugin directory exists
     file:

+ 2 - 8
tasks/rabbit.yml

@@ -1,15 +1,9 @@
 ---
 # tasks/rabbit.yml: Deploy RabbitMQ and set-up vhost for Sensu messaging
 
-  - include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution }}.yml"
+  - include_vars: "{{ ansible_distribution }}.yml"
 
-  - include: SmartOS/rabbit.yml
-    when: ansible_distribution == "SmartOS"
-
-  - include: Ubuntu/rabbit.yml
-    when: ansible_distribution == "Ubuntu"
+  - include: "{{ ansible_distribution }}/rabbit.yml"
 
   - name: Ensure RabbitMQ SSL directory exists
     file: dest={{ rabbitmq_config_path }}/ssl state=directory

+ 1 - 5
tasks/redis.yml

@@ -1,11 +1,7 @@
 ---
 # tasks/redis.yml: Deploy Redis
 
-  - include: SmartOS/redis.yml
-    when: ansible_distribution == "SmartOS"
-
-  - include: Ubuntu/redis.yml
-    when: ansible_distribution == "Ubuntu"
+  - include: "{{ ansible_distribution }}/redis.yml"
 
   - name: Ensure Redis is running
     service: name=redis state=started enabled=true

+ 1 - 3
tasks/server.yml

@@ -1,9 +1,7 @@
 ---
 # tasks/server.yml: Deploy Sensu Server/API
 
-  - include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution }}.yml"
+  - include_vars: "{{ ansible_distribution }}.yml"
 
   - name: Ensure the Sensu config directory is present
     file:

+ 1 - 3
tasks/ssl.yml

@@ -1,9 +1,7 @@
 ---
 # tasks/ssl.yml: Deploy the client SSL cert/key to client systems
 
-  - include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution }}.yml"
+  - include_vars: "{{ ansible_distribution }}.yml"
 
   - include: ssl_generate.yml
     when: sensu_ssl_gen_certs

+ 1 - 3
tasks/ssl_generate.yml

@@ -2,9 +2,7 @@
 # tasks/ssl_generate.yml: Generate SSL data and stash to dynamic
 # data store for deployment to clients
 
-  - include_vars: "{{ item }}"
-    with_first_found:
-      - "{{ ansible_distribution }}.yml"
+  - include_vars: "{{ ansible_distribution }}.yml"
 
   - name: Ensure Sensu SSL directory exists
     file: