From 9799d9c39c90ec37b83124e84691f0e334195909 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 10 Oct 2022 23:35:44 +0200 Subject: [PATCH] add vault for nas server --- inventory/group_vars/nas | 0 inventory/group_vars/nas_vault | 6 ++++++ inventory/hosts | 7 +++++++ playbook.yml | 5 +++++ registry/tasks/main.yml | 2 +- 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 inventory/group_vars/nas create mode 100644 inventory/group_vars/nas_vault diff --git a/inventory/group_vars/nas b/inventory/group_vars/nas new file mode 100644 index 0000000..e69de29 diff --git a/inventory/group_vars/nas_vault b/inventory/group_vars/nas_vault new file mode 100644 index 0000000..c65113f --- /dev/null +++ b/inventory/group_vars/nas_vault @@ -0,0 +1,6 @@ +$ANSIBLE_VAULT;1.1;AES256 +35333863396561393462653263323133343233346534616138616530643066323161656534653738 +3335306466663636623236383435663337393466633437660a303961663331653463343933353966 +35636161393663386137306561613965653438626432323865323233636662653333616532636665 +3562333936366238640a646262373233363665366437653032303238313266356138343239303936 +36663531303061663763653637333365303664666563353631303435633462343537 diff --git a/inventory/hosts b/inventory/hosts index ee816ef..3defa7f 100644 --- a/inventory/hosts +++ b/inventory/hosts @@ -1,4 +1,5 @@ vps ansible_connection=ssh ansible_host=51.222.107.37 ansible_port=2424 ansible_user=valentin +valentin-nas ansible_connection=ssh ansible_host=151.80.37.38 ansible_port=2424 ansible_user=valentin localhost ansible_host=127.0.0.1 [db] @@ -7,6 +8,12 @@ vps [db_vault:children] db +[nas] +valentin-nas + +[nas_vault:children] +nas + [local] localhost diff --git a/playbook.yml b/playbook.yml index 503b9de..00917df 100644 --- a/playbook.yml +++ b/playbook.yml @@ -1,4 +1,9 @@ --- +- hosts: nas + remote_user: valentin + roles: + - registry + - hosts: db remote_user: valentin roles: diff --git a/registry/tasks/main.yml b/registry/tasks/main.yml index ed57ada..62f1ed3 100644 --- a/registry/tasks/main.yml +++ b/registry/tasks/main.yml @@ -7,7 +7,7 @@ - name: Deploy registry ansible.builtin.import_tasks: deploy-registry.yml - tags: ["create-registry", "deploy-regsitry"] + tags: ["create-registry", "deploy-registry"] - name: Start registry ansible.builtin.import_tasks: start-registry.yml