simplification vars

This commit is contained in:
Yacine31
2021-06-20 16:11:43 +02:00
parent aa091143b3
commit 24c4eba902
9 changed files with 152 additions and 590 deletions

View File

@@ -1,9 +1,9 @@
---
# - name: Vérification de la distribution, la version et le kernel
# assert:
# that: ansible_distribution_major_version == '7' and ansible_os_family == 'RedHat' and ansible_kernel >= '3.8.13'
# tags: oscheck
- name: Vérification de la distribution, la version et le kernel
assert:
that: ansible_distribution_major_version >= '7' and ansible_os_family == 'RedHat' and ansible_kernel >= '3.8.13'
tags: oscheck
# ---------------------------------------------------
# configuration des packages necessaires pour Linux

View File

@@ -5,18 +5,10 @@
- name: Installation du packet libselinux-python
yum: name="libselinux-python" state=installed
# - name: Installation du RPM EPEL Repo pour Linux 7
# yum: name="{{ epel_rpm }}" state=installed
# tags: epelrepo
# - name: Copie du fichier repository public-yum si absent
# copy: src=public-yum-ol7.repo dest=/etc/yum.repos.d/public-yum-ol7.repo
# tags: publicyumrepo
- name: Installation des packages communs pour Linux
yum: name={{ item }} state=installed
tags: commonpackages
with_items:
yum: name={{ linux_packages }} state=installed
tags: linux_packages
loop:
- bind-utils
- xdpyinfo
- xauth
@@ -29,8 +21,6 @@
- unzip
- wget
- vim
# - htop
# - rlwrap
- lvm2
- nc
- ncurses
@@ -78,7 +68,7 @@
service: name={{ item }} state=stopped enabled=no
tags: linuxservices
ignore_errors: true
with_items:
loop:
- bluetooth
- cups
- gpm

View File

@@ -19,12 +19,14 @@
- name: Creation du compte Oracle
user: name={{ item.username }} group={{ item.primgroup }} groups={{ item.othergroups }} uid={{ item.uid }} generate_ssh_key=yes append=yes state=present password={{ item.passwd }}
ignore_errors: true
with_items:
- { username: oracle, uid: 1001, primgroup: oinstall, othergroups: "dba,asmdba,backupdba,dgdba,kmdba,oper", passwd: "$6$0xHoAXXF$K75HKb64Hcb/CEcr3YEj2LGERi/U2moJgsCK.ztGxLsKoaXc4UBiNZPL0hlxB5ng6GL.gyipfQOOXplzcdgvD0" }
- { username: grid, uid: 1000, primgroup: oinstall, othergroups: "asmadmin,asmdba,asmoper,dba", passwd: "$6$0xHoAXXF$K75HKb64Hcb/CEcr3YEj2LGERi/U2moJgsCK.ztGxLsKoaXc4UBiNZPL0hlxB5ng6GL.gyipfQOOXplzcdgvD0" }
tags: user
tags: create_users
- name: Ajout du compte oracle et grid au sudoers
ignore_errors: true
template: src=sudoers.j2 dest=/etc/sudoers.d/{{ item }} owner=root mode=0600
with_items:
- oracle