Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
4499b90f
Commit
4499b90f
authored
Jan 22, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing the gluster names
parent
18a3e442
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
playbooks/roles/gluster/tasks/main.yml
+15
-15
No files found.
playbooks/roles/gluster/tasks/main.yml
View file @
4499b90f
---
# Install and configure simple glusterFS shared storage
-
name
:
Install common packages
-
name
:
all |
Install common packages
apt
:
name={{ item }} state=present
with_items
:
-
glusterfs-client
...
...
@@ -9,60 +9,60 @@
-
nfs-common
tags
:
gluster
-
name
:
Install server packages
-
name
:
all |
Install server packages
apt
:
name=glusterfs-server state=present
when
:
>
"{{ ansible_default_ipv4.address }}" "{{ gluster_peers|join(' ') }}"
tags
:
gluster
-
name
:
enable server
-
name
:
all |
enable server
service
:
name=glusterfs-server state=started enabled=yes
when
:
>
"{{ ansible_default_ipv4.address }}" in "{{ gluster_peers|join(' ') }}"
tags
:
gluster
# Ignoring error below so that we can move the data folder and have it be a link
-
name
:
create folders
-
name
:
all |
create folders
file
:
path={{ item.path }} state=directory
with_items
:
gluster_volumes
when
:
>
"{{ ansible_default_ipv4.address }}" in "{{ gluster_peers|join(' ') }}"
"{{ ansible_default_ipv4.address }}" in "{{ gluster_peers|join(' ') }}"
ignore_errors
:
yes
tags
:
gluster
-
name
:
create peers
-
name
:
primary |
create peers
command
:
gluster peer probe {{ item }}
with_items
:
gluster_peers
when
:
ansible_default_ipv4.address == gluster_primary_ip
tags
:
gluster
-
name
:
create volumes
-
name
:
primary |
create volumes
command
:
gluster volume create {{ item.name }} replica {{ item.replicas }} transport tcp {% for server in gluster_peers %}{{ server }}:{{ item.path }} {% endfor %}
with_items
:
gluster_volumes
when
:
ansible_default_ipv4.address == gluster_primary_ip
ignore_errors
:
yes
# There should be better error checking here
tags
:
gluster
-
name
:
start volumes
-
name
:
primary |
start volumes
command
:
gluster volume start {{ item.name }}
with_items
:
gluster_volumes
when
:
ansible_default_ipv4.address == gluster_primary_ip
ignore_errors
:
yes
# There should be better error checking here
tags
:
gluster
-
name
:
set security
-
name
:
primary |
set security
command
:
gluster volume set {{ item.name }} auth.allow {{ item.security }}
with_items
:
gluster_volumes
when
:
ansible_default_ipv4.address == gluster_primary_ip
tags
:
gluster
-
name
:
set performance cache
-
name
:
primary |
set performance cache
command
:
gluster volume set {{ item.name }} performance.cache-size {{ item.cache_size }}
with_items
:
gluster_volumes
when
:
ansible_default_ipv4.address == gluster_primary_ip
tags
:
gluster
-
name
:
mount volume
-
name
:
all |
mount volume
mount
:
>
name={{ item.mount_location }}
src={{ gluster_primary_ip }}:{{ item.name }}
...
...
@@ -71,10 +71,10 @@
opts=defaults,_netdev
with_items
:
gluster_volumes
tags
:
gluster
# This required due to an annoying bug in Ubuntu and gluster where it tries to mount the system
# before the network stack is up and can't lookup 127.0.0.1
-
name
:
sleep mount
-
name
:
all |
sleep mount
lineinfile
:
>
dest=/etc/rc.local
line='sleep 5; /bin/mount -a'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment