diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index bf66e44..a1a218c 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -2,8 +2,6 @@ # To forward my SSH key to remote hosts, and be able to pull from gitlab transport = ssh -ask_vault_pass = True - [ssh_connection] # ForwardAgent to forward my SSH key to remote hosts, and be able to pull from gitlab diff --git a/ansible/build.yml b/ansible/build.yml index 1fba8d7..a419e29 100644 --- a/ansible/build.yml +++ b/ansible/build.yml @@ -1,5 +1,5 @@ --- -- hosts: all +- hosts: serenity gather_facts: no roles: - build \ No newline at end of file diff --git a/ansible/deploy.yml b/ansible/deploy.yml index a31aceb..a6880ed 100644 --- a/ansible/deploy.yml +++ b/ansible/deploy.yml @@ -1,5 +1,5 @@ --- -- hosts: all +- hosts: serenity gather_facts: no roles: - deploy \ No newline at end of file diff --git a/ansible/group_vars/all/vars.yml b/ansible/group_vars/all/vars.yml index 37c62e7..c517703 100644 --- a/ansible/group_vars/all/vars.yml +++ b/ansible/group_vars/all/vars.yml @@ -4,12 +4,29 @@ www_path: /vault/www sites_path: /vault/sites sites: - - slug: rdb # Shorthand name to use as directory/file name + # - slug: rdb # Shorthand name to use as directory/file name + # # The site URL (without www) + # url: rennesdesbois.fr + # # Ask nginx to redirect url to www + # # Else, we redirect www to url + # redirect_to_www: yes + # # What kind of site is that? + # type: wordpress + # # Subnet addresses + # subnet_cidr_address: 172.27.1.0/24 + # subnet_gateway_ip: 172.27.1.1 + # subnet_site_ip: 172.27.1.2 + + # mysql_database: rdb + # mysql_username: rdb + # mysql_password: "{{ vault_rdb_mysql_password }}" + + - slug: arvuhez # Shorthand name to use as directory/file name # The site URL (without www) - url: rennesdesbois.fr + url: arvuhez.org # Ask nginx to redirect url to www # Else, we redirect www to url - redirect_to_www: yes + redirect_to_www: no # What kind of site is that? type: wordpress # Subnet addresses diff --git a/ansible/group_vars/all/vault.yml b/ansible/group_vars/all/vault.yml index 9f225fd..c99ce33 100644 --- a/ansible/group_vars/all/vault.yml +++ b/ansible/group_vars/all/vault.yml @@ -1,15 +1,18 @@ $ANSIBLE_VAULT;1.1;AES256 -35323866396364383230333062393263343363613332643931643435636637363133656234303263 -3430343534643762306134316334306438326135653362370a353636346437346438613538333938 -30356339326435373262313031393939373234306464356364373032646433313831326131393438 -3261663633626364660a316138303261373637373865646434393566323236336235323635653331 -39633639383239343563396561373338653561653533666338343232363439626137393733633062 -39353434613431396531646237393464356432326366366531373338306537616164633062623465 -30313661353930353966366166333339646431663537363730656363613735323031653865353933 -38386662363463623038326330386166663066343866616334396461623034343531623939656462 -38633231633061616161653837363239336233396438313064396238653539313031386364636566 -32613331643532303638333638306330616461393266363466333666633637326564383266363761 -61363931373839303863343062356462613932363836376539346463356230343964376233363566 -66666339623439353637316533323762363361303430613765393665343032653564623632613737 -36393839336662343530373330353930633033336335666432373532356662373134616337346462 -6238326631333231336134616166323363663062656232626562 +32333161663031336337306564336431336432656334323931653564353263623063353463316239 +3539633636383265623233323663383432396531323839660a366266393837333362376166303633 +63303836343433303830323630656532666466333231633431383265303637353231646635636231 +3666373032653565370a386534313865383632373137396466333765623939346535323364653337 +37346534626235666438643863343565626338396662333238373265343236373138663034653830 +62343766393834393933303364623365323263386338643939396238653163353266366165326266 +65303063333038656239373363323333356233366231396664323263653937623765633139383933 +39326632663733393839636563333633666236656531353863633837396539393131353165333435 +35323432353062363465323931613236623966396132636435663061356531646363343436313536 +39336135326232626139353534353338613836353330623431363439666134353664613330393333 +33663536376431393030643335306138353931393266343736636630653861306237663866643465 +64383831366463366539666265363166653739316635666663356630353964396432393031333364 +36366435393139313034373030343161663139623339316662653239393734346363383132383163 +31326134613238343862663733386361303532336236613961346534356434623535383837666433 +63313865653161313936313661336161666533636464623466343530376461383865306465653265 +31643566383336376662613139616164623263353837323935316634636334306237643331663437 +30363862666538323434316634613833366338316262663338656535376565353264 diff --git a/ansible/inventory b/ansible/inventory index 4bf52e7..31b6872 100644 --- a/ansible/inventory +++ b/ansible/inventory @@ -1 +1,7 @@ serenity ansible_host=92.243.8.85 ansible_user=adrien ansible_become_pass="{{ vault_adrien_serenity_password }}" + +[py3-hosts] +serenity + +[py3-hosts:vars] +ansible_python_interpreter=/usr/bin/python3 diff --git a/ansible/roles/build/tasks/main.yml b/ansible/roles/build/tasks/main.yml index 5200a4c..052bb53 100644 --- a/ansible/roles/build/tasks/main.yml +++ b/ansible/roles/build/tasks/main.yml @@ -4,6 +4,7 @@ include_tasks: wordpress.yml loop: "{{ sites }}" when: item.type == "wordpress" + tags: wordpress diff --git a/ansible/roles/deploy/tasks/main.yml b/ansible/roles/deploy/tasks/main.yml index 8aa3b4a..cb3463e 100644 --- a/ansible/roles/deploy/tasks/main.yml +++ b/ansible/roles/deploy/tasks/main.yml @@ -3,4 +3,5 @@ - name: Deploy Wordpress sites include_tasks: wordpress.yml loop: "{{ sites }}" - when: item.type == "wordpress" \ No newline at end of file + when: item.type == "wordpress" + tags: wordpress \ No newline at end of file