Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ansible
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
36
Issues
36
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
34f1a98a
Commit
34f1a98a
authored
Mar 08, 2017
by
julian.gethmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint errrors/hints
parent
1cac975a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
27 deletions
+27
-27
admin.yml
admin.yml
+4
-3
common.yml
common.yml
+2
-1
desktop.yml
desktop.yml
+6
-5
roles/clients/tasks/basic_software.yml
roles/clients/tasks/basic_software.yml
+2
-2
roles/clients/tasks/cups.yml
roles/clients/tasks/cups.yml
+3
-3
roles/common/handlers/main.yml
roles/common/handlers/main.yml
+4
-0
roles/common/tasks/hostname.yml
roles/common/tasks/hostname.yml
+1
-1
roles/common/tasks/ntp.yml
roles/common/tasks/ntp.yml
+1
-1
roles/common/tasks/software.yml
roles/common/tasks/software.yml
+1
-1
roles/common/tasks/sudoer.yml
roles/common/tasks/sudoer.yml
+2
-9
roles/kdev/tasks/kdevelop-python.yml
roles/kdev/tasks/kdevelop-python.yml
+1
-1
No files found.
admin.yml
View file @
34f1a98a
-
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 @
34f1a98a
...
...
@@ -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 @
34f1a98a
-
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 @
34f1a98a
---
-
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 @
34f1a98a
---
-
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 @
34f1a98a
...
...
@@ -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 @
34f1a98a
...
...
@@ -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 @
34f1a98a
---
-
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 @
34f1a98a
---
-
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 @
34f1a98a
...
...
@@ -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 @
34f1a98a
---
-
name
:
install KDevelop with Python support
package
:
name=kdevelop-python state=
latest
package
:
name=kdevelop-python state=
installed
become
:
yes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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