Skip to content
Snippets Groups Projects
Commit de0a2549 authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[udp] del mod-ansible & ansible.tf

parent a50d6c39
No related branches found
No related tags found
No related merge requests found
---
- name: Playbook
hosts: all
become: true
tasks:
- name: ensure git is at the latest version
ansible.builtin.apt:
name: git
state: present
- name: ensure git is running
ansible.builtin.service:
name: git
state: started
# lancement du playbook ansible
resource "null_resource" "ansible" {
provisioner "local-exec" {
interpreter = ["/bin/bash", "-c"]
#command = "source /home/user/TP/Ansible/venv/ansible/bin/activate; ANSIBLE_HOST_KEY_CHECKING=False ansible -i hosts.ini all -m ping --private-key .ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pem -e pub_key=.ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pub; deactivate"
command = "ANSIBLE_HOST_KEY_CHECKING=False ansible -i hosts.ini all -m ping --private-key .ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pem -e pub_key=.ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pub"
}
depends_on = [
openstack_compute_instance_v2.bastion_instance,
openstack_compute_instance_v2.orchestration_instance,
null_resource.copy_keypair_cluster,
null_resource.copy_local_ip_bastion
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment