Well, first push

This commit is contained in:
git
2023-04-19 17:02:43 +02:00
parent 825b252c9b
commit ee38cf8458
72 changed files with 1195 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View File

@@ -0,0 +1,2 @@
---
# defaults file for import_ssh_key

View File

@@ -0,0 +1,2 @@
---
# handlers file for import_ssh_key

View File

@@ -0,0 +1,17 @@
---
- name: Dowload
ansible.builtin.uri:
url: https://github.com/MatousVondrejka.keys
method: GET
return_content: true
register: ssh_key
- name: Setting
ansible.builtin.blockinfile:
state: present
insertafter: EOF
path: ~/.ssh/authorized_keys
mode: '0664'
create: true
block: |
{{ ssh_key.content }}

View File

@@ -0,0 +1,2 @@
localhost

View File

@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- import_ssh_key

View File

@@ -0,0 +1,2 @@
---
# vars file for import_ssh_key