adds the config_template to swift
The change modifies the swift template tasks such that it's now using the config_template action plugin. This change will make so that config files can be dynamically updated, by a deployer, at run time, without requiring the need to modify the in tree templates or defaults. Partially implements: blueprint tunable-openstack-configuration Change-Id: Id992937f35afa0549f9f0d0fbcf0be5e6978df57
This commit is contained in:
parent
235649dc78
commit
9f559457f4
@ -187,3 +187,14 @@ swift_object_program_names:
|
||||
|
||||
swift_proxy_program_names:
|
||||
- swift-proxy-server
|
||||
|
||||
## Tunable overrides
|
||||
swift_swift_conf_overrides: {}
|
||||
swift_swift_dispersion_conf_overrides: {}
|
||||
swift_proxy_server_conf_overrides: {}
|
||||
swift_account_server_conf_overrides: {}
|
||||
swift_account_server_replicator_conf_overrides: {}
|
||||
swift_container_server_conf_overrides: {}
|
||||
swift_container_server_replicator_conf_overrides: {}
|
||||
swift_object_server_conf_overrides: {}
|
||||
swift_object_server_replicator_conf_overrides: {}
|
||||
|
@ -14,15 +14,40 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Copy swift config
|
||||
template:
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "swift.conf.j2", dest: "/etc/swift/swift.conf" }
|
||||
- { src: "swift-rsyslog.conf.j2", dest: "/etc/rsyslog.d/49-swift.conf" }
|
||||
- { src: "swift-dispersion.conf.j2", dest: "/etc/swift/dispersion.conf" }
|
||||
- src: "swift.conf.j2"
|
||||
dest: "/etc/swift/swift.conf"
|
||||
config_overrides: "{{ swift_swift_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
- src: "swift-dispersion.conf.j2"
|
||||
dest: "/etc/swift/dispersion.conf"
|
||||
config_overrides: "{{ swift_swift_dispersion_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
notify:
|
||||
- Restart swift account services
|
||||
- Restart swift container services
|
||||
- Restart swift object services
|
||||
- Restart swift proxy services
|
||||
tags:
|
||||
- swift-config
|
||||
- swift-post-install
|
||||
|
||||
- name: Copy swift config
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
with_items:
|
||||
- { src: "swift-rsyslog.conf.j2", dest: "/etc/rsyslog.d/49-swift.conf" }
|
||||
notify:
|
||||
- Restart swift account services
|
||||
- Restart swift container services
|
||||
|
@ -23,9 +23,17 @@
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: swift proxy server configuration
|
||||
template:
|
||||
src: "proxy-server.conf.j2"
|
||||
dest: "/etc/swift/proxy-server/proxy-server.conf"
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- src: "proxy-server.conf.j2"
|
||||
dest: "/etc/swift/proxy-server/proxy-server.conf"
|
||||
config_overrides: "{{ swift_proxy_server_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
notify: Restart swift proxy services
|
||||
|
@ -80,26 +80,36 @@
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: "Swift account server configuration"
|
||||
template:
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "account-server.conf.j2", dest: "/etc/swift/account-server/account-server.conf" }
|
||||
- src: "account-server.conf.j2"
|
||||
dest: "/etc/swift/account-server/account-server.conf"
|
||||
config_overrides: "{{ swift_account_server_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
notify: Restart swift account services
|
||||
|
||||
# We only create the dedicated replicator configuration when using a dedicated replication_network
|
||||
- name: "Swift account server replicator configuration"
|
||||
template:
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "account-server-replicator.conf.j2", dest: "/etc/swift/account-server/account-server-replicator.conf" }
|
||||
- src: "account-server-replicator.conf.j2"
|
||||
dest: "/etc/swift/account-server/account-server-replicator.conf"
|
||||
config_overrides: "{{ swift_account_server_replicator_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
when: >
|
||||
swift.replication_network is defined and
|
||||
swift.replication_network != swift.storage_network
|
||||
|
@ -89,26 +89,36 @@
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: "Swift container server configuration"
|
||||
template:
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "container-server.conf.j2", dest: "/etc/swift/container-server/container-server.conf" }
|
||||
- src: "container-server.conf.j2"
|
||||
dest: "/etc/swift/container-server/container-server.conf"
|
||||
config_overrides: "{{ swift_container_server_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
notify: Restart swift container services
|
||||
|
||||
# We only create the dedicated replicator configuration when using a dedicated replication_network
|
||||
- name: "Swift container server configuration"
|
||||
template:
|
||||
- name: "Swift container server replicator configuration"
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "container-server-replicator.conf.j2", dest: "/etc/swift/container-server/container-server-replicator.conf" }
|
||||
- src: "container-server-replicator.conf.j2"
|
||||
dest: "/etc/swift/container-server/container-server-replicator.conf"
|
||||
config_overrides: "{{ swift_container_server_replicator_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
when: >
|
||||
swift.replication_network is defined and
|
||||
swift.replication_network != swift.storage_network
|
||||
|
@ -80,26 +80,36 @@
|
||||
service_home: "{{ swift_system_home_folder }}"
|
||||
|
||||
- name: "Swift object server configuration"
|
||||
template:
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "object-server.conf.j2", dest: "/etc/swift/object-server/object-server.conf" }
|
||||
- src: "object-server.conf.j2"
|
||||
dest: "/etc/swift/object-server/object-server.conf"
|
||||
config_overrides: "{{ swift_object_server_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
notify: Restart swift object services
|
||||
|
||||
# We only create the dedicated replicator configuration when using a dedicated replication_network
|
||||
- name: "Swift object server configuration"
|
||||
template:
|
||||
- name: "Swift object server replicator configuration"
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ swift_system_user_name }}"
|
||||
group: "{{ swift_system_group_name }}"
|
||||
mode: "0644"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
with_items:
|
||||
- { src: "object-server-replicator.conf.j2", dest: "/etc/swift/object-server/object-server-replicator.conf" }
|
||||
- src: "object-server-replicator.conf.j2"
|
||||
dest: "/etc/swift/object-server/object-server-replicator.conf"
|
||||
config_overrides: "{{ swift_object_server_replicator_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
when: >
|
||||
swift.replication_network is defined and
|
||||
swift.replication_network != swift.storage_network
|
||||
|
Loading…
Reference in New Issue
Block a user