Skip to content

Instantly share code, notes, and snippets.

View netmonk's full-sized avatar
🏠
Working from home

Netmonk netmonk

🏠
Working from home
View GitHub Profile
ok: [vmapp3] => {
"msg": [
"casae_mainDb/ddl/full_drop_000_001_003_ddl.sql;",
"casae_mainDb/ddl/full_drop_ddl.sql;",
"",
"ema_ac/ddl/ac_activity_mti_ddl.sql;",
"ema_ac/ddl/ac_bank_ddl.sql;",
"ema_ac/ddl/ac_broadcast_ddl.sql;",
"ema_ac/ddl/ac_change_value_ddl.sql;",
"ema_ac/ddl/ac_cm_status_card_ddl.sql;",
[bdserver]
vmapp3 ansible_ssh_host="10.179.189.134" ansible_user=dawgcicd
[appserver]
vmapp1 ansible_ssh_host="10.179.189.133" ansible_user=dawgcicd
[silo1:children]
appserver
bdserver
- hosts: bdserver
any_errors_fatal: true
gather_facts: yes
roles:
- { role: bddeploy/clean, tags: [bd, bdclean]}
- { role: bddeploy/populate, tags: [bd, bdpopulate]}
---
#ce role sert à créer les bases de données tango
- debug:
msg: dbname of {{ inventory_hostname }} is {{ dbname_tango}}
# au préalable il faut un endroit pour recevoir l'archive tango
- name: bddeploy | Creating release folder
file:
path: "{{ item }}"
- debug:
msg: dbname of {{ inventory_hostname }} is {{ dbname_tango}}
# au préalable il faut un endroit pour recevoir l'archive tango
- name: bddeploy | Creating release folder
file:
path: "{{ item }}"
owner: "{{ appuser }}"
state: directory
mode: 0744
with_items:
- name: bddeploy | Creating release folder
file:
path: "{{ item }}"
owner: "{{ appuser }}"
state: directory
mode: 0744
with_items:
- "{{ app_dir}}/{{ release_name}}"
# on telecharge l'archive tango
- name: bddeploy | Importing SAE sql schemes
#delegate_to: "{{ ansible_ssh_host }}"
mysql_db:
state: import
name: "{{ dbname_tango }}"
login_host: "{{ dbhost_tango }}"
login_user: "{{ dbadmin }}"
login_password: "{{ dbadminpassword }}"
target: "{{app_dir }}/{{ release_name}}/sql/{{ item }}"
with_items: "{{ lookup('file', '{{ app_dir }}/{{ release_name }}/sql/list.sae_full.scripts').splitlines() }}"
---
- name: Collect primary rebond server sshd keys files
slurp: src={{ item }}
with_items:
- /etc/ssh/ssh_host_rsa_key.pub
- /etc/ssh/ssh_host_rsa_key
- /etc/ssh/ssh_host_ecdsa_key.pub
- /etc/ssh/ssh_host_ecdsa_key
- /etc/ssh/ssh_host_ed25519_key.pub
https://www.ditchthecarbs.com/keto-waffles/
[root(4)netmonk:plonky]# LC_ALL=C pacman -Suy
:: Synchronizing package databases...
core is up to date
extra 1743.5 KiB 1030K/s 00:02 [##############################] 100%
community 2.3 MiB 1034K/s 00:02 [##############################] 100%
:: Starting full system upgrade...
:: Replace polkit-qt with extra/polkit-qt4? [Y/n] y
resolving dependencies...
looking for inter-conflicts...