Commit cdfe9ac7 by remulo.carvalho

new version

parent 08c73384
This source diff could not be displayed because it is too large. You can view the blob instead.
{"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname p-siaud01.pgj.rj.gov.br: Name or service not known\r\n", "unreachable": true}
\ No newline at end of file
c-applb03.pgj.rj.gov.br
c-eap01.pgj.rj.gov.br
c-applb02.pgj.rj.gov.br
p-siaud01.pgj.rj.gov.br
---
- hosts: all
gather_facts: yes
become_user: root
tasks:
- name: Limpa as configurações de proxy do yum.conf
lineinfile:
dest: /etc/yum.conf
regexp: 'proxy'
state: absent
- name: Setar o proxy no yum.conf para a DMZ
when: (ansible_distribution == "CentOS" and ansible_default_ipv4.address | match("172.27."))
lineinfile:
dest: /etc/yum.conf
line: proxy=http://172.27.0.170:3128
state: present
- name: Setar o proxy no yum.conf para a Rede Interna
when: (ansible_distribution == "CentOS" and ansible_default_ipv4.address | match("10.0."))
lineinfile:
dest: /etc/yum.conf
line: proxy=http://proxy.pgj.rj.gov.br:3128
state: present
- name: Update packages Centos 6 e 7
when: (ansible_distribution == "CentOS")
#when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
yum: name=tzdata-*,ntp state=latest
- name: Update packages on Ubuntu
when: (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '14')
apt:
name: {{ packages }}
vars:
packages:
- ntp
- ntpdate
- tzdata
- tzdata-java
state: latest
update_cache: yes
- name: Atualiza o Tzdata do RedHat 6x via yum local.
when: (ansible_distribution == "RedHat" and ansible_distribution_major_version == "6")
yum:
disablerepo: "*"
name:
- http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/rsync-3.0.6-12.el6.x86_64.rpm
- http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/tzdata-2019c-1.el6.noarch.rpm
- http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/tzdata-java-2019c-1.el6.noarch.rpm
state: present
- name: Atualiza o tzdata do RedHat 7.x via yum local.
when: (ansible_distribution == "RedHat" and ansible_distribution_major_version == "7")
yum:
disablerepo: "*"
name:
- http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/rsync-3.0.6-12.el6.x86_64.rpm
- http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/tzdata-2019c-1.el7.noarch.rpm
- http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/tzdata-java-2019c-1.el7.noarch.rpm
state: present
- name: Update Tzdata JVM
when: (ansible_distribution == "RedHat")
#shell: sudo /usr/bin/java -jar /home/svcansible/tzupdate/tzupdater.jar -l file:///home/svcansible/tzupdate/tzdata-latest.tar.gz -v -u
shell: cd /tmp/; wget http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/tzupdater.jar; wget http://p-oc-ansible01.pgj.rj.gov.br:81/tzupdate/tzdata-latest.tar.gz; sudo /usr/bin/java -jar /tmp/tzupdater.jar -l file:///tmp/tzdata-latest.tar.gz -v -u; rm -rf tzdata*; rm -rf tzupdater.*
ignore_errors: yes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment