Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lockss-playbook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MSU Libraries
Public
lockss-playbook
Commits
d81ce34a
Commit
d81ce34a
authored
5 years ago
by
McConahy, Renee Margaret
Browse files
Options
Downloads
Patches
Plain Diff
Make stylistic improvements.
parent
44503341
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dev.playbook.yml
+1
-2
1 addition, 2 deletions
dev.playbook.yml
roles/lockss/tasks/main.yml
+5
-2
5 additions, 2 deletions
roles/lockss/tasks/main.yml
roles/minimum_memory/tasks/main.yml
+12
-9
12 additions, 9 deletions
roles/minimum_memory/tasks/main.yml
with
18 additions
and
13 deletions
dev.playbook.yml
+
1
−
2
View file @
d81ce34a
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
-
hosts
:
lockss
-
hosts
:
lockss
become
:
true
become
:
true
vars
:
vars
:
minimum_memory_mb
:
4096
lockss_db_password
:
pass
lockss_db_password
:
pass
lockss_ui_password
:
pass
lockss_ui_password
:
pass
lockss_hostname
:
"
{{
hostname
}}"
lockss_hostname
:
"
{{
hostname
}}"
...
@@ -10,8 +11,6 @@
...
@@ -10,8 +11,6 @@
lockss_external_ipaddr
:
"
{{
external_ip
}}"
lockss_external_ipaddr
:
"
{{
external_ip
}}"
lockss_access_subnet
:
0.0.0.0/0
lockss_access_subnet
:
0.0.0.0/0
lockss_admin_email
:
root@localhost
lockss_admin_email
:
root@localhost
minimum_memory_mb
:
4096
roles
:
roles
:
-
system-update
-
system-update
-
minimum_memory
-
minimum_memory
...
...
This diff is collapsed.
Click to expand it.
roles/lockss/tasks/main.yml
+
5
−
2
View file @
d81ce34a
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
command
:
command
:
cmd
:
docker info -f {% raw %}'{{.Driver}}'{% endraw %}
cmd
:
docker info -f {% raw %}'{{.Driver}}'{% endraw %}
check_mode
:
false
check_mode
:
false
ignore_errors
:
true
no_log
:
true
changed_when
:
false
changed_when
:
false
register
:
r
register
:
r
...
@@ -86,6 +84,7 @@
...
@@ -86,6 +84,7 @@
dest
:
/usr/src/lockss
dest
:
/usr/src/lockss
version
:
"
{{
lockss_git_version
}}"
version
:
"
{{
lockss_git_version
}}"
depth
:
1
depth
:
1
become
:
true
become_user
:
lockss
become_user
:
lockss
-
name
:
Install ifconfig.
-
name
:
Install ifconfig.
...
@@ -164,6 +163,7 @@
...
@@ -164,6 +163,7 @@
command
:
command
:
cmd
:
scripts/generate-lockss
cmd
:
scripts/generate-lockss
chdir
:
/usr/src/lockss
chdir
:
/usr/src/lockss
become
:
true
become_user
:
lockss
become_user
:
lockss
# FIXME: LOCKSS's scripts are yucky. Should we care?
# FIXME: LOCKSS's scripts are yucky. Should we care?
...
@@ -171,16 +171,19 @@
...
@@ -171,16 +171,19 @@
command
:
command
:
cmd
:
scripts/shutdown-lockss
cmd
:
scripts/shutdown-lockss
chdir
:
/usr/src/lockss
chdir
:
/usr/src/lockss
become
:
true
become_user
:
lockss
become_user
:
lockss
-
name
:
Assemble LOCKSS containers.
-
name
:
Assemble LOCKSS containers.
command
:
command
:
cmd
:
scripts/assemble-lockss
cmd
:
scripts/assemble-lockss
chdir
:
/usr/src/lockss
chdir
:
/usr/src/lockss
become
:
true
become_user
:
lockss
become_user
:
lockss
-
name
:
Deploy LOCKSS containers.
-
name
:
Deploy LOCKSS containers.
command
:
command
:
cmd
:
scripts/deploy-lockss
cmd
:
scripts/deploy-lockss
chdir
:
/usr/src/lockss
chdir
:
/usr/src/lockss
become
:
true
become_user
:
lockss
become_user
:
lockss
This diff is collapsed.
Click to expand it.
roles/minimum_memory/tasks/main.yml
+
12
−
9
View file @
d81ce34a
...
@@ -7,13 +7,13 @@
...
@@ -7,13 +7,13 @@
cmd
:
swapon --show=name --noheadings |
cmd
:
swapon --show=name --noheadings |
grep -qFx -- {{ swapfile_name | quote }}
grep -qFx -- {{ swapfile_name | quote }}
check_mode
:
false
check_mode
:
false
ignore_errors
:
true
failed_when
:
r.rc not in [0, 1]
no_log
:
true
changed_when
:
false
changed_when
:
false
register
:
r
register
:
r
-
name
:
Disable swapping to swapfile.
-
name
:
Disable swapping to swapfile.
command
:
swapoff -- {{ swapfile_name | quote }}
command
:
cmd
:
swapoff -- {{ swapfile_name | quote }}
when
:
not r.rc
when
:
not r.rc
-
name
:
"
Update
fact:
ansible_swaptotal_mb."
-
name
:
"
Update
fact:
ansible_swaptotal_mb."
...
@@ -21,10 +21,11 @@
...
@@ -21,10 +21,11 @@
filter
:
ansible_swaptotal_mb
filter
:
ansible_swaptotal_mb
-
name
:
Create swapfile.
-
name
:
Create swapfile.
# The swapfile's header takes up 4 KiB.
command
:
command
:
dd if=/dev/zero of={{ swapfile_name | quote }} bs=1024
# The swapfile's header takes up 4 KiB.
count={{ (minimum_memory_mb - ansible_memtotal_mb -
cmd
:
dd if=/dev/zero of={{ swapfile_name | quote }} bs=1024
ansible_swaptotal_mb) * 1024 + 4 }}
count={{ (minimum_memory_mb - ansible_memtotal_mb -
ansible_swaptotal_mb) * 1024 + 4 }}
-
name
:
Set swapfile permissions.
-
name
:
Set swapfile permissions.
file
:
file
:
...
@@ -33,7 +34,8 @@
...
@@ -33,7 +34,8 @@
mode
:
0600
mode
:
0600
-
name
:
Format swapfile.
-
name
:
Format swapfile.
command
:
mkswap -- {{ swapfile_name | quote }}
command
:
cmd
:
mkswap -- {{ swapfile_name | quote }}
-
name
:
Add swapfile to fstab.
-
name
:
Add swapfile to fstab.
mount
:
mount
:
...
@@ -43,7 +45,8 @@
...
@@ -43,7 +45,8 @@
state
:
present
state
:
present
-
name
:
Enable swapping for file.
-
name
:
Enable swapping for file.
command
:
swapon -- {{ swapfile_name | quote }}
command
:
cmd
:
swapon -- {{ swapfile_name | quote }}
-
name
:
"
Update
fact:
ansible_swaptotal_mb."
-
name
:
"
Update
fact:
ansible_swaptotal_mb."
setup
:
setup
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment