nettoyage du code

This commit is contained in:
Yacine31
2021-06-20 21:04:22 +02:00
parent 0b94cf60b7
commit 92411123b4
7 changed files with 2 additions and 135 deletions

View File

@@ -1,26 +0,0 @@
ansible sur le poste à configurer
s'inspirer de l'exemple screen !
===
yum install -y wget bzip2
wget https://github.com/ownport/portable-ansible/releases/download/v0.4.2/portable-ansible-v0.4.2-py2.tar.bz2
tar xvfj portable-ansible-v0.4.2-py2.tar.bz2
ln -s ansible ansible-playbook
creer un fichier hosts.oracle avec le contenu suivant
[local]
localhost ansible_connection=local
scp mes playbooks dans /root
merlin@Dell-E7440:~/scripts/configure_oracle $ scp -r * root@192.168.1.241:/root
ou rsync :
merlin@Dell-E7440:~/scripts/configure_oracle $ rsync -av * root@192.168.1.241:/root
python ansible-playbook book-config-oel-6-7.yml -i hosts.oracle

View File

@@ -1,38 +0,0 @@
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).

View File

@@ -34,6 +34,3 @@
shell: grubby --grub2 --remove-args=quiet --update-kernel=ALL
tags: quiet
- name: Configuration du mode 3 comme mode de démarrage par défaut
replace: dest=/etc/inittab regexp='id:5:initdefault:' replace='id:3:initdefault:'

View File

@@ -1,11 +1,8 @@
---
#------------------------------------------------------------------------------------
# configuration Linux : Paramètres du kernel
# pour Linux 7, on utilise un fichier de conf séparé /etc/sysctl.d/98-oracle.conf
# au lieu du fichier par défaut /etc/sysctl.conf
#------------------------------------------------------------------------------------
- name: Ajustement des paramètres du Kernel
# sysctl: name={{ item.name }} value="{{ item.value }}" state=present reload=yes ignoreerrors=yes sysctl_file=/etc/sysctl.d/98-oracle.conf
sysctl: name={{ item.name }} value="{{ item.value }}" state=present reload=yes ignoreerrors=yes sysctl_file=/etc/sysctl.conf
with_items:
- { name: kernel.shmall, value: "{{ ((0.4 * ansible_memtotal_mb)*1024*1024)|round|int }}" }

View File

@@ -40,7 +40,7 @@
# configuration Linux : aliases bash & oracle
# ---------------------------------------------------
- name: Ajout du fichier bash_aliases dans /etc/profile.d
copy: src=bash_aliases dest=/etc/profile.d/bash_aliases.sh owner=root mode=644
copy: src=bash_aliases dest=/etc/profile.d/z_bash_aliases.sh owner=root mode=644
# ---------------------------------------------------
# configuration Linux : personnalisation rlwrap
@@ -75,7 +75,6 @@
- libaio-devel
- libaio-devel*i686
- libgcc
# - libgcc*i686
- libstdc++
- libstdc++*i686
- libstdc++-devel
@@ -111,7 +110,7 @@
# Securisation de cron
# ---------------------------------------------------
- name: Desactivation de la commande crontab -r
lineinfile: dest=/etc/profile.d/you.sh
lineinfile: dest=/etc/profile.d/z_crontab_r.sh
line='crontab () { [[ $@ =~ -[iel]*r ]] && echo "option -r (remove) not allowed" || command crontab "$@" ;}'
state=present
create=yes

View File

@@ -1,12 +0,0 @@
---------------------------------------
Welcome to {{ ansible_fqdn }}
{{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_userspace_architecture }}
FQDN: {{ ansible_fqdn }}
IP: {{ ansible_default_ipv4.address }}
#cpu's: {{ ansible_processor_vcpus }}
mem: {{ ansible_memtotal_mb }} MB
Kernel: {{ ansible_kernel }}
---------------------------------------

View File

@@ -1,50 +0,0 @@
#!/usr/bin/expect -f
spawn service oracleasm configure
{% if role_separation==True %}
expect {
"Default user to own the driver interface*:"
{
send "{{ grid_install_user }}\r"
exp_continue
}
"Default group to own the driver interface*:"
{
send "{{ asmdba_group }}\r"
exp_continue
}
"Start Oracle ASM library driver on boot*:"
{
send "y\r"
exp_continue
}
"Scan for Oracle ASM disks on boot*:"
{
send "y\r"
exp_continue
}
}
{% else %}
expect {
"Default user to own the driver interface*:"
{
send "{{ oracle_user }}\r"
exp_continue
}
"Default group to own the driver interface*:"
{
send "{{ dba_group }}\r"
exp_continue
}
"Start Oracle ASM library driver on boot*:"
{
send "y\r"
exp_continue
}
"Scan for Oracle ASM disks on boot*:"
{
send "y\r"
exp_continue
}
}
{% endif %}