diff --git a/ansible/browbeat/adjustment.yml b/ansible/browbeat/adjustment.yml index 63b480143..58a628ffc 100644 --- a/ansible/browbeat/adjustment.yml +++ b/ansible/browbeat/adjustment.yml @@ -17,4 +17,5 @@ threads: 6 roles: - nova + - neutron - keystone diff --git a/ansible/browbeat/roles/neutron/handlers/main.yml b/ansible/browbeat/roles/neutron/handlers/main.yml new file mode 100644 index 000000000..24354005b --- /dev/null +++ b/ansible/browbeat/roles/neutron/handlers/main.yml @@ -0,0 +1,31 @@ +--- +# +# Neutron handlers for browbeat adjustment +# + +- name: unmanage neutron services + command: pcs resource unmanage {{ item }} + with_items: + - neutron-server + - neutron-metadata-agent + ignore_errors: true + +- name: restart neutron services + service: name={{ item }} state=restarted + with_items: + - neutron-server + - neutron-metadata-agent + +- name: manage neutron services + command: pcs resource manage {{ item }} + with_items: + - neutron-server + - neutron-metadata-agent + ignore_errors: true + +- name: cleanup neutron services + command: pcs resource cleanup {{ item }} + with_items: + - neutron-server + - neutron-metadata-agent + ignore_errors: true diff --git a/ansible/browbeat/roles/neutron/tasks/main.yml b/ansible/browbeat/roles/neutron/tasks/main.yml new file mode 100644 index 000000000..3e4950c2c --- /dev/null +++ b/ansible/browbeat/roles/neutron/tasks/main.yml @@ -0,0 +1,40 @@ +--- +# +# Neutron tasks for Browbeat +# * Can change worker count +# + +- name: Configure neutron.conf + ini_file: + dest: /etc/neutron/neutron.conf + mode: 0640 + section: "{{ item.section }}" + option: "{{ item.option }}" + value: "{{ item.value }}" + backup: yes + with_items: + - { section: DEFAULT, option: verbose, value: False } + - { section: DEFAULT, option: debug, value: False } + - { section: DEFAULT, option: api_workers, value: "{{ workers }}" } + - { section: DEFAULT, option: rpc_workers, value: "{{ workers }}" } + notify: + - unmanage neutron services + - restart neutron services + - manage neutron services + - cleanup neutron services + +- name: Configure metadata_agent.ini + ini_file: + dest: /etc/neutron/metadata_agent.ini + mode: 0640 + section: "{{ item.section }}" + option: "{{ item.option }}" + value: "{{ item.value }}" + backup: yes + with_items: + - { section: DEFAULT, option: metadata_workers, value: "{{ workers }}" } + notify: + - unmanage neutron services + - restart neutron services + - manage neutron services + - cleanup neutron services diff --git a/ansible/install/roles/neutron/handlers/main.yml b/ansible/install/roles/neutron/handlers/main.yml index c8db46995..1da13ab5b 100644 --- a/ansible/install/roles/neutron/handlers/main.yml +++ b/ansible/install/roles/neutron/handlers/main.yml @@ -1,6 +1,6 @@ --- # -# Neutron handlers +# Neutron handlers for browbeat install connmon # - name: unmanage neutron-server