- ceilometer_configs_templates
- dest
notify: restart ceilometer relation service
+
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: ceilometer_services
- ceilometer_configs_templates
- dest
notify: restart ceilometer relation service
+
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: ceilometer_services
with_items: packages | union(packages_noarch)
- name: generate common cinder service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: upload cinder conf
with_items: packages | union(packages_noarch)
- name: generate cinder volume service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: check if physical device exists
- name: restart services
service: name={{ item }} state=restarted enabled=yes
with_items: services| union(services_noarch)
+
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: services| union(services_noarch)
- name: restart http services
service: name={{ http_service }} state=restarted enabled=yes
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ http_service }}'
+
- name: install dashboard packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: packages | union(packages_noarch)
service:
name: mysql
state: restarted
+ enabled: yes
args: "--wsrep-new-cluster"
when:
- inventory_hostname == haproxy_hosts.keys()[0]
service:
name: mysql
state: restarted
+ enabled: yes
when:
- inventory_hostname != haproxy_hosts.keys()[0]
shell: rm -rf /var/lib/mysql/ib_logfile*
- name: set owner
- file: path=/var/lib owner=mysql group=mysql recurse=yes state=directory
+ file: path=/var/lib/mysql owner=mysql group=mysql recurse=yes state=directory
- /var/lib/mongodb/journal/*
- name: manually restart mongodb server
- service: name={{ mongodb_service }} state=restarted
+ service: name={{ mongodb_service }} state=restarted enabled=yes
+
+- name: write mongodb to monitor list
+ lineinfile: dest=/opt/service create=yes line={{ mongodb_service}}
- wait_for: port=27017 delay=3 timeout=60 host={{ internal_vip.ip }}
with_items: packages | union(packages_noarch)
- name: generate glance service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update glance conf
with_items: packages | union(packages_noarch)
- name: generate ha service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: install pexpect
with_items: packages | union(packages_noarch)
- name: generate heat service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update heat conf
with_items: packages | union(packages_noarch)
- name: generate keystone service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update keystone conf
when: ansible_os_family == 'RedHat'
- name: generate neutron compute service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: config ml2 plugin
with_items: packages | union(packages_noarch)
- name: generate neutron control service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: get tenant id to fill neutron.conf
with_items: packages | union(packages_noarch)
- name: generate neutron network service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: fix openstack neutron plugin config file
- include: odl.yml
when: "'opendaylight' in {{ NEUTRON_MECHANISM_DRIVERS }}"
-- name: restart neutron services
- debug: msg="restart neutron services"
- notify:
- - restart neutron network relation service
+- name: restart neutron network relation service
+ service: name={{ item }} state=restarted enabled=yes
+ with_flattened:
+ - services_noarch
+ - services
- restart nova-compute services
- name: generate neutron control service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- meta: flush_handlers
with_items: packages | union(packages_noarch)
- name: generate nova control service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update nova conf
---
+- name: disable NetworkManager
+ service: name=NetworkManager state=stopped enabled=no
+ when: ansible_os_family == 'RedHat'
+
+- name: enable network service
+ service: name=network state=started enabled=yes
+ when: ansible_os_family == 'RedHat'
+
- name: add ovs bridge
openvswitch_bridge: bridge={{ item["name"] }} state=present
with_items: "{{ network_cfg['provider_net_mappings'] }}"