-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathctic.yml
135 lines (128 loc) · 3.38 KB
/
ctic.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
- name: Computadores da CTIC
hosts: ctic
vars:
ansible_python_interpreter: /usr/bin/python3
gather_facts: true
roles:
- code
- docker
# - teamviewer
# - virtualbox
# - rambox
# - ingressa_ldap
# - rke
tasks:
# - name: Instalar os pacotes para o Ansible #do buster-backports - Linux Debian
# apt: name=ansible state=latest #default_release=buster-backports
- name: Pacotes padroes da CTIC
ansible.builtin.apt:
pkg:
- ipcalc
- ansible
- keepassx
- git
- gparted
- vinagre
- tcpdump
- dnsutils
- python3-pip
- name: Instala pacotes pip
ansible.builtin.pip:
name:
- pywinrm
- paramiko
- cryptography
executable: pip3
- name: Adiciona no grupo docker
ansible.builtin.user:
name: "{{ item }}"
groups: docker
append: true
with_items:
- rmartins
- humbertos
- marcelo.alejandro
- davi.iahn
- davi.m12
when: ansible_os_family == 'Debian'
################## Maquina do RICARDO ##################
# Não executar o Mestre.yml, executar apenas o ctic.yml #
- hosts: sje-lin-ctic-38319.maquinas.sj.ifsc.edu.br
#any_errors_fatal: true
roles:
- kubernetes
- ingressa_ldap_gdm
- teams_microsoft
# - softwares_remotos # ruim no buster
- role: geerlingguy.nfs
nfs_exports: [ "/dados *(rw,sync,no_root_squash)" ]
# - role: bertvv.samba
# samba_shares:
# - name: ctic
# comment: 'O local mais seguro de todos'
# path: /dados
# browseable: yes
# create_mode: '777'
# directory_mode: '777'
# valid_users: '%S'
# writable: yes
# read_only: no
# guest_ok: yes
# samba_users:
# - name: USERNAME
# password: PASSWORD
tasks:
- name: Pacotes do Ricardo
ansible.builtin.apt:
state: latest
pkg:
- k3b
- keychain
- dcfldd
- lm-sensors
# - nautilus-dropbox # ruim no buster
- unzip
- vlan
- python3-tk
- python3-setuptools
# - gir1.2-appindicator3-0.1 # Não é mais necessário
# - python-appindicator # ruim no buster
- vinagre
- virtualenv
- konsole
- nfs-common
- curl
- ethtool
- samba
- usbutils
- sshfs
- net-tools
- name: Configuração do Ansible
ansible.builtin.copy:
content: |
[defaults]
forks = 50
gathering = implicit
host_key_checking = False
remote_user = root
vault_password_file = /home/rmartins/.ssh/v
owner: rmartins
group: rmartins
mode: '0644'
dest: /home/rmartins/.ansible.cfg
- name: Configuração do ssh
ansible.builtin.lineinfile:
path: /etc/ssh/ssh_config
insertafter: "^# StrictHostKeyChecking ask"
firstmatch: true
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
loop:
- { regexp: "StrictHostKeyChecking ask", line: "StrictHostKeyChecking no"}
- { regexp: "# UserKnownHostsFile ~/.ssh/known_hosts.d/%k", line: "UserKnownHostsFile=/dev/null"}
##########################################################
# Windows Ricardo
- hosts: sj-ctic-38319.maquinas.sj.ifsc.edu.br
roles:
- ingressa_ldap