Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commonauth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
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
Ansible
Roles
commonauth
Commits
34b73483
Commit
34b73483
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
New script to update hosts file and ssh config locally
parent
da8aa2dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/main.yml
+12
-12
12 additions, 12 deletions
tasks/main.yml
with
12 additions
and
12 deletions
tasks/main.yml
+
12
−
12
View file @
34b73483
...
...
@@ -14,15 +14,15 @@
-
name
:
"
Create
All
Required
Users"
user
:
name
=
'{{ item }}'
group
=
'root'
groups
=
"{{ users[item].groups|default('www-data') }}"
append
=
{{ append }}
home
=
'/home/{{ item }}'
generate_ssh_key
=
yes
ssh_key_bits
=
2048
password
=
'{{ initial_password }}'
update_password
=
'on_create'
name
:
'
{{
item
}}'
group
:
'
root'
groups
:
"
{{
users[item].groups|default('www-data')
}}"
append
:
'
{{
append
}}
'
home
:
'
/home/{{
item
}}'
generate_ssh_key
:
yes
ssh_key_bits
:
2048
password
:
'
{{
initial_password
}}'
update_password
:
'
on_create'
with_flattened
:
-
'
{{
admins
}}'
-
'
{{
jailusers
}}'
...
...
@@ -30,14 +30,14 @@
-
name
:
"
Ensure
Extra
Users"
user
:
name
=
'{{ item.username }}'
name
:
'
{{
item.username
}}'
with_items
:
'
{{
auth_keys|default([])
}}'
tags
:
'
Keys'
-
name
:
"
Install
Public
Key
For
Extra
Users"
authorized_key
:
user
=
'{{ item.username }}'
key
=
"{{ lookup('file', inventory_dir + '/files/keys/' + item.keyname + '.d2s.pub') }}"
user
:
'
{{
item.username
}}'
key
:
"
{{
lookup('file',
inventory_dir
+
'/files/keys/'
+
item.keyname
+
'.d2s.pub')
}}"
with_items
:
'
{{
auth_keys|default([])
}}'
tags
:
'
Keys'
...
...
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