aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml')
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml59
1 files changed, 59 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml
new file mode 100755
index 00000000..e36d8f22
--- /dev/null
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml
@@ -0,0 +1,59 @@
+---
+#- hosts: control
+# sudo: yes
+# tasks:
+- name: "enable supervisor control"
+ file:
+ path: "/etc/init/supervisor-control.override"
+ state: "absent"
+
+- name: "enable supervisor dns"
+ file:
+ path: "/etc/init/supervisor-dns.override"
+ state: "absent"
+
+- name: "modify ifmap server basicauthusers properties for control"
+ lineinfile:
+ dest: "/etc/ifmap-server/basicauthusers.properties"
+ line: "{{ hostvars[item]['contrail_address' ] }}:{{ hostvars[item]['contrail_address' ] }}"
+ with_items: groups['opencontrail_control']
+
+- name: "modify ifmap server basicauthusers properties for dns"
+ lineinfile:
+ dest: "/etc/ifmap-server/basicauthusers.properties"
+ line: "{{ hostvars[item]['contrail_address' ] }}.dns:{{ hostvars[item]['contrail_address' ] }}.dns"
+ with_items: groups['opencontrail_control']
+
+- name: "node-common"
+ include: -node-common.yml
+
+- name: "fix up contrail control config"
+ template:
+ src: "provision/contrail-control-conf.j2"
+ dest: "/etc/contrail/contrail-control.conf"
+
+- name: "fix up contrail dns config"
+ template:
+ src: "provision/contrail-dns-conf.j2"
+ dest: "/etc/contrail/contrail-dns.conf"
+
+- name: "fix up contrail control nodemgr config"
+ ini_file:
+ dest: "/etc/contrail/contrail-control-nodemgr.conf"
+ section: "DISCOVERY"
+ option: "server"
+ value: "{{ contrail_haproxy_address }}"
+
+- name: "modify dns configuration"
+ replace:
+ dest: "/etc/contrail/dns/{{ item }}"
+ regexp: "secret \"secret123\""
+ replace: "secret \"xvysmOR8lnUQRBcunkC6vg==\""
+ with_items:
+ - "contrail-rndc.conf"
+ - "contrail-named.conf"
+
+- name: "restart supervisor control"
+ service:
+ name: "supervisor-control"
+ state: "restarted"