add: first files

This commit is contained in:
rcordier 2024-05-10 12:46:48 -04:00
commit 996d8ead7e
6 changed files with 91 additions and 0 deletions

19
Taskfile.yml Normal file
View File

@ -0,0 +1,19 @@
version: 3
tasks:
install_deps:
desc: Install galaxy requirements
cmds:
- ansible-galaxy install -r requirements.yml
run:
desc: Run site playbook
cmds:
- ansible-playbook playbooks/hello.yml
inventory:
desc: show inventyory
aliases: [inv]
cmds:
- ansible-inventory --graph

7
ansible.cfg Normal file
View File

@ -0,0 +1,7 @@
[defaults]
collections_path = ansible_collections/
inventory = inventories

22
inventories/lab/hosts.yml Normal file
View File

@ -0,0 +1,22 @@
lab:
vars:
ansible_host: localhost
ansible_connection: local
hosts:
local:
children:
web:
hosts:
client1-web1:
#ansible_port: 2222
client1-web2:
vars:
ansible_user: root
db:
hosts:
client1-db:
#vars:
# ansible_become: true
# ansible_become_pass: password

38
playbooks/hello.yml Normal file
View File

@ -0,0 +1,38 @@
- name: Hello World
hosts: local
gather_facts: no
pre_tasks:
- name: Print debug message
debug:
msg: Hello, world!
- name: Hello World
hosts: client1-web1
gather_facts: no
tasks:
- name: test1
import_role:
name: activia.infra_common.configure_web
- name: Hello World
hosts: client1-db
gather_facts: no
tasks:
- name: test2
import_role:
name: activia.infra_common.configure_db
# option: 1
# roles:
# - role: roles/configure-web
# # - role: roles/configure-db

0
requirements.txt Normal file
View File

5
requirements.yml Normal file
View File

@ -0,0 +1,5 @@
collections:
- name: https://git.jeznet.org/activia-tests/ansible-collection-infra-common.git
type: git
version: main