Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Lechner
ansible-role-basic
Commits
c156d702
Commit
c156d702
authored
Sep 15, 2020
by
Valentin Lechner
Browse files
Removing gentoo stuff
parent
09dea239
Changes
2
Hide whitespace changes
Inline
Side-by-side
tasks/base-setup.yml
View file @
c156d702
...
...
@@ -3,7 +3,9 @@
# DEBIAN-BASED
#***************************************************************************
-
name
:
Update apt cache
apt
:
update_cache=yes cache_valid_time=3600
apt
:
update_cache
:
yes
cache_valid_time
:
3600
when
:
-
ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
...
...
@@ -16,56 +18,17 @@
state
:
present
when
:
-
ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
-
name
:
Set pip3 as default pip
alternatives
:
name
:
pip
link
:
/usr/bin/pip
path
:
/usr/bin/pip3
priority
:
1
when
:
-
ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
-
name
:
Set python3 as default python
alternatives
:
name
:
python
link
:
/usr/bin/python
path
:
/usr/bin/python3
priority
:
1
when
:
-
ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
#***************************************************************************
# GENTOO
#***************************************************************************
-
name
:
Lade installierte Pakete um zu pruefen ob equery da
package_facts
:
manager
:
auto
when
:
-
ansible_distribution == 'Gentoo'
-
name
:
Install equery
command
:
"
emerge
--select
--noreplace
--quiet-build
--verbose
app-portage/gentoolkit"
when
:
-
ansible_distribution == 'Gentoo'
-
"
'gentoolkit'
not
in
ansible_facts.packages"
-
name
:
Install pip
portage
:
package
:
dev-python/pip
state
:
present
when
:
-
ansible_distribution == 'Gentoo'
#***************************************************************************
# ALL
#***************************************************************************
-
name
:
Setting default admin group for Gentoo
set_fact
:
admin_group
:
'
wheel'
when
:
-
ansible_os_family == "Gentoo"
with_items
:
-
man-db
-
ssh
-
git
-
vim
-
rkhunter
-
ntp
-
ntpdate
-
python3
-
python-setuptools
-
python3-pip
-
name
:
Setting default admin group for Debian based Distros
set_fact
:
...
...
@@ -73,14 +36,13 @@
when
:
-
ansible_os_family == "Debian"
-
name
:
Erstelle deployment user
user
:
name
:
"
{{
deployment_user
}}"
comment
:
Deployment User
password
:
"
{{
lookup('password',
'credentials'
+
deployment_user
+
'password.txt
encrypt=md5_crypt')
}}"
uid
:
1999
shell
:
/bin/
ba
sh
shell
:
/bin/sh
append
:
yes
create_home
:
yes
groups
:
"
{{
admin_group
}}"
...
...
@@ -98,13 +60,6 @@
when
:
-
ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
-
name
:
Installiere PE-Tool (Gentoo)
portage
:
name
:
"
{{
pe_tool
}}"
state
:
present
when
:
-
ansible_distribution == 'Gentoo'
-
name
:
Setup PE-Tool
template
:
src
:
"
{{
pe_conf_template
}}"
...
...
vars/main.yml
View file @
c156d702
...
...
@@ -2,4 +2,4 @@
# vars file for common
ssh_port
:
2222
deployment_user
:
ansible
path_ssh_key_deployment_user
:
"
{{
lookup('env',
'HOME')
+
'/
ansible/
.ssh/id_ansible.pub'}}"
path_ssh_key_deployment_user
:
"
{{
lookup('env',
'HOME')
+
'/.ssh/id_ansible.pub'}}"
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment