Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
5a42a396
Commit
5a42a396
authored
Mar 08, 2017
by
julian.gethmann
Browse files
Fix lint errrors/hints
parent
c1b282a3
Changes
11
Hide whitespace changes
Inline
Side-by-side
admin.yml
View file @
5a42a396
-
hosts
:
admin_pcs
tasks
:
-
dnf
:
name={{item}} state=latest
become
:
yes
with_items
:
admin_software
-
name
:
install admin software
dnf
:
name={{ item }} state=installed
become
:
yes
with_items
:
"
{{
admin_software
}}"
common.yml
View file @
5a42a396
...
...
@@ -5,7 +5,8 @@
-
hosts
:
cn
become
:
yes
tasks
:
-
hostname
:
name=las-bernhard.anka.kit.edu
-
name
:
set CN hostname
hostname
:
name=las-bernhard.anka.kit.edu
tags
:
-
cn
-
always
desktop.yml
View file @
5a42a396
-
hosts
:
desktop
tasks
:
-
dnf
:
name={{item}} state=latest
become
:
yes
when
:
ansible_distribution == 'Fedora'
with_items
:
-
"
{{desktop_software}}"
-
name
:
install desktop software
dnf
:
name={{item}} state=installed
become
:
yes
when
:
ansible_distribution == 'Fedora'
with_items
:
-
"
{{desktop_software}}"
roles/clients/tasks/basic_software.yml
View file @
5a42a396
---
-
name
:
"
Install
basic
client
software"
apt
:
name={{ item }} state=
latest
apt
:
name={{ item }} state=
installed
with_items
:
"
{{
client_software
}}"
when
:
ansible_distribution == 'Ubuntu'
become
:
yes
-
name
:
"
Install
basic
client
software"
dnf
:
name={{ item }} state=
latest
dnf
:
name={{ item }} state=
installed
with_items
:
"
{{
client_software
}}"
when
:
ansible_distribution == 'Fedora'
become
:
yes
roles/clients/tasks/cups.yml
View file @
5a42a396
---
-
name
:
install CUPS
become
:
yes
dnf
:
name=cups state=
latest
dnf
:
name=cups state=
installed
when
:
ansible_distribution == 'Fedora'
-
name
:
install CUPS
become
:
yes
apt
:
name=cups state=
latest
apt
:
name=cups state=
installed
when
:
ansible_distribution == 'Ubuntu'
-
name
:
copy CUPS' configs
...
...
@@ -19,7 +19,7 @@
-
name
:
copy PPD files
become
:
yes
copy
:
src=ppd/{{ item }} dest=/etc/cups/ppd backup=yes group=root owner=root mode=644
copy
:
src=ppd/{{ item }} dest=/etc/cups/ppd backup=yes group=root owner=root mode=
0
644
notify
:
restart cups
with_items
:
-
"
HP-LaserJet-P2015-Series.ppd"
...
...
roles/common/handlers/main.yml
View file @
5a42a396
...
...
@@ -22,3 +22,7 @@
-
name
:
start ntp
become
:
yes
service
:
name=ntpdate state=started
-
name
:
lock root user
become
:
yes
shell
:
passwd -l root
roles/common/tasks/hostname.yml
View file @
5a42a396
...
...
@@ -18,7 +18,7 @@
# does not work at the moment
# - name
:
set DNS Server
# nmcli
:
# nmcli
:
# conn_name: enp0s31f6
# dns4:
# - 129.13.64.5
...
...
roles/common/tasks/ntp.yml
View file @
5a42a396
---
-
name
:
install ntpdate
package
:
state=
latest
name=ntpdate
package
:
state=
installed
name=ntpdate
become
:
yes
-
name
:
set time server
...
...
roles/common/tasks/software.yml
View file @
5a42a396
---
-
name
:
install common software
package
:
name={{item}} state=
latest
package
:
name={{item}} state=
installed
with_items
:
"
{{
common_software
}}"
become
:
true
roles/common/tasks/sudoer.yml
View file @
5a42a396
...
...
@@ -5,16 +5,9 @@
-
name
:
Copy sudoers file including validation
become
:
yes
template
:
src=sudoers.j2 dest=/etc/sudoers.d/sudoers validate='visudo -cf %s' backup=yes owner=root group=root mode=440
register
:
sudoers_enrole_result
template
:
src=sudoers.j2 dest=/etc/sudoers.d/sudoers validate='visudo -cf %s' backup=yes owner=root group=root mode=
0
440
notify
:
lock root user
-
name
:
requiretty in sudoers
lineinfile
:
backup=yes regexp="Defaults !?requiretty" state=present dest=/etc/sudoers line="Defaults !requiretty" validate="visudo -c -f %s"
become
:
yes
-
name
:
Lock the root user
become
:
yes
shell
:
passwd -l root
#failed_when: "'Success' not in command_result.stdout"
when
:
sudoers_enrole_result|success and sudoers_enrole_result|changed
tags
:
lock root
roles/kdev/tasks/kdevelop-python.yml
View file @
5a42a396
---
-
name
:
install KDevelop with Python support
package
:
name=kdevelop-python state=
latest
package
:
name=kdevelop-python state=
installed
become
:
yes
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