summaryrefslogtreecommitdiffstats
path: root/roles/common
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2023-09-01 10:09:20 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2023-09-01 10:09:20 +0200
commit26165a03e8165078c83c2941311c59e9a05196a9 (patch)
tree4289a26d079a12898503ce21ee8b6d427ce5de07 /roles/common
parent1cf32a0909fe3acef39da625492bdc22a1f8e3b6 (diff)
downloadplaybooks-ansible-26165a03e8165078c83c2941311c59e9a05196a9.tar.gz
playbooks-ansible-26165a03e8165078c83c2941311c59e9a05196a9.tar.xz
playbooks-ansible-26165a03e8165078c83c2941311c59e9a05196a9.zip
Fix modes if file or directory are created
Diffstat (limited to 'roles/common')
-rw-r--r--roles/common/tasks/binutils.yml1
-rw-r--r--roles/common/tasks/dnf.yml6
-rw-r--r--roles/common/tasks/repos.yml4
-rw-r--r--roles/common/tasks/systemd.yml4
-rw-r--r--roles/common/tasks/yum.yml6
5 files changed, 20 insertions, 1 deletions
diff --git a/roles/common/tasks/binutils.yml b/roles/common/tasks/binutils.yml
index 5bbe60b..18b9998 100644
--- a/roles/common/tasks/binutils.yml
+++ b/roles/common/tasks/binutils.yml
@@ -1,6 +1,7 @@
- name: Création des répertoires
file:
path: "{{ item }}"
+ mode: 0755
state: directory
loop:
- /root/bin/
diff --git a/roles/common/tasks/dnf.yml b/roles/common/tasks/dnf.yml
index 41afe00..c6b323a 100644
--- a/roles/common/tasks/dnf.yml
+++ b/roles/common/tasks/dnf.yml
@@ -1,6 +1,7 @@
- name: Affichage historique
ini_file:
path: /etc/dnf/dnf.conf
+ mode: 0644
section: main
option: history_list_view
value: cmds
@@ -9,6 +10,7 @@
- name: Clean requirements on remove
ini_file:
path: /etc/dnf/dnf.conf
+ mode: 0644
section: main
option: clean_requirements_on_remove
value: "true"
@@ -17,6 +19,7 @@
- name: Désactivation delta rpm
ini_file:
path: /etc/dnf/dnf.conf
+ mode: 0644
section: main
option: deltarpm
value: "false"
@@ -25,6 +28,7 @@
- name: Nombre mini de noyaux installés
ini_file:
path: /etc/dnf/dnf.conf
+ mode: 0644
section: main
option: installonly_limit
value: "{{ minkernel }}"
@@ -34,6 +38,7 @@
- name: Nombre maxi de noyaux installés
ini_file:
path: /etc/dnf/dnf.conf
+ mode: 0644
section: main
option: installonly_limit
value: "{{ maxkernel }}"
@@ -43,6 +48,7 @@
- name: Création du répertoire pour unité systemd
file:
path: /etc/systemd/system/dnf-makecache.timer.d
+ mode: 0755
state: directory
- name: Réglage de dnf-makecache.timer
diff --git a/roles/common/tasks/repos.yml b/roles/common/tasks/repos.yml
index 7e7b3c5..6b8f284 100644
--- a/roles/common/tasks/repos.yml
+++ b/roles/common/tasks/repos.yml
@@ -25,6 +25,7 @@
- name: Désactivation du dépôt Updates
ini_file:
path: /etc/yum.repos.d/fedora-updates.repo
+ mode: 0644
section: updates
option: enabled
value: "0"
@@ -37,6 +38,7 @@
- name: Activation du dépôt Updates
ini_file:
path: /etc/yum.repos.d/fedora-updates.repo
+ mode: 0644
section: updates
option: enabled
value: "1"
@@ -75,6 +77,7 @@
- name: Désactivation du dépôt Fedora
ini_file:
path: /etc/yum.repos.d/fedora.repo
+ mode: 0644
section: fedora
option: enabled
value: "0"
@@ -87,6 +90,7 @@
- name: Activation du dépôt Fedora
ini_file:
path: /etc/yum.repos.d/fedora.repo
+ mode: 0644
section: fedora
option: enabled
value: "1"
diff --git a/roles/common/tasks/systemd.yml b/roles/common/tasks/systemd.yml
index 88ac111..b324304 100644
--- a/roles/common/tasks/systemd.yml
+++ b/roles/common/tasks/systemd.yml
@@ -1,6 +1,7 @@
- name: Configuration systemd écran rabattu
ini_file:
path: /etc/systemd/logind.conf
+ mode: 0644
section: Login
option: HandleLidSwitch
value: ignore
@@ -9,6 +10,7 @@
- name: Configuration systemd écran éteint
ini_file:
path: /etc/systemd/logind.conf
+ mode: 0644
section: Login
option: HandleLidSwitchExternalPower
value: ignore
@@ -26,6 +28,7 @@
- name: Configuration systemd hibernation
ini_file:
path: /etc/systemd/logind.conf
+ mode: 0644
section: Login
option: HandleHibernateKey
value: ignore
@@ -34,6 +37,7 @@
- name: Configuration systemd HibernateKeyIgnoreInhibited
ini_file:
path: /etc/systemd/logind.conf
+ mode: 0644
section: Login
option: HibernateKeyIgnoreInhibited
value: yes
diff --git a/roles/common/tasks/yum.yml b/roles/common/tasks/yum.yml
index 7949002..ad5b200 100644
--- a/roles/common/tasks/yum.yml
+++ b/roles/common/tasks/yum.yml
@@ -1,6 +1,7 @@
- name: Affichage historique
ini_file:
path: /etc/yum.conf
+ mode: 0644
section: main
option: history_list_view
value: cmds
@@ -9,6 +10,7 @@
- name: Clean requirements on remove
ini_file:
path: /etc/yum.conf
+ mode: 0644
section: main
option: clean_requirements_on_remove
value: "1"
@@ -17,6 +19,7 @@
- name: Désactivation delta rpm
ini_file:
path: /etc/yum.conf
+ mode: 0644
section: main
option: deltarpm
value: "0"
@@ -25,6 +28,7 @@
- name: Nombre mini de noyaux installés
ini_file:
path: /etc/yum.conf
+ mode: 0644
section: main
option: installonly_limit
value: "{{ minkernel }}"
@@ -34,9 +38,9 @@
- name: Nombre maxi de noyaux installés
ini_file:
path: /etc/yum.conf
+ mode: 0644
section: main
option: installonly_limit
value: "{{ maxkernel }}"
- mode: 0644
when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
and ansible_pkg_mgr == "yum"