Use ansible collections for things
This commit is contained in:
parent
e8496ddced
commit
c4999d7b25
8 changed files with 21 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -3,3 +3,7 @@ skip_list:
|
|||
- 401
|
||||
- 301
|
||||
- 503
|
||||
|
||||
exclude_paths:
|
||||
- ansible/galaxy_roles/
|
||||
- ansible/galaxy_collections/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
collections:
|
||||
- ansible.posix
|
||||
- community.general
|
||||
|
||||
roles:
|
||||
- src: geerlingguy.docker
|
||||
- src: geerlingguy.ntp
|
||||
- src: realorangeone.reflector
|
||||
|
|
|
@ -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) }}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
PATH=${PWD}/env/bin:${PATH}
|
||||
|
||||
set -x
|
||||
set -ex
|
||||
|
||||
cd ansible/
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue