Adding self installation command for fabrica
This commit is contained in:
39
.packer/provisioning/playbooks/instance.yml
Normal file
39
.packer/provisioning/playbooks/instance.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
- name: Instance EOLE image
|
||||
hosts: all
|
||||
|
||||
environment:
|
||||
http_proxy: "{{ lookup('env','http_proxy') }}"
|
||||
https_proxy: "{{ lookup('env','https_proxy') }}"
|
||||
HTTPS_PROXY: "{{ lookup('env','HTTPS_PROXY') }}"
|
||||
HTTP_PROXY: "{{ lookup('env','HTTP_PROXY') }}"
|
||||
|
||||
tasks:
|
||||
- name: Installation de pexpect
|
||||
package:
|
||||
name: python-pexpect
|
||||
state: present
|
||||
|
||||
- name: Instancier le module EOLE
|
||||
expect:
|
||||
command: /usr/bin/instance
|
||||
# Attention, les mots de passe sont en clairs dans le playbook !
|
||||
# Il serait préférable d'utiliser le mécanisme ansible_vault ici
|
||||
responses:
|
||||
"Nouveau mot de passe:":
|
||||
- "NotSoSecret;21"
|
||||
- "NotSoSecret;21"
|
||||
"Confirmation du mot de passe:":
|
||||
- "NotSoSecret;21"
|
||||
- "NotSoSecret;21"
|
||||
'\[non\]':
|
||||
- non
|
||||
'\[oui\]':
|
||||
- non
|
||||
'(.*)Un red(.)marrage(.*)\[oui\]':
|
||||
- non
|
||||
echo: yes
|
||||
timeout: 900
|
||||
|
||||
- name: Désactivation du Maj-Auto
|
||||
command: /usr/share/eole/sbin/manage_schedule -d majauto
|
Reference in New Issue
Block a user