-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_config.yml
67 lines (53 loc) · 1.2 KB
/
server_config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
- hosts: all
become: true
tasks:
- name: install apache and php packages
tags: always
apt:
name:
- apache2
- libapache2-mod-php
state: latest
update_cache: yes
changed_when: false
when: ansible_distribution == "Ubuntu"
- hosts: all
become: true
tasks:
- name: adding public ssh key for kapex
tags: always
authorized_key:
user: kapex
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbKsQYoC2FmRispgEbTmeCO6Xp0eRkT79PEj2UdW5t7 Ansible 2022"
- hosts: workstations
become: true
tasks:
- name: install unzip
package:
name: unzip
- hosts: all
become: true
tasks:
- name: Create user kapex
tags: always
user:
name: kapex
groups: root
- name: install terraform
unarchive:
src: https://releases.hashicorp.com/terraform/0.12.28/terraform_0.12.28_linux_amd64.zip
dest: /usr/local/bin
remote_src: yes
mode: 0755
owner: root
group: root
- hosts: db_servers
become: true
tasks:
- name: install maria db on ubuntu
tags: db,mariadb,ubuntu
apt:
name: mariadb-server
state: latest
when: ansible_distribution == "Ubuntu"