Merge "Convert role to use a common systemd mount role"
This commit is contained in:
commit
5586769730
@ -13,14 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Start glance mount(s)
|
|
||||||
systemd:
|
|
||||||
daemon_reload: yes
|
|
||||||
name: "{{ item.local_path.lstrip('/') | replace('/', '-') }}.mount"
|
|
||||||
enabled: "yes"
|
|
||||||
state: "restarted"
|
|
||||||
with_items: "{{ glance_nfs_client }}"
|
|
||||||
|
|
||||||
- name: Stop services
|
- name: Stop services
|
||||||
service:
|
service:
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
|
@ -78,19 +78,33 @@
|
|||||||
- Manage LB
|
- Manage LB
|
||||||
- Restart glance services
|
- Restart glance services
|
||||||
|
|
||||||
- name: Glance nfs mount(s)
|
- name: Run the systemd mount role
|
||||||
config_template:
|
include_role:
|
||||||
src: "glance-systemd-mount.j2"
|
name: systemd_mount
|
||||||
dest: "/etc/systemd/system/{{ item.local_path.lstrip('/') | replace('/', '-') }}.mount"
|
private: true
|
||||||
owner: "root"
|
vars:
|
||||||
group: "root"
|
systemd_mounts:
|
||||||
mode: "0640"
|
- config_overrides: "{{ mount_var.config_overrides | default({}) }}"
|
||||||
config_overrides: "{{ item.config_overrides | default({}) }}"
|
what: "{{ mount_var.server }}:{{ mount_var.remote_path }}"
|
||||||
config_type: "ini"
|
where: "{{ mount_var.local_path }}"
|
||||||
when: item.condition | default(True)
|
type: "{{ mount_var.type }}"
|
||||||
|
options: "{{ mount_var.options }}"
|
||||||
|
unit:
|
||||||
|
After:
|
||||||
|
- network.target rpcbind.service rpc-statd.service
|
||||||
|
Conflicts:
|
||||||
|
- umount.target
|
||||||
|
Requires:
|
||||||
|
- rpcbind.service rpc-statd.service
|
||||||
|
Before:
|
||||||
|
- glance-api.service
|
||||||
|
state: 'started'
|
||||||
|
enabled: true
|
||||||
with_items: "{{ glance_nfs_client }}"
|
with_items: "{{ glance_nfs_client }}"
|
||||||
notify:
|
loop_control:
|
||||||
- Start glance mount(s)
|
loop_var: mount_var
|
||||||
|
tags:
|
||||||
|
- glance-config
|
||||||
|
|
||||||
- name: Create glance cache management cron jobs
|
- name: Create glance cache management cron jobs
|
||||||
cron:
|
cron:
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Glance Images {{ item.local_path }}
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Mount]
|
|
||||||
What={{ item.server }}:{{ item.remote_path }}
|
|
||||||
Where={{ item.local_path }}
|
|
||||||
Type={{ item.type }}
|
|
||||||
Options={{ item.options | default('_netdev,auto') }}
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -58,6 +58,10 @@
|
|||||||
src: https://git.openstack.org/openstack/ansible-role-systemd_service
|
src: https://git.openstack.org/openstack/ansible-role-systemd_service
|
||||||
scm: git
|
scm: git
|
||||||
version: master
|
version: master
|
||||||
|
- name: systemd_mount
|
||||||
|
src: https://git.openstack.org/openstack/ansible-role-systemd_mount
|
||||||
|
scm: git
|
||||||
|
version: master
|
||||||
- name: python_venv_build
|
- name: python_venv_build
|
||||||
src: https://git.openstack.org/openstack/ansible-role-python_venv_build
|
src: https://git.openstack.org/openstack/ansible-role-python_venv_build
|
||||||
scm: git
|
scm: git
|
||||||
|
Loading…
x
Reference in New Issue
Block a user