Skip to content

Commit eed4011

Browse files
committed
PLacate linter
Signed-off-by: Stewart X Addison <[email protected]>
1 parent f43b697 commit eed4011

File tree

1 file changed

+12
-29
lines changed
  • ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/logs/tasks

1 file changed

+12
-29
lines changed
Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
11
---
22
# Updates $HOME/ansible.log with the date and time of latest ansible playbook run
33

4-
- name: Are we later than C6
5-
shell: echo We are later than CentOS6
6-
when: ansible_distribution_major_version| int > 6
7-
8-
- name: Are we earlier than C10
9-
shell: echo We are later than CentOS10
10-
when: ansible_distribution_major_version| int < 10
11-
12-
- name: Are we between C6 and C10
13-
shell: echo We are between C6 and C10
14-
when:
15-
- ansible_distribution_major_version| int > 6
16-
- ansible_distribution_major_version| int < 10
17-
18-
#- name: Break
19-
# shell: /bin/false
20-
214
- name: Set Log path
225
set_fact:
23-
log_path: /var/log
6+
log_path: /var/log
247

258
- name: Set variables (MacOS)
269
set_fact:
27-
user_group: "staff"
10+
user_group: "staff"
2811
when:
29-
- ansible_distribution == "MacOSX"
12+
- ansible_distribution == "MacOSX"
3013

3114
- name: Set variables (Not MacOS)
3215
set_fact:
33-
user_group: "root"
16+
user_group: "root"
3417
when:
35-
- ansible_distribution != "MacOSX"
18+
- ansible_distribution != "MacOSX"
3619

3720
- name: Get Date and Time
3821
shell: date +%Y-%m-%d\ %H:%M:%S
@@ -47,16 +30,16 @@
4730

4831
- name: Set git_output to git_sha
4932
set_fact:
50-
git_sha: "{{ git_output.stdout }}"
33+
git_sha: "{{ git_output.stdout }}"
5134
when: git_sha is not defined
5235

5336
- name: Update Log File
5437
lineinfile:
55-
owner: root
56-
group: "{{ user_group }}"
57-
create: yes
58-
path: "{{ log_path }}/ansible.log"
59-
insertafter: EOF
60-
line: "{{ position }} {{ date_output.stdout }} {{ git_sha }}"
38+
owner: root
39+
group: "{{ user_group }}"
40+
create: yes
41+
path: "{{ log_path }}/ansible.log"
42+
insertafter: EOF
43+
line: "{{ position }} {{ date_output.stdout }} {{ git_sha }}"
6144
become: yes
6245
become_user: root

0 commit comments

Comments
 (0)