From 1aca409d6723452f10e56b26dccb3d9223f90251 Mon Sep 17 00:00:00 2001 From: Ivan Povalyaev Date: Thu, 8 Oct 2020 19:28:54 +0200 Subject: [PATCH 1/2] #27 initial script to install ansible --- server_install/ansible.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 server_install/ansible.sh diff --git a/server_install/ansible.sh b/server_install/ansible.sh new file mode 100644 index 0000000..3788eb4 --- /dev/null +++ b/server_install/ansible.sh @@ -0,0 +1,4 @@ +sudo apt update +sudo apt install software-properties-common +sudo apt-add-repository --yes --update ppa:ansible/ansible +sudo apt install -y ansible \ No newline at end of file From b5def37f850d12a504f04a2de21da45cef2fec83 Mon Sep 17 00:00:00 2001 From: Ivan Povalyaev Date: Thu, 8 Oct 2020 20:25:06 +0200 Subject: [PATCH 2/2] Added master script and readme --- server_install/README.md | 5 ++++ server_install/ansible_hosts | 48 ++++++++++++++++++++++++++++++++++ server_install/server_setup.sh | 2 ++ 3 files changed, 55 insertions(+) create mode 100644 server_install/README.md create mode 100644 server_install/ansible_hosts create mode 100644 server_install/server_setup.sh diff --git a/server_install/README.md b/server_install/README.md new file mode 100644 index 0000000..bb1da23 --- /dev/null +++ b/server_install/README.md @@ -0,0 +1,5 @@ +For initial server setup run +``` +git clone git@github.com:lacmus-foundation/lacmus-web-api.git +cd lacmus-web-api +sudo ./server_setup.sh \ No newline at end of file diff --git a/server_install/ansible_hosts b/server_install/ansible_hosts new file mode 100644 index 0000000..b4da62c --- /dev/null +++ b/server_install/ansible_hosts @@ -0,0 +1,48 @@ +# should be copied to /etc/ansible/hosts after install ansible + +# - Comments begin with the '#' character +# - Blank lines are ignored +# - Groups of hosts are delimited by [header] elements +# - You can enter hostnames or ip addresses +# - A hostname/ip can be a member of multiple groups + +# Ex 1: Ungrouped hosts, specify before any group headers. + +#green.example.com +#blue.example.com +#192.168.100.1 +#192.168.100.10 + +# Ex 2: A collection of hosts belonging to the 'webservers' group + +#[webservers] +#alpha.example.org +#beta.example.org +#192.168.1.100 +#192.168.1.110 + +# If you have multiple hosts following a pattern you can specify +# them like this: + +#www[001:006].example.com + +# Ex 3: A collection of database servers in the 'dbservers' group + +#[dbservers] +# +#db01.intranet.mydomain.net +#db02.intranet.mydomain.net +#10.25.1.56 +#10.25.1.57 + +# Here's another example of host ranges, this time there are no +# leading 0s: + +#db-[99:101]-node.example.com + + +[dev_servers] +127.0.0.1 + +[all:vars] +ansible_python_interpreter=/usr/bin/python3 diff --git a/server_install/server_setup.sh b/server_install/server_setup.sh new file mode 100644 index 0000000..d619c9f --- /dev/null +++ b/server_install/server_setup.sh @@ -0,0 +1,2 @@ +./ansible.sh +cp ansible_hosts /etc/ansible/hosts \ No newline at end of file