Skip to content

Commit 0ee0df5

Browse files
authored
Don't pin cryptographic modules, fix ansible-lint (notthebee#184)
1 parent cfd3b5c commit 0ee0df5

File tree

9 files changed

+29
-19
lines changed

9 files changed

+29
-19
lines changed
File renamed without changes.

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
repos:
3+
- repo: https://github.com/ansible-community/ansible-lint.git
4+
rev: v6.15.0
5+
hooks:
6+
- id: ansible-lint
7+
files: \.(yaml|yml)$
8+
entry: ansible-lint . --force-color -v -p

ansible.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[defaults]
2-
ask_vault_pass = True
2+
#ask_vault_pass = True
33
inventory = inventory.yml
44
interpreter_python = python3
55
roles_path = .ansible/roles

bootstrap.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ if [[ "$custom_filled" =~ "custom.yml" ]]; then
177177
echo "If you want to change something (e.g. username, domain name, etc.)"
178178
echo "Please edit custom.yml or secret.yml manually, and then re-run this script"
179179
echo
180-
cd $HOME/ansible-easy-vpn && ansible-playbook run.yml
180+
cd $HOME/ansible-easy-vpn && ansible-playbook --ask-vault-pass run.yml
181181
exit 0
182182
fi
183183

@@ -418,12 +418,12 @@ if [[ "$launch_playbook" =~ ^[yY]$ ]]; then
418418
if [[ $EUID -ne 0 ]]; then
419419
echo
420420
echo "Please enter your current sudo password now"
421-
cd $HOME/ansible-easy-vpn && ansible-playbook -K run.yml
421+
cd $HOME/ansible-easy-vpn && ansible-playbook --ask-vault-pass -K run.yml
422422
else
423-
cd $HOME/ansible-easy-vpn && ansible-playbook run.yml
423+
cd $HOME/ansible-easy-vpn && ansible-playbook --ask-vault-pass run.yml
424424
fi
425425
else
426-
echo "You can run the playbook by executing this script again"
427-
echo "cd ${HOME}/ansible-easy-vpn && bash bootstrap.sh"
426+
echo "You can run the playbook by executing the bootstrap script again:"
427+
echo "cd ~/ansible-easy-vpn && bash bootstrap.sh"
428428
exit
429429
fi

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cryptography<=36.0.2
2-
pyOpenSSL<=20.0.1
1+
cryptography
2+
pyOpenSSL
33
certbot
44
requests<2.29.2
55
passlib

roles/docker_network/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
- name: Create the wg network
23
community.general.docker_network:
34
name: wg_network

roles/system/tasks/firewall-RedHat.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88

99
- name: Configure the firewall with system python3.6 if on CentOS 8
1010
when: ansible_distribution_major_version | int == 8
11-
set_fact:
11+
ansible.builtin.set_fact:
1212
ansible_python_interpreter: "/usr/bin/python3.6"
1313

1414
- name: Configure the firewall with system python3.9 if on CentOS 9
1515
when: ansible_distribution_major_version | int == 9
16-
set_fact:
16+
ansible.builtin.set_fact:
1717
ansible_python_interpreter: "/usr/bin/python3"
1818

19-
20-
2119
- name: Configure firewalld
2220
block:
2321
- name: Allow the defined ports
@@ -34,7 +32,7 @@
3432
port: "{{ ssh_port }}/tcp"
3533

3634
- name: Put the venv python interpreter back in place
37-
set_fact:
35+
ansible.builtin.set_fact:
3836
ansible_python_interpreter: "/{{ lookup('env', 'HOME') }}/ansible-easy-vpn/.venv/bin/python3"
3937

4038
- name: Enable and start firewalld

roles/system/tasks/setup-RedHat.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,45 @@
55
name: "*"
66
state: latest
77
update_cache: yes
8+
tags:
9+
- skip_ansible_lint
810

911
- name: Update and upgrade dnf packages
1012
when: ansible_distribution_major_version | int >= 8
1113
ansible.builtin.dnf:
1214
name: "*"
1315
state: latest
1416
update_cache: yes
17+
tags:
18+
- skip_ansible_lint
1519

1620
- name: Set correct automatic update utility vars (RHEL 8)
17-
set_fact:
21+
ansible.builtin.set_fact:
1822
update_utility: dnf-automatic
1923
update_service: dnf-automatic-install.timer
2024
update_conf_path: /etc/dnf/automatic.conf
2125
when: ansible_distribution_major_version | int >= 8
2226

2327
- name: Set correct automatic update utility vars (RHEL <= 7)
24-
set_fact:
28+
ansible.builtin.set_fact:
2529
update_utility: yum-cron
2630
update_service: yum-cron
2731
update_conf_path: /etc/yum/yum-cron.conf
2832
when: ansible_distribution_major_version | int <= 7
2933

3034
- name: Install automatic update utility
31-
package:
35+
ansible.builtin.package:
3236
name: '{{ update_utility }}'
3337
state: present
3438

3539
- name: Ensure automatic update utility is running and enabled on boot
36-
service:
40+
ansible.builtin.service:
3741
name: '{{ update_service }}'
3842
state: started
3943
enabled: true
4044

4145
- name: Configure autoupdates
42-
lineinfile:
46+
ansible.builtin.lineinfile:
4347
dest: '{{ update_conf_path }}'
4448
regexp: '^apply_updates = .+'
4549
line: 'apply_updates = yes'

run.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
tags:
2525
- system
2626

27-
2827
- role: geerlingguy.docker
2928
tags:
3029
- docker

0 commit comments

Comments
 (0)