ansible_lxd_tests/Playbooks/01-A-OPENLDAP.yml

33 lines
976 B
YAML
Raw Normal View History

2022-07-28 20:52:07 -03:00
# ansible-playbook Playbooks/01-A-OPENLDAP.yml -i Inventories/QA -v -t 'deploy' --ask-become-pass
# ansible-playbook Playbooks/01-A-OPENLDAP.yml -i Inventories/QA -v -t 'deploy' --become-password-file
2022-08-05 01:34:36 -03:00
############# TO DO
# usar el socket sin sudo
# storage pool zfs
#############
2022-07-28 20:52:07 -03:00
- hosts: ubuntu_lxd
gather_facts: false
tags: deploy
vars:
2022-08-05 01:34:36 -03:00
service_name: OpenLDAP-01
DIR: "/home/{{ansible_user}}/OpenLDAP"
ssh_key_passphrase: open
ssh_key_name: OpenLDAP
roles:
- lxc_configure_ssh
2022-07-28 20:52:07 -03:00
tasks:
2022-08-05 01:34:36 -03:00
# Copio el manifest.
- file: path="{{DIR}}" state=directory mode='0755'
- copy: src=Manifests/OpenLDAP/main.tf dest="{{DIR}}/OpenLDAP-01.tf"
2022-07-28 20:52:07 -03:00
2022-08-05 01:34:36 -03:00
# Ejecuto el manifest, creo la instancia.
# Se necesita sudo para conectarse con el socket de LXD
- community.general.terraform:
project_path: "{{DIR}}"
2022-07-28 20:52:07 -03:00
force_init: true
state: present
2022-08-05 01:34:36 -03:00
binary_path: "/home/renzo/.local/bin/terraform"
become: true
register: terraform