79 lines
1.1 KiB
YAML
79 lines
1.1 KiB
YAML
|
|
|
|
|
|
|
|
- name: Debug context v1
|
|
hosts: localhost
|
|
gather_facts: no
|
|
|
|
pre_tasks:
|
|
|
|
|
|
- name: get debug infos
|
|
shell:
|
|
cmd: |-
|
|
ansible-galaxy collection list || true
|
|
register: output1
|
|
|
|
- name: Show collections
|
|
debug:
|
|
var: output1
|
|
|
|
- name: Show groups
|
|
debug:
|
|
var: groups
|
|
|
|
|
|
|
|
|
|
- name: Hello World
|
|
hosts: localhost
|
|
gather_facts: no
|
|
|
|
pre_tasks:
|
|
- name: Print debug message v1
|
|
debug:
|
|
msg: Hello, world!
|
|
|
|
- name: get debug infos
|
|
shell:
|
|
cmd: |-
|
|
echo ID=$(id -u)
|
|
echo PWD=$PWD
|
|
git remote -v || true
|
|
|
|
register: output
|
|
|
|
- name: Local run context
|
|
debug:
|
|
var: output
|
|
|
|
|
|
- name: Configure Web
|
|
hosts: web
|
|
gather_facts: no
|
|
|
|
tasks:
|
|
- name: test1
|
|
import_role:
|
|
name: activia.infra_common.configure_web
|
|
|
|
- name: Configure DB
|
|
hosts: 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
|
|
|
|
|
|
|
|
|