Skip to content

Commit 5e9a125

Browse files
Make linter happy
1 parent 8f4b3a3 commit 5e9a125

15 files changed

+23
-15
lines changed

defaults/main.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
system:
23
root_group: >-
34
{%- if ansible_os_family == 'Debian' -%}
@@ -77,7 +78,7 @@ system:
7778
mail:
7879
enable: yes
7980
only_on_error: yes
80-
to:
81+
to:
8182

8283
postfix:
8384
prefix:

tasks/environment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Set global environment variables
23
loop: "{{ system.environment | dict2items }}"
34
loop_control:

tasks/hostname.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Set hostname
23
when: system.hostname
34
ansible.builtin.hostname:

tasks/hosts.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
---
12
- name: Update hosts file
23
vars:
3-
hosts: "{{ system.hosts.values() | select('string') | reject('eq', '') | list }}"
4+
etc_hosts: "{{ system.hosts.values() | select('string') | reject('eq', '') | list }}"
45
loop:
56
- /etc/hosts
67
ansible.builtin.blockinfile:
78
path: "{{ item }}"
8-
block: "{{ hosts | join('\n') }}"
9+
block: "{{ etc_hosts | join('\n') }}"
910
marker: "# {mark} ANSIBLE MANAGED BLOCK (system)"
10-
state: "{{ 'present' if hosts | length > 0 else 'absent' }}"
11+
state: "{{ 'present' if etc_hosts | length > 0 else 'absent' }}"

tasks/main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Check the path of the bash executable
23
changed_when: no
34
register: which_bash

tasks/motd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Get current OS version
23
when: ansible_system == 'FreeBSD'
34
check_mode: no

tasks/netplan.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Template Netplan config
23
loop: "{{ system.netplan | dict2items }}"
34
loop_control:
@@ -15,5 +16,5 @@
1516
- name: Apply Netplan config
1617
when: system_template_netplan_config_result.changed
1718
changed_when: yes
18-
ansible.builtin.command:
19+
ansible.builtin.command:
1920
cmd: netplan apply

tasks/postfix.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Handle Postfix configuration on FreeBSD
23
when: ansible_system == 'FreeBSD'
34
block:
@@ -48,7 +49,7 @@
4849

4950
- name: Copy Postfix config from etc-sample
5051
ansible.builtin.copy:
51-
src: /usr/local/etc-sample/postfix/
52+
src: /usr/local/etc-sample/postfix/
5253
owner: root
5354
mode: "0755"
5455
dest: "{{ system.postfix.prefix.config | quote }}"
@@ -100,7 +101,7 @@
100101
label: "{{ path }}"
101102
when: item.changed
102103
changed_when: yes
103-
ansible.builtin.command:
104+
ansible.builtin.command:
104105
cmd: "postmap {{ path | quote }}"
105106

106107
- name: Configure Postfix

tasks/proserver_fact.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# This is a fallback for Ubuntu 18.04 and will not be needed in Versions greater 18.04
2-
- name: Install Python 3.8
3-
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
4-
ansible.builtin.apt:
5-
update_cache: yes
6-
name: python3.8
7-
1+
---
82
- name: Create directory for Ansible facts
93
ansible.builtin.file:
104
mode: "0755"

tasks/sudoers.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Make sure that sudo is installed
23
when: ansible_os_family == "Debian"
34
ansible.builtin.package:

0 commit comments

Comments
 (0)