Skip to content

Commit a35f6d3

Browse files
authored
Merge pull request #25 from ansible-lockdown/devel
Added Issue/PR Templates and Issue Fixes Signed-off-by: George Nalen <[email protected]>
2 parents a019ff1 + 4aa8a02 commit a35f6d3

File tree

8 files changed

+92
-13
lines changed

8 files changed

+92
-13
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Report Issue
3+
about: Create a bug issue ticket to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the Issue**
11+
A clear and concise description of what the bug is.
12+
13+
**Expected Behavior**
14+
A clear and concise description of what you expected to happen.
15+
16+
**Actual Behavior**
17+
A clear and concise description of what's happening.
18+
19+
**Control(s) Affected**
20+
What controls are being affected by the issue
21+
22+
**Environment (please complete the following information):**
23+
- Ansible Version: [e.g. 2.10]
24+
- Host Python Version: [e.g. Python 3.7.6]
25+
- Ansible Server Python Version: [e.g. Python 3.7.6]
26+
- Additional Details:
27+
28+
**Additional Notes**
29+
Anything additional goes here
30+
31+
**Possible Solution**
32+
Enter a suggested fix here
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature Request or Enhancement
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Feature Request or Enhancement**
11+
- Feature []
12+
- Enhancement []
13+
14+
**Summary of Request**
15+
A clear and concise description of what you want to happen.
16+
17+
**Describe alternatives you've considered**
18+
A clear and concise description of any alternative solutions or features you've considered.
19+
20+
**Suggested Code**
21+
Please provide any code you have in mind to fulfill the request

.github/ISSUE_TEMPLATE/question.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Question
3+
about: Ask away.......
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
**Question**
11+
Pose question here.
12+
13+
**Environment (please complete the following information):**
14+
- Ansible Version: [e.g. 2.10]
15+
- Host Python Version: [e.g. Python 3.7.6]
16+
- Ansible Server Python Version: [e.g. Python 3.7.6]
17+
- Additional Details:

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**Overall Review of Changes:**
2+
A general description of the changes made that are being requested for merge
3+
4+
**Any Related Open Issues:**
5+
Please list any open issues this PR addresses
6+
7+
**How has this been tested?:**
8+
Please give an overview of how these changes were tested. If they were not please use N/A
9+

defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ ubtu20cis_vsftpd_server: false
322322
ubtu20cis_httpd_server: false
323323
ubtu20cis_dovecot_server: false
324324
ubtu20cis_smb_server: false
325-
ubtu20cis_squid_server: fase
325+
ubtu20cis_squid_server: false
326326
ubtu20cis_snmp_server: false
327327
ubtu20cis_rsync_server: false
328328
ubtu20cis_nis_server: false
@@ -428,7 +428,7 @@ ubtu20cis_ntp_server_options: "iburst"
428428
# Control 2.1.15
429429
# ubtu20_cis_mail_transfer_agent is the mail transfer agent in use
430430
# The options are exim4, postfix or other
431-
ubtu20_cis_mail_transfer_agent: "other"
431+
# ubtu20_cis_mail_transfer_agent: "other"
432432

433433
# Section 3 Control Variables
434434
# Control 3.1.2

tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
- ubtu20cis_section5_patch or
3838
ubtu20cis_section6_patch
3939

40+
- name: Gather the package facts
41+
package_facts:
42+
manager: auto
43+
tags:
44+
- always
45+
4046
- name: Include section 1 patches
4147
import_tasks: section_1/main.yml
4248
when: ubtu20cis_section1_patch

tasks/parse_etc_password.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,3 @@
3030
\g<shell>
3131
tags:
3232
- always
33-
34-
- name: test1
35-
debug:
36-
msg: "{{ ubtu20cis_passwd | json_query('uid') }}"
37-
38-
- name: test2
39-
debug:
40-
msg: "{{ ubtu20cis_passwd | selectattr('uid', '>=', 1000) | map(attribute='dir') | flatten }}"

tasks/section_2/cis_2.1.x.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,22 +397,24 @@
397397
- { regexp: '^dc_mailname_in_oh', line: "dc_mailname_in_oh='true'" }
398398
- { regexp: '^dc_localdelivery', line: "dc_localdelivery='mail_spool'" }
399399
notify: restart exim4
400-
when: ubtu20_cis_mail_transfer_agent == "exim4"
400+
when: "'exim4' in ansible_facts.packages"
401401

402402
- name: "AUTOMATED | 2.1.15 | PATCH | Ensure mail transfer agent is configured for local-only mode | Make changes if postfix is installed"
403403
lineinfile:
404404
path: /etc/postfix/main.cf
405405
regexp: '^(#)?inet_interfaces'
406406
line: 'inet_interfaces = loopback-only'
407407
notify: restart postfix
408-
when: ubtu20_cis_mail_transfer_agent == "postfix"
408+
when: "'postfix' in ansible_facts.packages"
409409

410410
- name: "AUTOMATED | 2.1.15 | PATCH | Ensure mail transfer agent is configured for local-only mode | Message out other main agents"
411411
debug:
412412
msg:
413413
- "Warning!! You are not using either exim4 or postfix"
414414
- "Please review your vendors documentation to configure local-only mode"
415-
when: ubtu20_cis_mail_transfer_agent == "other"
415+
when:
416+
- "'exim4' not in ansible_facts.packages"
417+
- "'postfix' not in ansible_facts.packages"
416418
when:
417419
- ubtu20cis_rule_2_1_15
418420
tags:

0 commit comments

Comments
 (0)