-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathveeam.yaml
90 lines (78 loc) · 2.35 KB
/
veeam.yaml
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
---
- hosts: all
user: charles.a
connection: ssh
become_user: root
become: yes
become_method: sudo
#connection: paramiko
gather_facts: yes
vars:
ansible_sudo_flags: '-H'
tasks:
- name: Instalando pacotes do Centos/RedHat/OracleLinux
when: (ansible_distribution == 'Red Hat Enterprise Linux') or
(ansible_distribution == 'RedHat') or
(ansible_distribution == 'CentOS') or
(ansible_distribution == 'OracleLinux')
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes"
with_items:
- "@Development tools"
- perl
- perl-Data-Dumper
- perl-CPAN
tags: instalar
- name: Instalando pacotes para o Debian
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes"
with_items:
- liblwp-protocol-https-perl
- sysstat
- sharutils
- build-essential
tags: instalar
- name: Download do modulo do ansible para PERL
get_url: url=http://cpanmin.us/
dest=/tmp/cpanm.pl
tags: instalar
- name: Instalado o Modulo do ansible para PERL
command: perl cpanm.pl App::cpanminus
args:
chdir: /tmp/
creates: /usr/local/bin/cpanm
tags: instalar
- name: Ajustando link simbolicos
file: src=/usr/local/bin/cpanm
dest=/usr/bin/cpanm
state=link
ignore_errors: yes
tags: instalar
- name: Ajusta configuracao interativa do PERL
shell: echo y | perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->edit(connect_to_internet_ok => 1 ); $c->commit'
register: install_cpanm
changed_when: "'is up to date' not in install_cpanm.stdout"
tags: instalar
- name: Instala pacotes veeam
cpanm: name={{ item }}
with_items:
- constant
- Carp
- Cwd
- Data::Dumper
- Encode
- Encode::Alias
- Encode::Config
- Encode::Encoding
- Encode::MIME::Name
- Exporter
- Exporter::Heavy
- File::Path
- File::Spec
- File::Spec::Unix
- File::Temp
- List::Util
- Scalar::Util
- Socket
- Storable
- threads
tags: instalar