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

Fix lint errrors/hints

parent 1cac975a
- hosts: admin_pcs - hosts: admin_pcs
tasks: tasks:
- dnf: name={{item}} state=latest - name: install admin software
become: yes dnf: name={{ item }} state=installed
with_items: admin_software become: yes
with_items: "{{ admin_software }}"
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
- hosts: cn - hosts: cn
become: yes become: yes
tasks: tasks:
- hostname: name=las-bernhard.anka.kit.edu - name: set CN hostname
hostname: name=las-bernhard.anka.kit.edu
tags: tags:
- cn - cn
- always - always
- hosts: desktop - hosts: desktop
tasks: tasks:
- dnf: name={{item}} state=latest - name: install desktop software
become: yes dnf: name={{item}} state=installed
when: ansible_distribution == 'Fedora' become: yes
with_items: when: ansible_distribution == 'Fedora'
- "{{desktop_software}}" with_items:
- "{{desktop_software}}"
--- ---
- name: "Install basic client software" - name: "Install basic client software"
apt: name={{ item }} state=latest apt: name={{ item }} state=installed
with_items: "{{ client_software }}" with_items: "{{ client_software }}"
when: ansible_distribution == 'Ubuntu' when: ansible_distribution == 'Ubuntu'
become: yes become: yes
- name: "Install basic client software" - name: "Install basic client software"
dnf: name={{ item }} state=latest dnf: name={{ item }} state=installed
with_items: "{{ client_software }}" with_items: "{{ client_software }}"
when: ansible_distribution == 'Fedora' when: ansible_distribution == 'Fedora'
become: yes become: yes
--- ---
- name: install CUPS - name: install CUPS
become: yes become: yes
dnf: name=cups state=latest dnf: name=cups state=installed
when: ansible_distribution == 'Fedora' when: ansible_distribution == 'Fedora'
- name: install CUPS - name: install CUPS
become: yes become: yes
apt: name=cups state=latest apt: name=cups state=installed
when: ansible_distribution == 'Ubuntu' when: ansible_distribution == 'Ubuntu'
- name: copy CUPS' configs - name: copy CUPS' configs
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- name: copy PPD files - name: copy PPD files
become: yes 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 notify: restart cups
with_items: with_items:
- "HP-LaserJet-P2015-Series.ppd" - "HP-LaserJet-P2015-Series.ppd"
......
...@@ -22,3 +22,7 @@ ...@@ -22,3 +22,7 @@
- name: start ntp - name: start ntp
become: yes become: yes
service: name=ntpdate state=started service: name=ntpdate state=started
- name: lock root user
become: yes
shell: passwd -l root
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# does not work at the moment # does not work at the moment
# - name: set DNS Server # - name: set DNS Server
# nmcli: # nmcli:
# conn_name: enp0s31f6 # conn_name: enp0s31f6
# dns4: # dns4:
# - 129.13.64.5 # - 129.13.64.5
......
--- ---
- name: install ntpdate - name: install ntpdate
package: state=latest name=ntpdate package: state=installed name=ntpdate
become: yes become: yes
- name: set time server - name: set time server
......
--- ---
- name: install common software - name: install common software
package: name={{item}} state=latest package: name={{item}} state=installed
with_items: "{{ common_software }}" with_items: "{{ common_software }}"
become: true become: true
...@@ -5,16 +5,9 @@ ...@@ -5,16 +5,9 @@
- name: Copy sudoers file including validation - name: Copy sudoers file including validation
become: yes become: yes
template: src=sudoers.j2 dest=/etc/sudoers.d/sudoers validate='visudo -cf %s' backup=yes owner=root group=root mode=440 template: src=sudoers.j2 dest=/etc/sudoers.d/sudoers validate='visudo -cf %s' backup=yes owner=root group=root mode=0440
register: sudoers_enrole_result notify: lock root user
- name: requiretty in sudoers - name: requiretty in sudoers
lineinfile: backup=yes regexp="Defaults !?requiretty" state=present dest=/etc/sudoers line="Defaults !requiretty" validate="visudo -c -f %s" lineinfile: backup=yes regexp="Defaults !?requiretty" state=present dest=/etc/sudoers line="Defaults !requiretty" validate="visudo -c -f %s"
become: yes 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 - name: install KDevelop with Python support
package: name=kdevelop-python state=latest package: name=kdevelop-python state=installed
become: yes 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