Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_server_hardening
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Digital Preservation
ansible_lza_server_hardening
Commits
4f738758
Commit
4f738758
authored
1 year ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
fix: create working version of rpcbind configuration
parent
4b693b08
No related branches found
No related tags found
No related merge requests found
Pipeline
#5623
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
tasks/configure_rpcbind.yml
+8
-6
8 additions, 6 deletions
tasks/configure_rpcbind.yml
with
10 additions
and
8 deletions
.gitlab-ci.yml
+
2
−
2
View file @
4f738758
...
@@ -15,7 +15,7 @@ default:
...
@@ -15,7 +15,7 @@ default:
variables
:
variables
:
SCENARIO
:
"
default"
SCENARIO
:
"
default"
# ANSIBLE_VAULT_PASSWORD_FILE: "molecule/lza_server_hardening.pass"
# ANSIBLE_VAULT_PASSWORD_FILE: "molecule/lza_server_hardening.pass"
ANSIBLE_VAULT_PASSWORD_FILE
:
"
../
../../
lza_server_hardening.pass"
ANSIBLE_VAULT_PASSWORD_FILE
:
"
../lza_server_hardening.pass"
test-job
:
test-job
:
...
@@ -26,7 +26,7 @@ test-job:
...
@@ -26,7 +26,7 @@ test-job:
-
echo "CURRENT PATH= '$(pwd)'"
-
echo "CURRENT PATH= '$(pwd)'"
# make sure that Ansible Vaults are present and can be decrypted
# make sure that Ansible Vaults are present and can be decrypted
-
echo "${VAULT_SERVER_HARDENING}" > ${ANSIBLE_VAULT_PASSWORD_FILE}
-
echo "${VAULT_SERVER_HARDENING}" > ${ANSIBLE_VAULT_PASSWORD_FILE}
-
export ANSIBLE_VAULT_PASSWORD_FILE
-
export ANSIBLE_VAULT_PASSWORD_FILE
="../../${ANSIBLE_VAULT_PASSWORD_FILE}"
-
tree
-
tree
-
rm -rf ../ansible_vaults/
-
rm -rf ../ansible_vaults/
-
git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/; \
-
git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/; \
...
...
This diff is collapsed.
Click to expand it.
tasks/configure_rpcbind.yml
+
8
−
6
View file @
4f738758
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
ansible.builtin.blockinfile
:
ansible.builtin.blockinfile
:
path
:
"
/etc/systemd/system/rpcbind.socket.d/override.conf"
path
:
"
/etc/systemd/system/rpcbind.socket.d/override.conf"
create
:
true
create
:
true
mode
:
"
0644"
marker
:
"
###
{mark}
ANSIBLE
MANAGED
BLOCK
-
clear
previous
settings"
marker
:
"
###
{mark}
ANSIBLE
MANAGED
BLOCK
-
clear
previous
settings"
block
:
|
block
:
|
# from `man 5 systemd.socket`:
# from `man 5 systemd.socket`:
...
@@ -34,24 +35,25 @@
...
@@ -34,24 +35,25 @@
when
:
rpcbind_installed
when
:
rpcbind_installed
notify
:
daemon_reload
notify
:
daemon_reload
-
name
:
implement access control in rpcbind socket unit by creating an override -
general
settings
-
name
:
implement access control in rpcbind socket unit by creating an override -
interface specific
settings
ansible.builtin.blockinfile
:
ansible.builtin.blockinfile
:
path
:
"
/etc/systemd/system/rpcbind.socket.d/override.conf"
path
:
"
/etc/systemd/system/rpcbind.socket.d/override.conf"
create
:
true
create
:
true
marker
:
### {mark} ANSIBLE MANAGED BLOCK - allow access for {{ item.source }}
mode
:
"
0644"
marker
:
"
###
{mark}
ANSIBLE
MANAGED
BLOCK
-
allow
access
for
{{
item.source
}}"
block
:
|
block
:
|
ListenStream={{ item.source }}
ListenStream={{ item.source }}
ListenDatagram={{ item.source }}
ListenDatagram={{ item.source }}
loop
:
"
{{
nfs_server_interfaces
}}"
loop
:
"
{{
vault_
nfs_server_interfaces
}}"
when
:
rpcbind_installed
when
:
rpcbind_installed
notify
:
daemon_reload
notify
:
daemon_reload
-
name
:
implement rpcbind access control in iptables
-
name
:
implement rpcbind access control in iptables
ansible.builtin.iptables
:
ansible.builtin.iptables
:
action
:
"
insert"
action
:
"
insert"
chain
:
"
INPU
P
"
chain
:
"
INPU
T
"
comment
:
"
{{
item.comment
}}"
comment
:
"
allow
rpcbind
access
from
{{
item.comment
}}
for
NFSv3
"
source
:
"
{{
item.source
}}"
source
:
"
{{
item.source
}}"
jump
:
"
ACCEPT"
jump
:
"
ACCEPT"
loop
:
"
{{
nfs_server_interfaces
}}"
loop
:
"
{{
vault_
nfs_server_interfaces
}}"
notify
:
"
save
iptables
rules"
notify
:
"
save
iptables
rules"
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