diff options
Diffstat (limited to 'ansible/roles')
4 files changed, 53 insertions, 9 deletions
diff --git a/ansible/roles/configure_rabbitmq/tasks/main.yml b/ansible/roles/configure_rabbitmq/tasks/main.yml index 3ad60c1ea..4ff4222dc 100644 --- a/ansible/roles/configure_rabbitmq/tasks/main.yml +++ b/ansible/roles/configure_rabbitmq/tasks/main.yml @@ -12,6 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +- name: Create rabbitmq configuration + template: + src: rabbitmq.config.j2 + dest: /etc/rabbitmq/rabbitmq.config + +- name: Define user definitions file + template: + src: user_definitions.json.j2 + dest: /etc/rabbitmq/definitions.json + - name: Restart rabbitmq service: name: rabbitmq-server @@ -20,11 +30,5 @@ - name: rabbitmqctl start_app shell: rabbitmqctl start_app -- name: Configure rabbitmq - rabbitmq_user: - user: yardstick - password: yardstick - configure_priv: .* - read_priv: .* - write_priv: .* - state: present +- name: Enable management plugin + shell: rabbitmq-plugins enable rabbitmq_management diff --git a/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 b/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 new file mode 100644 index 000000000..8f07edf5c --- /dev/null +++ b/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 @@ -0,0 +1,5 @@ + [
+ {rabbitmq_management, [
+ {load_definitions, "/etc/rabbitmq/definitions.json"}
+ ]}
+].
\ No newline at end of file diff --git a/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 b/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 new file mode 100644 index 000000000..7c811f16d --- /dev/null +++ b/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 @@ -0,0 +1,23 @@ + {
+ "users": [{
+ "name": "yardstick",
+ "password_hash": "XHp9fBOE3vjTEf7ktiUBHqefW2g=",
+ "hashing_algorithm": "rabbit_password_hashing_sha256",
+ "tags": ""
+ }],
+ "vhosts": [{
+ "name": "/"
+ }],
+ "permissions": [{
+ "user": "yardstick",
+ "vhost": "/",
+ "configure": ".*",
+ "write": ".*",
+ "read": ".*"
+ }],
+ "parameters": [],
+ "policies": [],
+ "queues": [],
+ "exchanges": [],
+ "bindings": []
+}
diff --git a/ansible/roles/download_samplevnfs/defaults/main.yml b/ansible/roles/download_samplevnfs/defaults/main.yml index c5e880e57..104f594f5 100644 --- a/ansible/roles/download_samplevnfs/defaults/main.yml +++ b/ansible/roles/download_samplevnfs/defaults/main.yml @@ -1,4 +1,16 @@ --- +# samplevnf_version must be a valid version accepted by "git checkout" +# It can be either: +# - a branch name: fetch branch latest commits, as of installation time +# - a tag name: frozen and reproducible, from stable branches, or +# - a commit id: frozen and reproducible, from any branch +# Some examples: +# - branch name: "master", "stable/gambia", "stable/fraser" +# - tag name: "opnfv-6.2.0" +# - commit id: "3afd384b7e68a3cd29f4d2cdf39785f8441d0b6f" +# Please refer to https://git.opnfv.org/samplevnf for possible values +# beyond the one specified below + samplevnf_url: "https://git.opnfv.org/samplevnf" samplevnf_dest: "{{ clone_dest }}/samplevnf" -samplevnf_version: "stable/fraser" +samplevnf_version: "3afd384b7e68a3cd29f4d2cdf39785f8441d0b6f" |