base: ansible-lint fixes
This commit is contained in:
parent
c23181edc7
commit
186cd19cd1
3 changed files with 30 additions and 30 deletions
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: set correct hostname
|
- name: Set correct hostname
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/myname
|
dest: /etc/myname
|
||||||
content: "{{ inventory_hostname }}\n"
|
content: "{{ inventory_hostname }}\n"
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
|
||||||
- name: configure mirror for packages and updates
|
- name: Configure mirror for packages and updates
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/installurl
|
dest: /etc/installurl
|
||||||
content: "https://ftp.eu.openbsd.org/pub/OpenBSD/\n"
|
content: "https://ftp.eu.openbsd.org/pub/OpenBSD/\n"
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
when: ansible_datacenter == "home"
|
when: ansible_datacenter == "home"
|
||||||
|
|
||||||
- name: install packages
|
- name: Install packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
- rsync-- # rsync
|
- rsync-- # rsync
|
||||||
- vim--no_x11 # we need real vim
|
- vim--no_x11 # we need real vim
|
||||||
|
|
||||||
- name: disable nightly cron noise
|
- name: Disable nightly cron noise
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ item }}"
|
dest: "{{ item }}"
|
||||||
content: "VERBOSESTATUS=0\n"
|
content: "VERBOSESTATUS=0\n"
|
||||||
|
@ -38,18 +38,18 @@
|
||||||
- /etc/weekly.local
|
- /etc/weekly.local
|
||||||
- /etc/monthly.local
|
- /etc/monthly.local
|
||||||
|
|
||||||
- name: disable unused services
|
- name: Disable unused services
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: sndiod
|
name: sndiod
|
||||||
enabled: false
|
enabled: false
|
||||||
state: stopped
|
state: stopped
|
||||||
|
|
||||||
- name: do not run check_quotas on boot
|
- name: Do not run check_quotas on boot
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: check_quotas
|
name: check_quotas
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- name: create /srv directory hierarcy
|
- name: Create /srv directory hierarcy
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
name: /srv
|
name: /srv
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
|
||||||
- name: install os specific roles
|
- name: Install OS specific roles
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "{{ role }}"
|
name: "{{ role }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
- name: set correct hostname
|
- name: Set correct hostname
|
||||||
ansible.builtin.hostname:
|
ansible.builtin.hostname:
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
|
|
||||||
- name: install os specific roles
|
- name: Install OS specific roles
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "{{ role }}"
|
name: "{{ role }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -12,22 +12,22 @@
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: role
|
loop_var: role
|
||||||
|
|
||||||
- name: install firewall
|
- name: Install firewall
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: iptables
|
name: iptables
|
||||||
when: ansible_distribution_major_version|int <= 8
|
when: ansible_distribution_major_version|int <= 8
|
||||||
|
|
||||||
- name: install firewall
|
- name: Install firewall
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nftables
|
name: nftables
|
||||||
when: ansible_distribution_major_version|int >= 9
|
when: ansible_distribution_major_version|int >= 9
|
||||||
|
|
||||||
- name: fix selinux context from /export
|
- name: Fix SELinux context from /export
|
||||||
community.general.sefcontext:
|
community.general.sefcontext:
|
||||||
path: "/export"
|
path: "/export"
|
||||||
setype: var_t
|
setype: var_t
|
||||||
|
|
||||||
- name: check selinux context from /export
|
- name: Check SELinux context from /export
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
- matchpathcon
|
- matchpathcon
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: apply selinux context to /export
|
- name: Apply selinux context to /export
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
- restorecon
|
- restorecon
|
||||||
|
@ -46,18 +46,18 @@
|
||||||
- /export
|
- /export
|
||||||
when: "' should be ' in result.stdout"
|
when: "' should be ' in result.stdout"
|
||||||
|
|
||||||
- name: enable tmpfs mount for /tmp
|
- name: Enable tmpfs mount for /tmp
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: tmp.mount
|
name: tmp.mount
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: install postfix
|
- name: Install postfix
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: postfix
|
name: postfix
|
||||||
when: "'mail' not in group_names"
|
when: "'mail' not in group_names"
|
||||||
|
|
||||||
- name: install packages
|
- name: Install packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
- vim-enhanced # working vi :)
|
- vim-enhanced # working vi :)
|
||||||
- xterm # resize
|
- xterm # resize
|
||||||
|
|
||||||
- name: install el7/el8 packages
|
- name: Install el7/el8 packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
- mailx
|
- mailx
|
||||||
when: ansible_distribution_major_version|int <= 8
|
when: ansible_distribution_major_version|int <= 8
|
||||||
|
|
||||||
- name: install el9 packages
|
- name: Install el9 packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
@ -97,12 +97,12 @@
|
||||||
- s-nail
|
- s-nail
|
||||||
when: ansible_distribution_major_version|int >= 9
|
when: ansible_distribution_major_version|int >= 9
|
||||||
|
|
||||||
- name: disable grep colors
|
- name: Disable grep colors
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
dest: /etc/GREP_COLORS
|
dest: /etc/GREP_COLORS
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: store date and time for bash history
|
- name: Store date and time for bash history
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/profile.d/history.sh
|
dest: /etc/profile.d/history.sh
|
||||||
content: 'export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "'
|
content: 'export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "'
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
|
||||||
- name: cron job for downloading yum updates
|
- name: Cron job for downloading yum updates
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
name: yum-downloadonly
|
name: yum-downloadonly
|
||||||
user: root
|
user: root
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: setup ansible custom facts
|
- name: Setup ansible custom facts
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
dest: "{{ item }}"
|
dest: "{{ item }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
- /etc/ansible
|
- /etc/ansible
|
||||||
- /etc/ansible/facts.d
|
- /etc/ansible/facts.d
|
||||||
|
|
||||||
- name: add ansible_export fact
|
- name: Add ansible_export fact
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/ansible/facts.d/export.fact
|
dest: /etc/ansible/facts.d/export.fact
|
||||||
content: |
|
content: |
|
||||||
|
@ -24,15 +24,15 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
|
||||||
- name: reload facts
|
- name: Reload facts
|
||||||
ansible.builtin.setup:
|
ansible.builtin.setup:
|
||||||
filter: ansible_local
|
filter: ansible_local
|
||||||
|
|
||||||
- name: include os specific tasks
|
- name: Include os specific tasks
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: "{{ ansible_os_family }}.yml"
|
file: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: disable at from all users
|
- name: Disable at from all users
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "\n"
|
content: "\n"
|
||||||
dest: "/etc/at.allow"
|
dest: "/etc/at.allow"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
|
||||||
- name: install basic roles
|
- name: Install basic roles
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "{{ role }}"
|
name: "{{ role }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: role
|
loop_var: role
|
||||||
|
|
||||||
- name: install roles for physical hardware
|
- name: Install roles for physical hardware
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "{{ role }}"
|
name: "{{ role }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue