Browse Source

Use ansible collections for things

master
Jake Howard 3 months ago
parent
commit
c4999d7b25
Signed by: theorangeone GPG Key ID: 57AFB45680EDD477
  1. 1
      .gitignore
  2. 4
      ansible/.ansible-lint
  3. 1
      ansible/ansible.cfg
  4. 17
      ansible/galaxy-requirements.yml
  5. 2
      ansible/roles/base/tasks/ssh.yml
  6. 1
      ansible/yamllint.yml
  7. 6
      scripts/ansible/deploy.sh
  8. 2
      scripts/ansible/lint.sh

1
.gitignore

@ -114,6 +114,7 @@ dmypy.json
env/
ansible/.vault_pass
ansible/galaxy_roles
ansible/galaxy_collections
# Created by https://www.gitignore.io/api/terraform
# Edit at https://www.gitignore.io/?templates=terraform

4
ansible/.ansible-lint

@ -3,3 +3,7 @@ skip_list:
- 401
- 301
- 503
exclude_paths:
- ansible/galaxy_roles/
- ansible/galaxy_collections/

1
ansible/ansible.cfg

@ -3,6 +3,7 @@ nocows = 1
host_key_checking = False
retry_files_enabled = False
roles_path = $PWD/galaxy_roles:$PWD/roles
collections_path = $PWD/galaxy_collections
inventory = ./hosts
become_ask_pass = True
interpreter_python = auto

17
ansible/galaxy-requirements.yml

@ -1,6 +1,11 @@
- src: geerlingguy.docker
- src: geerlingguy.ntp
- src: realorangeone.reflector
- src: https://github.com/IronicBadger/ansible-role-proxmox-nag-removal
name: proxmox-nag-removal
- src: chmduquesne.iptables_persistent
collections:
- ansible.posix
- community.general
roles:
- src: geerlingguy.docker
- src: geerlingguy.ntp
- src: realorangeone.reflector
- src: https://github.com/IronicBadger/ansible-role-proxmox-nag-removal
name: proxmox-nag-removal
- src: chmduquesne.iptables_persistent

2
ansible/roles/base/tasks/ssh.yml

@ -26,7 +26,7 @@
register: sshd_config
- name: Set up authorized keys
authorized_key:
ansible.posix.authorized_key:
user: "{{ user }}"
state: present
key: "{{ lookup('file', item) }}"

1
ansible/yamllint.yml

@ -2,6 +2,7 @@ extends: default
ignore: |
ansible/galaxy_roles
ansible/galaxy_collections
ansible/group_vars/all/hosts.yml
ansible/roles/traefik/files/traefik.yml
ansible/roles/nebula/files/nebula.yml

6
scripts/ansible/deploy.sh

@ -1,10 +1,6 @@
#!/usr/bin/env bash
set -e
PATH=${PWD}/env/bin:${PATH}
set -x
set -ex
cd ansible/

2
scripts/ansible/lint.sh

@ -8,6 +8,6 @@ set -x
yamllint -sc ansible/yamllint.yml ansible/
ansible-lint ansible/main.yml -p -c ansible/.ansible-lint --exclude ansible/galaxy_roles/
ansible-lint ansible/main.yml -p -c ansible/.ansible-lint
cd ansible/ && ansible-playbook main.yml --syntax-check
Loading…
Cancel
Save