Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#534)
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate

updates:

github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0
github.com/ansible/ansible-lint.git: v6.19.0 → v6.20.3
github.com/shellcheck-py/shellcheck-py: v0.9.0.5 → v0.9.0.6

Reviewed-by: Matej Focko
  • Loading branch information
softwarefactory-project-zuul[bot] authored Oct 11, 2023
2 parents 6d1f186 + 170809b commit 35a5289
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
Expand All @@ -20,7 +20,7 @@ repos:
args:
- --allow-missing-credentials
- repo: https://github.com/ansible/ansible-lint.git
rev: v6.19.0
rev: v6.20.3
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
Expand All @@ -29,7 +29,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
rev: v0.9.0.6
hooks:
- id: shellcheck
- repo: https://github.com/gitleaks/gitleaks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
---
- name: Create secrets directory hierarchy
ansible.builtin.file:
path: "{{ path_to_secrets }}"
path: "{{ generate_secrets_path }}"
state: directory
mode: 0755
14 changes: 7 additions & 7 deletions playbooks/roles/generate_secrets/tasks/generate-cert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- name: Generate OpenSSL private keys
openssl_privatekey:
path: "{{ path_to_secrets }}/{{ item }}"
path: "{{ generate_secrets_path }}/{{ item }}"
loop:
- private-key.pem
- privkey.pem
Expand All @@ -19,24 +19,24 @@

- name: Generate OpenSSL CSR
openssl_csr:
path: "{{ path_to_secrets }}/{{ item.csr }}"
privatekey_path: "{{ path_to_secrets }}/{{ item.key }}"
path: "{{ generate_secrets_path }}/{{ item.csr }}"
privatekey_path: "{{ generate_secrets_path }}/{{ item.key }}"
common_name: localhost
loop:
- { key: privkey.pem, csr: fullchain.csr }

- name: Generate Self Signed OpenSSL certificate
openssl_certificate:
path: "{{ path_to_secrets }}/{{ item.cert }}"
privatekey_path: "{{ path_to_secrets }}/{{ item.key }}"
csr_path: "{{ path_to_secrets }}/{{ item.csr }}"
path: "{{ generate_secrets_path }}/{{ item.cert }}"
privatekey_path: "{{ generate_secrets_path }}/{{ item.key }}"
csr_path: "{{ generate_secrets_path }}/{{ item.csr }}"
provider: selfsigned
loop:
- { cert: fullchain.pem, key: privkey.pem, csr: fullchain.csr }

- name: Remove CSR
ansible.builtin.file:
path: "{{ path_to_secrets }}/{{ item }}"
path: "{{ generate_secrets_path }}/{{ item }}"
state: absent
loop:
- fullchain.csr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- name: Generate config files
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ path_to_secrets }}/{{ item }}"
dest: "{{ generate_secrets_path }}/{{ item }}"
mode: 0644
loop:
- packit-service.yaml.j2
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/generate_secrets/tasks/generate-ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
---
- name: Generate an OpenSSH keypair with the default values (4096 bits, rsa)
openssh_keypair:
path: "{{ path_to_secrets }}/id_ed25519"
path: "{{ generate_secrets_path }}/id_ed25519"
type: "ed25519"
2 changes: 1 addition & 1 deletion playbooks/roles/generate_secrets/tasks/touch-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
---
- name: Create empty files
ansible.builtin.file:
path: "{{ path_to_secrets }}/{{ item }}"
path: "{{ generate_secrets_path }}/{{ item }}"
state: touch
mode: 0644
loop:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/generate_secrets/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
path_to_secrets: "{{ generate_secrets_project_dir }}/secrets/packit/dev"
generate_secrets_path: "{{ generate_secrets_project_dir }}/secrets/packit/dev"

0 comments on commit 35a5289

Please sign in to comment.