From 961059da18ff6dbaa40fa9738159cfbca5174e9a Mon Sep 17 00:00:00 2001 From: Yuri Lima Date: Sun, 20 Aug 2023 02:17:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20DOC:=20Added=20Ansible=20Config?= =?UTF-8?q?=20File=20+=20Added=20Ansible=20Commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++++++++++++ ansible.cfg | 3 +++ inventory | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ansible.cfg diff --git a/README.md b/README.md index e69de29..e7bf0b8 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,14 @@ +# Run Ansible Playbook Test +- ansible all --key-file ~/.ssh/ansible -i inventory -m ping + +# Run Ansible Playbook Once we have the .cfg Created +- ansible all -m ping + +# Show our Servers List +- ansible all --list-hosts + +# Shows all Data from the servers +- ansible all -m setup +- ansible all -m setup -a 'filter=ansible_distribution*' +- ansible all -m gather_facts +- ansible all -m gather_facts --limit root@49.13.21.211 \ No newline at end of file diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..01658a1 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] +inventory = inventory +private_key_file = ~/.ssh/ansible diff --git a/inventory b/inventory index de1e6b3..1cd6baf 100644 --- a/inventory +++ b/inventory @@ -1,2 +1,2 @@ -server.yurilima.uk +root@49.13.21.211