فهرست منبع

Aaaand I forgot why I did that in the first place:

'include' doesn't expect variables :/
cmacrae 10 سال پیش
والد
کامیت
e64e9efce2
6فایلهای تغییر یافته به همراه30 افزوده شده و 6 حذف شده
  1. 5 1
      tasks/client.yml
  2. 5 1
      tasks/dashboard.yml
  3. 5 1
      tasks/main.yml
  4. 5 1
      tasks/rabbit.yml
  5. 5 1
      tasks/redis.yml
  6. 5 1
      tasks/server.yml

+ 5 - 1
tasks/client.yml

@@ -19,7 +19,11 @@
               src={{ sensu_client_config  }}
     notify: restart sensu-client service
 
-  - include: "{{ ansible_distribution }}/client.yml"
+  - include: SmartOS/client.yml
+    when: ansible_distribution == SmartOS
+
+  - include: Ubuntu/client.yml
+    when: ansible_distribution == Ubuntu
 
   - name: Ensure Sensu client service is running
     service: name=sensu-client state=started enabled=yes

+ 5 - 1
tasks/dashboard.yml

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

+ 5 - 1
tasks/main.yml

@@ -1,7 +1,11 @@
 ---
 # tasks/main.yml: "Master" playbook for the cmacrae.sensu role
 
-  - include: "{{ ansible_distribution }}/main.yml tags=setup"
+  - include: SmartOS/main.yml tags=setup
+    when: ansible_distribution == SmartOS
+
+  - include: Ubuntu/main.yml tags=setup
+    when: ansible_distribution == Ubuntu
       
   - include: ssl.yml tags=ssl
 

+ 5 - 1
tasks/rabbit.yml

@@ -7,7 +7,11 @@
       - "{{ ansible_os_family }}.yml"
       - default.yml
 
-  - include: "{{ ansible_distribution }}/rabbit.yml"
+  - include: SmartOS/rabbit.yml
+    when: ansible_distribution == SmartOS
+
+  - include: Ubuntu/rabbit.yml
+    when: ansible_distribution == Ubuntu
 
   - name: Ensure RabbitMQ SSL directory exists
     file: dest={{ rabbitmq_config_path }}/ssl state=directory

+ 5 - 1
tasks/redis.yml

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

+ 5 - 1
tasks/server.yml

@@ -12,7 +12,11 @@
               src=sensu-redis.json.j2
     notify: restart sensu-api service
 
-  - include: "{{ ansible_distribution }}/server.yml"
+  - include: SmartOS/server.yml
+    when: ansible_distribution == SmartOS
+
+  - include: Ubuntu/server.yml
+    when: ansible_distribution == Ubuntu
 
   - name: Ensure Sensu server service is running
     service: name=sensu-server state=started enabled=yes