diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/setup-multi-cell-policy/README.rst | 10 | ||||
-rw-r--r-- | roles/setup-multi-cell-policy/defaults/main.yaml | 1 | ||||
-rw-r--r-- | roles/setup-multi-cell-policy/tasks/main.yaml | 18 |
3 files changed, 29 insertions, 0 deletions
diff --git a/roles/setup-multi-cell-policy/README.rst b/roles/setup-multi-cell-policy/README.rst new file mode 100644 index 0000000000..cd7b9f3903 --- /dev/null +++ b/roles/setup-multi-cell-policy/README.rst @@ -0,0 +1,10 @@ +Setup multi-cell policy on the controller host. This should not require +a restart of the n-api service (the policy changes should be read +dynamically). The stack user must exist on the controller host first. + +**Role Variables** + +.. zuul:rolevar:: nova_config_dir + :default: /etc/nova + + The nova configuration directory. diff --git a/roles/setup-multi-cell-policy/defaults/main.yaml b/roles/setup-multi-cell-policy/defaults/main.yaml new file mode 100644 index 0000000000..622a1a9e5b --- /dev/null +++ b/roles/setup-multi-cell-policy/defaults/main.yaml @@ -0,0 +1 @@ +nova_config_dir: /etc/nova diff --git a/roles/setup-multi-cell-policy/tasks/main.yaml b/roles/setup-multi-cell-policy/tasks/main.yaml new file mode 100644 index 0000000000..9adc8aad18 --- /dev/null +++ b/roles/setup-multi-cell-policy/tasks/main.yaml @@ -0,0 +1,18 @@ +# Ensure the nova configuration directory exists before writing the policy +# file to it. +- name: Create nova conf dir + file: + path: '{{ nova_config_dir }}' + state: directory + owner: stack + become: yes + +# Write the policy file rule for multi-cell resize. +- name: Setup multi-cell policy + copy: + content: | + # Enable cross-cell resize. + "compute:servers:resize:cross_cell": "rule:admin_or_owner" + dest: '{{ nova_config_dir }}/policy.yaml' + owner: stack + become: yes |