base: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-30 17:01:07 +00:00
parent c23181edc7
commit 186cd19cd1
3 changed files with 30 additions and 30 deletions

View file

@ -1,5 +1,5 @@
---
- name: set correct hostname
- name: Set correct hostname
ansible.builtin.copy:
dest: /etc/myname
content: "{{ inventory_hostname }}\n"
@ -7,7 +7,7 @@
owner: root
group: "{{ ansible_wheel }}"
- name: configure mirror for packages and updates
- name: Configure mirror for packages and updates
ansible.builtin.copy:
dest: /etc/installurl
content: "https://ftp.eu.openbsd.org/pub/OpenBSD/\n"
@ -16,7 +16,7 @@
group: "{{ ansible_wheel }}"
when: ansible_datacenter == "home"
- name: install packages
- name: Install packages
ansible.builtin.package:
name: "{{ item }}"
state: installed
@ -26,7 +26,7 @@
- rsync-- # rsync
- vim--no_x11 # we need real vim
- name: disable nightly cron noise
- name: Disable nightly cron noise
ansible.builtin.copy:
dest: "{{ item }}"
content: "VERBOSESTATUS=0\n"
@ -38,18 +38,18 @@
- /etc/weekly.local
- /etc/monthly.local
- name: disable unused services
- name: Disable unused services
ansible.builtin.service:
name: sndiod
enabled: false
state: stopped
- name: do not run check_quotas on boot
- name: Do not run check_quotas on boot
ansible.builtin.service:
name: check_quotas
enabled: false
- name: create /srv directory hierarcy
- name: Create /srv directory hierarcy
ansible.builtin.file:
name: /srv
state: directory
@ -57,7 +57,7 @@
owner: root
group: "{{ ansible_wheel }}"
- name: install os specific roles
- name: Install OS specific roles
ansible.builtin.include_role:
name: "{{ role }}"
with_items:

View file

@ -1,9 +1,9 @@
---
- name: set correct hostname
- name: Set correct hostname
ansible.builtin.hostname:
name: "{{ inventory_hostname }}"
- name: install os specific roles
- name: Install OS specific roles
ansible.builtin.include_role:
name: "{{ role }}"
with_items:
@ -12,22 +12,22 @@
loop_control:
loop_var: role
- name: install firewall
- name: Install firewall
ansible.builtin.include_role:
name: iptables
when: ansible_distribution_major_version|int <= 8
- name: install firewall
- name: Install firewall
ansible.builtin.include_role:
name: nftables
when: ansible_distribution_major_version|int >= 9
- name: fix selinux context from /export
- name: Fix SELinux context from /export
community.general.sefcontext:
path: "/export"
setype: var_t
- name: check selinux context from /export
- name: Check SELinux context from /export
ansible.builtin.command:
argv:
- matchpathcon
@ -38,7 +38,7 @@
changed_when: false
failed_when: false
- name: apply selinux context to /export
- name: Apply selinux context to /export
ansible.builtin.command:
argv:
- restorecon
@ -46,18 +46,18 @@
- /export
when: "' should be ' in result.stdout"
- name: enable tmpfs mount for /tmp
- name: Enable tmpfs mount for /tmp
ansible.builtin.service:
name: tmp.mount
state: started
enabled: true
- name: install postfix
- name: Install postfix
ansible.builtin.include_role:
name: postfix
when: "'mail' not in group_names"
- name: install packages
- name: Install packages
ansible.builtin.package:
name: "{{ item }}"
state: installed
@ -81,7 +81,7 @@
- vim-enhanced # working vi :)
- xterm # resize
- name: install el7/el8 packages
- name: Install el7/el8 packages
ansible.builtin.package:
name: "{{ item }}"
state: installed
@ -89,7 +89,7 @@
- mailx
when: ansible_distribution_major_version|int <= 8
- name: install el9 packages
- name: Install el9 packages
ansible.builtin.package:
name: "{{ item }}"
state: installed
@ -97,12 +97,12 @@
- s-nail
when: ansible_distribution_major_version|int >= 9
- name: disable grep colors
- name: Disable grep colors
ansible.builtin.file:
dest: /etc/GREP_COLORS
state: absent
- name: store date and time for bash history
- name: Store date and time for bash history
ansible.builtin.copy:
dest: /etc/profile.d/history.sh
content: 'export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "'
@ -110,7 +110,7 @@
owner: root
group: "{{ ansible_wheel }}"
- name: cron job for downloading yum updates
- name: Cron job for downloading yum updates
ansible.builtin.cron:
name: yum-downloadonly
user: root

View file

@ -1,5 +1,5 @@
---
- name: setup ansible custom facts
- name: Setup ansible custom facts
ansible.builtin.file:
dest: "{{ item }}"
mode: 0755
@ -10,7 +10,7 @@
- /etc/ansible
- /etc/ansible/facts.d
- name: add ansible_export fact
- name: Add ansible_export fact
ansible.builtin.copy:
dest: /etc/ansible/facts.d/export.fact
content: |
@ -24,15 +24,15 @@
owner: root
group: "{{ ansible_wheel }}"
- name: reload facts
- name: Reload facts
ansible.builtin.setup:
filter: ansible_local
- name: include os specific tasks
- name: Include os specific tasks
ansible.builtin.include_tasks:
file: "{{ ansible_os_family }}.yml"
- name: disable at from all users
- name: Disable at from all users
ansible.builtin.copy:
content: "\n"
dest: "/etc/at.allow"
@ -40,7 +40,7 @@
owner: root
group: "{{ ansible_wheel }}"
- name: install basic roles
- name: Install basic roles
ansible.builtin.include_role:
name: "{{ role }}"
with_items:
@ -52,7 +52,7 @@
loop_control:
loop_var: role
- name: install roles for physical hardware
- name: Install roles for physical hardware
ansible.builtin.include_role:
name: "{{ role }}"
with_items: