fix linter and bump python CI versions

format-files
chatton 3 years ago
parent bd7d73e40b
commit 82bc12046b

@ -32,7 +32,7 @@ jobs:
mv tests/hosts.ini ./hosts.ini mv tests/hosts.ini ./hosts.ini
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.8.9 python-version: 3.11.4
- name: Install test dependencies. - name: Install test dependencies.
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: Install ansible dependencies. - name: Install ansible dependencies.

@ -32,7 +32,7 @@ jobs:
mv tests/hosts.ini ./hosts.ini mv tests/hosts.ini ./hosts.ini
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.8.9 python-version: 3.11.4
- name: Install test dependencies. - name: Install test dependencies.
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: Delete Linode Instance - name: Delete Linode Instance

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.8.9 python-version: 3.11.4
- name: Create Vault Key - name: Create Vault Key
run: echo "${{ secrets.VAULT_PASSWORD }}" > ~/.vault-key run: echo "${{ secrets.VAULT_PASSWORD }}" > ~/.vault-key
- name: Install dependencies - name: Install dependencies
@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.8.9 python-version: 3.11.4
- name: Install dependencies - name: Install dependencies
run: make deps run: make deps
- name: Format code - name: Format code

@ -9,7 +9,8 @@
tags: [always] tags: [always]
tasks: tasks:
- ansible.builtin.include_role: - name: Backup Directories.
ansible.builtin.include_role:
name: backup_directory name: backup_directory
with_items: "{{ backup_directories }}" with_items: "{{ backup_directories }}"
loop_control: loop_control:

@ -6,6 +6,7 @@
community.general.archive: community.general.archive:
path: "{{ backup.path }}" path: "{{ backup.path }}"
dest: /tmp/backup.tar.gz dest: /tmp/backup.tar.gz
mode: "0755"
- name: Upload backups to S3 - name: Upload backups to S3
amazon.aws.aws_s3: amazon.aws.aws_s3:
@ -20,6 +21,6 @@
permission: "{{ docker_backup_aws_s3_permissions }}" permission: "{{ docker_backup_aws_s3_permissions }}"
- name: Remove local backup. - name: Remove local backup.
file: ansible.builtin.file:
path: /tmp/backup.tar.gz path: /tmp/backup.tar.gz
state: absent state: absent

@ -89,16 +89,3 @@
-U https://github.com/chatton/ansible-homelab playbooks/backup-docker-volumes.yml -e schedule=nightly >> ~/logs/nightly.log 2>&1 -U https://github.com/chatton/ansible-homelab playbooks/backup-docker-volumes.yml -e schedule=nightly >> ~/logs/nightly.log 2>&1
cron_file: ansible_nightly_docker_volume_backup cron_file: ansible_nightly_docker_volume_backup
state: present state: present
- name: Ensure Monthly Cron Backups
tags: [ "cron" ]
ansible.builtin.cron:
name: backup docker volumes (monthly)
month: "*"
day: "0"
user: "{{ homelab_user }}"
job: >
{{ ansible_pull_path }}
-U https://github.com/chatton/ansible-homelab playbooks/backup-docker-volumes.yml -e schedule=monthly >> ~/logs/monthly.log 2>&1
cron_file: ansible_monthly_docker_volume_backup
state: present

@ -43,14 +43,14 @@
mode: 0644 mode: 0644
- name: Disable password authentication for root. - name: Disable password authentication for root.
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
state: present state: present
regexp: '^#?PermitRootLogin' regexp: '^#?PermitRootLogin'
line: 'PermitRootLogin prohibit-password' line: 'PermitRootLogin prohibit-password'
- name: Disable password authentication for users. - name: Disable password authentication for users.
lineinfile: ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
state: present state: present
regexp: '^#?PasswordAuthentication' regexp: '^#?PasswordAuthentication'

Loading…
Cancel
Save