Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 10908bb

Browse files
committed
Update security role to latest version.
1 parent 0257c5d commit 10908bb

File tree

17 files changed

+126
-41
lines changed

17 files changed

+126
-41
lines changed

provisioning/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ roles:
7575
- name: geerlingguy.ruby
7676
version: 2.6.0
7777
- name: geerlingguy.security
78-
version: 1.9.0
78+
version: 2.0.0
7979
- name: geerlingguy.solr
8080
version: 5.1.0
8181
- name: geerlingguy.varnish
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 90
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 30
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- pinned
16+
- security
17+
- planned
18+
19+
# Set to true to ignore issues in a project (defaults to false)
20+
exemptProjects: false
21+
22+
# Set to true to ignore issues in a milestone (defaults to false)
23+
exemptMilestones: false
24+
25+
# Set to true to ignore issues with an assignee (defaults to false)
26+
exemptAssignees: false
27+
28+
# Label to use when marking as stale
29+
staleLabel: stale
30+
31+
# Limit the number of actions per hour, from 1-30. Default is 30
32+
limitPerRun: 30
33+
34+
pulls:
35+
markComment: |-
36+
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!
37+
38+
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale.
39+
40+
unmarkComment: >-
41+
This pull request is no longer marked for closure.
42+
43+
closeComment: >-
44+
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.
45+
46+
issues:
47+
markComment: |-
48+
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
49+
50+
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
51+
52+
unmarkComment: >-
53+
This issue is no longer marked for closure.
54+
55+
closeComment: >-
56+
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

provisioning/roles/geerlingguy.security/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
install:
1515
# Install test dependencies.
16-
- pip install molecule docker
16+
- pip install molecule yamllint ansible-lint docker
1717

1818
before_script:
1919
# Use actual Ansible Galaxy role name for the project directory.

provisioning/roles/geerlingguy.security/molecule/default/yaml-lint.yml renamed to provisioning/roles/geerlingguy.security/.yamllint

File renamed without changes.

provisioning/roles/geerlingguy.security/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ The port through which you'd like SSH to be accessible. The default is port 22,
4444

4545
Security settings for SSH authentication. It's best to leave these set to `"no"`, but there are times (especially during initial server configuration or when you don't have key-based authentication in place) when one or all may be safely set to `'yes'`. **NOTE: It is _very_ important that you quote the 'yes' or 'no' values. Failure to do so may lock you out of your server.**
4646

47+
security_sshd_state: started
48+
49+
The state of the SSH daemon. Typically this should remain `started`.
50+
4751
security_ssh_restart_handler_state: restarted
4852

4953
The state of the `restart ssh` handler. Typically this should remain `restarted`.
@@ -76,7 +80,11 @@ Whether to install/enable `yum-cron` (RedHat-based systems) or `unattended-upgra
7680

7781
security_fail2ban_enabled: true
7882

79-
Wether to install/enable `fail2ban`. You might not want to use fail2ban if you're already using some other service for login and intrusion detection (e.g. [ConfigServer](http://configserver.com/cp/csf.html)).
83+
Whether to install/enable `fail2ban`. You might not want to use fail2ban if you're already using some other service for login and intrusion detection (e.g. [ConfigServer](http://configserver.com/cp/csf.html)).
84+
85+
security_fail2ban_custom_configuration_template: "jail.local.j2"
86+
87+
The name of the template file used to generate `fail2ban`'s configuration.
8088

8189
## Dependencies
8290

provisioning/roles/geerlingguy.security/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ security_ssh_permit_empty_password: "no"
77
security_ssh_challenge_response_auth: "no"
88
security_ssh_gss_api_authentication: "no"
99
security_ssh_x11_forwarding: "no"
10+
security_sshd_state: started
1011
security_ssh_restart_handler_state: restarted
1112

1213
security_sudoers_passwordless: []
@@ -22,3 +23,4 @@ security_autoupdate_mail_to: ""
2223
security_autoupdate_mail_on_error: true
2324

2425
security_fail2ban_enabled: true
26+
security_fail2ban_custom_configuration_template: "jail.local.j2"
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
---
22
- name: restart ssh
3-
service: "name={{ security_sshd_name }} state={{ security_ssh_restart_handler_state }}"
3+
service:
4+
name: "{{ security_sshd_name }}"
5+
state: "{{ security_ssh_restart_handler_state }}"

provisioning/roles/geerlingguy.security/meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
dependencies: []
33

44
galaxy_info:
5+
role_name: security
56
author: geerlingguy
67
description: Security software installation and configuration.
78
company: "Midwestern Mac, LLC"

provisioning/roles/geerlingguy.security/molecule/default/playbook.yml renamed to provisioning/roles/geerlingguy.security/molecule/default/converge.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
pre_tasks:
77
- name: Update apt cache.
8-
package: update_cache=true cache_valid_time=600
8+
package:
9+
update_cache: true
10+
cache_valid_time: 600
911
when: ansible_os_family == 'Debian'
1012

1113
- name: Ensure build dependencies are installed (RedHat).
@@ -17,7 +19,9 @@
1719
when: ansible_os_family == 'RedHat'
1820

1921
- name: Ensure build dependencies are installed (Fedora).
20-
package: name=procps state=present
22+
package:
23+
name: procps
24+
state: present
2125
when: ansible_distribution == 'Fedora'
2226

2327
- name: Ensure build dependencies are installed (Debian).
@@ -33,9 +37,7 @@
3337
dest: /var/log/auth.log
3438
content: ""
3539
force: false
36-
when: >
37-
(ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04') or
38-
(ansible_distribution == 'Debian')
40+
when: ansible_distribution == 'Debian'
3941

4042
roles:
4143
- role: geerlingguy.security

provisioning/roles/geerlingguy.security/molecule/default/molecule.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ dependency:
33
name: galaxy
44
driver:
55
name: docker
6-
lint:
7-
name: yamllint
8-
options:
9-
config-file: molecule/default/yaml-lint.yml
6+
lint: |
7+
set -e
8+
yamllint .
9+
ansible-lint
1010
platforms:
1111
- name: instance
1212
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
@@ -17,13 +17,5 @@ platforms:
1717
pre_build_image: true
1818
provisioner:
1919
name: ansible
20-
lint:
21-
name: ansible-lint
2220
playbooks:
23-
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
24-
scenario:
25-
name: default
26-
verifier:
27-
name: testinfra
28-
lint:
29-
name: flake8
21+
converge: ${MOLECULE_PLAYBOOK:-converge.yml}

0 commit comments

Comments
 (0)