Commit 34f1a98a authored by julian.gethmann's avatar julian.gethmann

Fix lint errrors/hints

parent 1cac975a
- 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 }}"
......@@ -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
- 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}}"
---
- 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
---
- 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=0644
notify: restart cups
with_items:
- "HP-LaserJet-P2015-Series.ppd"
......
......@@ -22,3 +22,7 @@
- name: start ntp
become: yes
service: name=ntpdate state=started
- name: lock root user
become: yes
shell: passwd -l root
......@@ -18,7 +18,7 @@
# does not work at the moment
# - name: set DNS Server
# nmcli:
# nmcli:
# conn_name: enp0s31f6
# dns4:
# - 129.13.64.5
......
---
- name: install ntpdate
package: state=latest name=ntpdate
package: state=installed name=ntpdate
become: yes
- name: set time server
......
---
- name: install common software
package: name={{item}} state=latest
package: name={{item}} state=installed
with_items: "{{ common_software }}"
become: true
......@@ -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=0440
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
---
- name: install KDevelop with Python support
package: name=kdevelop-python state=latest
package: name=kdevelop-python state=installed
become: yes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment