Page MenuIniciProjectes

Ansible
Actualitzat 1,436 Day(s) AgoPúblic

Version 8 of 20: You are viewing an older version of this document, as it appeared on Oct 22 2018, 22:51.

First Install Ansible and clone the playbooks

Set up a new server with Ansible

Let's say this is your new server:

  • FQDN: cc-233.commonscloud.coop
  • Public IP: 12.12.12.12
  • SSH port: 22344 We don't use port 22. It just helps keep the logs a bit cleaner.

The username you use on all servers is: alice

Add the info to the ansible hosts file. Edit ~/CommonsCloud/ansible/hosts

all:
  vars:
    ansible_user: alice
    ansible_port: 22344

  hosts:
    cc-233.commonscloud.coop: 
      ansilbe_host: 12.12.12.12

export SERVERNAME="cc-233.commonscloud.coop"

Open a terminal on your PC

export SERVERNAME="cc-233.commonscloud.coop"

Create the first user

At the moment 'root' is the only user. Here we create a user 'alice' (this should be your own personal default user account on the server) with password 'hello' and sudo permission

cd users
ansible-playbook createuser.yml -i ${SERVERNAME}, -e "hostname=${SERVERNAME}" --extra-vars "ansible_port=22 ansible_ssh_user=root user=alice password=hello"

Now login with the new user account and change password

Run basic server config

cd base
ansible-playbook webarch.yml -e "hostname=${SERVERNAME} ansible_port=22" -K

Now check if you can login on port ansible_port

Install firewall

cd firewall
ansible-playbook basicfirewall.yml -e "hostname=${SERVERNAME}" -K

Install postfix

cd sendmail
ansible-playbook postfix.yml -e "hostname=${SERVERNAME}" -K

Run mutt on the server and send an email

Install LDAP consumer

cd ldap
ansible-playbook consumer.yml -e "hostname=${SERVERNAME}" -K

Install Zabbix agent

cd zabbix
ansible-playbook agentyml -e "hostname=${SERVERNAME}" -K
Últim autor
chris
Last Edited
Oct 22 2018, 22:51

Jerarquia del document

Event Timeline

chris ha editat el contingut d'aquest document. (Show Details)
chris ha editat el contingut d'aquest document. (Show Details)
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 19:08
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 19:10
chris ha editat el contingut d'aquest document. (Show Details)
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 22:28
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 22:51
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 23:07
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 23:11
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 23:19
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 23:39
chris ha editat el contingut d'aquest document. (Show Details)Oct 22 2018, 23:41
chris ha canviat el títol de Ansible a Deploy with Ansible.Oct 23 2018, 00:10
chris ha canviat el títol de Deploy with Ansible a Deploy servers with Ansible.
chris ha editat el contingut d'aquest document. (Show Details)
chris ha editat el contingut d'aquest document. (Show Details)Oct 23 2018, 00:32
chris changed the visibility from "All Users" to "Public (No Login Required)".Dec 5 2018, 11:30
chris ha editat el contingut d'aquest document. (Show Details)Dec 5 2018, 12:40
joseplluisat ha canviat el títol de Deploy servers with Ansible a 1 - Deploy new servers with Ansible.Nov 26 2019, 18:01
joseplluisat ha editat el contingut d'aquest document. (Show Details)