aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/congress/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/congress/tasks')
-rwxr-xr-xdeploy/adapters/ansible/roles/congress/tasks/congress_database.yml34
-rwxr-xr-xdeploy/adapters/ansible/roles/congress/tasks/congress_install.yml39
-rwxr-xr-xdeploy/adapters/ansible/roles/congress/tasks/congress_keystone.yml70
-rwxr-xr-xdeploy/adapters/ansible/roles/congress/tasks/congress_start.yml12
-rwxr-xr-xdeploy/adapters/ansible/roles/congress/tasks/main.yml39
5 files changed, 0 insertions, 194 deletions
diff --git a/deploy/adapters/ansible/roles/congress/tasks/congress_database.yml b/deploy/adapters/ansible/roles/congress/tasks/congress_database.yml
deleted file mode 100755
index 009e3488..00000000
--- a/deploy/adapters/ansible/roles/congress/tasks/congress_database.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-#############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: create congress db
- mysql_db:
- login_unix_socket: /var/run/mysqld/mysqld.sock
- name: "{{ item.db }}"
- state: present
- with_items: "{{ congress_database }}"
-
-- name: create congress db user
- mysql_user:
- login_unix_socket: /var/run/mysqld/mysqld.sock
- name: "{{ item[0].user }}"
- password: "{{ item[0].password }}"
- priv: "*.*:ALL,GRANT"
- host: "{{ item[1] }}"
- state: present
- with_nested:
- - "{{ congress_database }}"
- - ['%', 'localhost']
-
-- name: congress db sync
- shell: |
- "{{ congress_path }}"/congress-db-manage \
- --config-file /etc/congress/congress.conf upgrade head
- notify:
- - restart congress services
diff --git a/deploy/adapters/ansible/roles/congress/tasks/congress_install.yml b/deploy/adapters/ansible/roles/congress/tasks/congress_install.yml
deleted file mode 100755
index 40d5d78e..00000000
--- a/deploy/adapters/ansible/roles/congress/tasks/congress_install.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: install congress packages
- pip: name={{ item }} state=present
- with_items: "{{ pip_packages | union(packages_noarch) }}"
-
-- name: create congress etc directory
- file: path=/etc/congress state=directory
-
-- name: update congress conf
- template: src={{ item }} dest=/etc/congress/{{ item }}
- backup=yes
- with_items:
- - congress.conf
- - api-paste.ini
- - policy.json
- notify:
- - restart congress services
-
-- name: create congress service
- template: src=congress.service dest=/lib/systemd/system/
- notify:
- - restart congress services
-
-- name: create congress service work dir
- file: path=/var/lib/congress state=directory
-
-- name: link the congress service
- file:
- src: /lib/systemd/system/congress.service
- dest: /etc/systemd/system/multi-user.target.wants/congress.service
- state: link
diff --git a/deploy/adapters/ansible/roles/congress/tasks/congress_keystone.yml b/deploy/adapters/ansible/roles/congress/tasks/congress_keystone.yml
deleted file mode 100755
index b7f00b88..00000000
--- a/deploy/adapters/ansible/roles/congress/tasks/congress_keystone.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-###############################################################################
----
-- name: add service
- os_keystone_service:
- cloud: opnfv
- name: "{{ item.name }}"
- description: "{{ item.description }}"
- service_type: "{{ item.type }}"
- with_items: "{{ congress_service }}"
-
-- name: add user
- os_user:
- cloud: opnfv
- domain: default
- name: "{{ item.user }}"
- password: "{{ item.password }}"
- default_project: "{{ item.tenant }}"
- email: "{{ item.email }}"
- with_items: "{{ congress_user }}"
-
-- name: grant roles
- os_user_role:
- cloud: opnfv
- user: "{{ item.user }}"
- role: "{{ item.role }}"
- project: "{{ item.tenant }}"
- with_items: "{{ congress_user }}"
-
-- name: create admin url for service's endpoint
- keystone_endpoint:
- cloud: opnfv
- endpoint_type: admin
- name: "{{ item.name }}"
- service_type: "{{ item.type }}"
- state: present
- interface: admin
- region: "{{ item.region}}"
- url: "{{ item.adminurl }}"
- with_items: "{{ congress_service }}"
-
-- name: create internal url for service's endpoint
- keystone_endpoint:
- cloud: opnfv
- endpoint_type: admin
- name: "{{ item.name }}"
- service_type: "{{ item.type }}"
- state: present
- interface: internal
- region: "{{ item.region}}"
- url: "{{ item.internalurl }}"
- with_items: "{{ congress_service }}"
-
-- name: create public url for service'e endpoint
- keystone_endpoint:
- cloud: opnfv
- endpoint_type: admin
- name: "{{ item.name }}"
- service_type: "{{ item.type }}"
- state: present
- interface: public
- region: "{{ item.region}}"
- url: "{{ item.publicurl }}"
- with_items: "{{ congress_service }}"
diff --git a/deploy/adapters/ansible/roles/congress/tasks/congress_start.yml b/deploy/adapters/ansible/roles/congress/tasks/congress_start.yml
deleted file mode 100755
index 1d7d5e52..00000000
--- a/deploy/adapters/ansible/roles/congress/tasks/congress_start.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-##############################################################################
-## Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-##
-## All rights reserved. This program and the accompanying materials
-## are made available under the terms of the Apache License, Version 2.0
-## which accompanies this distribution, and is available at
-## http://www.apache.org/licenses/LICENSE-2.0
-###############################################################################
----
-- name: start congress services
- service: name={{ item }} state=started enabled=yes
- with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/congress/tasks/main.yml b/deploy/adapters/ansible/roles/congress/tasks/main.yml
deleted file mode 100755
index 6aad108f..00000000
--- a/deploy/adapters/ansible/roles/congress/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- include_vars: "{{ ansible_os_family }}.yml"
- tags:
- - install
- - start
-
-- include: congress_install.yml
- tags:
- - install
-
-- include: congress_keystone.yml
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
- tags:
- - keystone
-
-- include: congress_database.yml
- when:
- - inventory_hostname == haproxy_hosts.keys()[0]
- tags:
- - database
-
-- include: congress_start.yml
- tags:
- - start
-
-- meta: flush_handlers
- tags:
- - install
- - keystone
- - database