Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eci-platform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
External wiki
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
Todor Kondic
eci-platform
Commits
4e760bf5
Unverified
Commit
4e760bf5
authored
2 years ago
by
Todor Kondic
Browse files
Options
Downloads
Patches
Plain Diff
Ftp server users, homes and HTTP connection work.
parent
7390f3c2
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
group_vars/stations/eci_users.yml
+2
-3
2 additions, 3 deletions
group_vars/stations/eci_users.yml
roles/base/tasks/main.yml
+14
-3
14 additions, 3 deletions
roles/base/tasks/main.yml
roles/ftpserver/tasks/main.yml
+3
-2
3 additions, 2 deletions
roles/ftpserver/tasks/main.yml
with
19 additions
and
8 deletions
group_vars/stations/eci_users.yml
+
2
−
3
View file @
4e760bf5
...
...
@@ -3,6 +3,5 @@ eci_users:
-
testuser2
eci_users_uid
:
testuser
:
61
testuser2
:
62
testuser
:
61
testuser2
:
62
This diff is collapsed.
Click to expand it.
roles/base/tasks/main.yml
+
14
−
3
View file @
4e760bf5
...
...
@@ -25,17 +25,28 @@
path
:
/etc/dhcp/dhclient.conf
notify
:
restart-network
-
name
:
Create eci group.
ansible.builtin.group
:
name
:
eci
-
name
:
Get eci's GID.
ansible.builtin.getent
:
database
:
group
key
:
eci
-
name
:
Create /eci-users.
ansible.builtin.file
:
path
:
/etc
/eci-users
path
:
/eci-users
state
:
directory
mode
:
'
0711'
-
name
:
Create /eci-users/user.
ansible.builtin.file
:
path
:
"
/
etc/
eci-users/{{
item
}}"
path
:
"
/eci-users/{{
item
}}"
state
:
directory
mode
:
'
0711'
owner
:
"
{{
eci_users_uid[item]
}}"
group
:
eci
mode
:
'
0771'
loop
:
"
{{
eci_users
}}"
...
...
This diff is collapsed.
Click to expand it.
roles/ftpserver/tasks/main.yml
+
3
−
2
View file @
4e760bf5
...
...
@@ -9,13 +9,14 @@
mode
:
0600
-
name
:
Create FTP users.
debug
:
msg
:
"
echo
{{
eci_passwords[item]
}}|ftpasswd
--passwd
--file=/etc/proftpd/ftpd.passwd
--name={{item}}
--uid={{eci_users_uid[item]}}
--home=/
udi
rs/{{item}}
--shell=/bin/false
--stdin"
shell
:
cmd
:
"
echo
{{
eci_passwords[item]
}}|ftpasswd
--passwd
--file=/etc/proftpd/ftpd.passwd
--name={{
item
}}
--uid={{
eci_users_uid[item]
}}
--gid={{
ansible_facts.getent_group['eci'][1]
}}
--home=/
eci-use
rs/{{item}}
--shell=/bin/false
--stdin"
loop
:
"
{{eci_users}}"
notify
:
restart-ftp
-
name
:
Configure ProFTPd for multiple virtual users.
tags
:
proftpd-conf-text
blockinfile
:
path
:
/etc/proftpd/proftpd.conf
block
:
|
...
...
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