summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2018-01-22 06:09:34 +0100
committerMatthieu Saulnier <fantom@fedoraproject.org>2018-01-22 06:09:34 +0100
commit83b454cd494515dd32595087fc90cce3ffc989d6 (patch)
tree6f63602a8df7bc5fc2ef0f647b5f09c5cdddbfba
parentafa44bc5e4c0486a476a7d5e01febc23ab24323f (diff)
downloadplaybooks-ansible-83b454cd494515dd32595087fc90cce3ffc989d6.zip
playbooks-ansible-83b454cd494515dd32595087fc90cce3ffc989d6.tar.gz
playbooks-ansible-83b454cd494515dd32595087fc90cce3ffc989d6.tar.xz
Add mock config by remi and fix rkhunter conf in clients role
-rw-r--r--roles/clients/files/mock_config-fc25x-by_remi.cfg135
-rw-r--r--roles/clients/files/mock_config-fc26x-by_remi.cfg140
-rw-r--r--roles/clients/files/mock_config-fc27x-by_remi.cfg140
-rw-r--r--roles/clients/tasks/main.yml6
-rw-r--r--roles/clients/tasks/mock.yml14
-rw-r--r--roles/clients/tasks/rkhunter.yml5
-rw-r--r--roles/clients/vars/main.yml4
7 files changed, 444 insertions, 0 deletions
diff --git a/roles/clients/files/mock_config-fc25x-by_remi.cfg b/roles/clients/files/mock_config-fc25x-by_remi.cfg
new file mode 100644
index 0000000..2fe63d5
--- /dev/null
+++ b/roles/clients/files/mock_config-fc25x-by_remi.cfg
@@ -0,0 +1,135 @@
+config_opts['root'] = 'fc25x'
+config_opts['target_arch'] = 'x86_64'
+config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
+config_opts['dist'] = 'fc25' # only useful for --resultdir variable subst
+config_opts['extra_chroot_dirs'] = [ '/run/lock/', ]
+config_opts['releasever'] = '25'
+config_opts['package_manager'] = 'dnf'
+
+config_opts['plugin_conf']['ccache_enable'] = True
+config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '1G'
+config_opts['plugin_conf']['ccache_opts']['dir'] = "/dev/shm/ccache.fc25x/"
+
+config_opts['basedir'] = '/dev/shm/'
+config_opts['resultdir'] = "/var/lib/mock/fc25x/"
+config_opts['cleanup_on_success'] = True
+config_opts['cleanup_on_failure'] = False
+
+config_opts['createrepo_on_rpms'] = True
+config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm'
+
+config_opts['macros']['%_topdir']="/builddir/build/"
+config_opts['macros']['%_smp_mflags']="-j8"
+config_opts['macros']['%vendor']="Remi Collet"
+config_opts['macros']['%packager']="https://blog.remirepo.net/"
+config_opts['macros']['%bugurl']="https://forum.remirepo.net/"
+config_opts['macros']['%dist']=".fc25.remi"
+config_opts['macros']['%fedora']="25"
+config_opts['macros']['%_with_ibase']="1"
+config_opts['macros']['%_with_oci8']="1"
+config_opts['macros']['%runselftest']="1"
+
+config_opts['environment']['ACCEPT_EULA'] = 'Y'
+
+config_opts['yum.conf'] = """
+[main]
+keepcache=1
+debuglevel=2
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+metadata_expire=80000
+fastestmirror=1
+max_parallel_downloads=6
+
+# repos
+
+[fedora]
+name=fedora
+##metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
+baseurl=http://mirror.casperlefantom.net:4435/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
+failovermethod=priority
+metadata_expire=800000
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-25&arch=x86_64
+#baseurl=http://fr2.rpmfind.net/linux/fedora/releases/25/Everything/x86_64/os/
+# http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/releases/25/Everything/x86_64/os/
+enabled=1
+
+[updates-released]
+name=updates
+##metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
+baseurl=http://mirror.casperlefantom.net:4435/pub/fedora/linux/updates/$releasever/$basearch/
+failovermethod=priority
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f25&arch=x86_64
+#baseurl=http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/updates/1/x86_64/
+# http://mirrors.ircam.fr/pub/fedora/linux/updates/25/x86_64/
+# http://fr2.rpmfind.net/linux/fedora/updates/25/x86_64/
+enabled=1
+
+[updates-testing]
+name=updates-testing
+metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch
+failovermethod=priority
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f25&arch=x86_64
+#baseurl=http://dl.fedoraproject.org/pub/fedora/linux/updates/testing/25/x86_64/
+enabled=0
+
+[remi]
+name=remi public
+baseurl=file:/home/rpmbuild/site/rpms/fedora/25/remi/x86_64/
+enabled=0
+metadata_expire=1
+
+[remi-priv]
+name=remi prive
+baseurl=file:/home/rpmbuild/site/rpms/priv/x86_64/
+enabled=0
+metadata_expire=1
+
+[remi-test]
+name=remi test
+baseurl=file:/home/rpmbuild/site/rpms/fedora/25/test/x86_64/
+enabled=0
+
+[remi-dev]
+name=remi dev
+baseurl=file:/home/rpmbuild/site/rpms/fedora/25/devs/x86_64/
+enabled=0
+
+[rpmfusion-free]
+name=rpmfusion-free
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-25&arch=x86_64
+enabled=0
+
+[rpmfusion-free-updates]
+name=rpmfusion-free
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-25&arch=x86_64
+enabled=0
+
+[rpmfusion-nonfree]
+name=rpmfusion-nonfree
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-25&arch=x86_64
+enabled=0
+
+[rpmfusion-nonfree-updates]
+name=rpmfusion-nonfree
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-25&arch=x86_64
+enabled=0
+
+[resultfc25x]
+name=resultfc25x
+baseurl=file:/var/lib/mock/fc25x/
+metadata_expire=1
+enabled=0
+
+[msprod]
+name=msprod
+baseurl=https://packages.microsoft.com/rhel/7/prod/
+enabled=1
+include=msodbc
+
+"""
+
diff --git a/roles/clients/files/mock_config-fc26x-by_remi.cfg b/roles/clients/files/mock_config-fc26x-by_remi.cfg
new file mode 100644
index 0000000..b7d496f
--- /dev/null
+++ b/roles/clients/files/mock_config-fc26x-by_remi.cfg
@@ -0,0 +1,140 @@
+config_opts['root'] = 'fc26x'
+config_opts['target_arch'] = 'x86_64'
+config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
+config_opts['dist'] = 'fc26' # only useful for --resultdir variable subst
+config_opts['extra_chroot_dirs'] = [ '/run/lock/', ]
+config_opts['releasever'] = '26'
+config_opts['package_manager'] = 'dnf'
+
+config_opts['plugin_conf']['ccache_enable'] = True
+config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '1G'
+config_opts['plugin_conf']['ccache_opts']['dir'] = "/dev/shm/ccache.fc26x/"
+
+config_opts['basedir'] = '/dev/shm/'
+config_opts['resultdir'] = "/var/lib/mock/fc26x/"
+config_opts['cleanup_on_success'] = True
+config_opts['cleanup_on_failure'] = False
+
+config_opts['createrepo_on_rpms'] = True
+config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm'
+
+config_opts['macros']['%_topdir']="/builddir/build/"
+config_opts['macros']['%_smp_mflags']="-j8"
+config_opts['macros']['%vendor']="Remi Collet"
+config_opts['macros']['%packager']="https://blog.remirepo.net/"
+config_opts['macros']['%bugurl']="https://forum.remirepo.net/"
+config_opts['macros']['%dist']=".fc26.remi"
+config_opts['macros']['%fedora']="26"
+config_opts['macros']['%_with_ibase']="1"
+config_opts['macros']['%_with_oci8']="1"
+config_opts['macros']['%runselftest']="1"
+
+config_opts['environment']['ACCEPT_EULA'] = 'Y'
+
+config_opts['yum.conf'] = """
+[main]
+keepcache=1
+debuglevel=2
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+syslog_ident=mock
+syslog_device=
+install_weak_deps=0
+metadata_expire=0
+metadata_expire=80000
+mdpolicy=group:primary
+best=1
+fastestmirror=1
+max_parallel_downloads=6
+
+# repos
+
+[fedora]
+name=fedora
+##metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
+baseurl=http://mirror.casperlefantom.net:4435/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
+failovermethod=priority
+metadata_expire=800000
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-26&arch=x86_64
+#baseurl=http://fr2.rpmfind.net/linux/fedora/releases/26/Everything/x86_64/os/
+# http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/releases/26/Everything/x86_64/os/
+enabled=1
+
+[updates-released]
+name=updates
+##metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
+baseurl=http://mirror.casperlefantom.net:4435/pub/fedora/linux/updates/$releasever/$basearch/
+failovermethod=priority
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f26&arch=x86_64
+#baseurl=http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/updates/1/x86_64/
+# http://mirrors.ircam.fr/pub/fedora/linux/updates/26/x86_64/
+# http://fr2.rpmfind.net/linux/fedora/updates/26/x86_64/
+enabled=1
+
+[updates-testing]
+name=updates-testing
+metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch
+failovermethod=priority
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f26&arch=x86_64
+#baseurl=http://dl.fedoraproject.org/pub/fedora/linux/updates/testing/26/x86_64/
+enabled=0
+
+[remi]
+name=remi public
+baseurl=file:/home/rpmbuild/site/rpms/fedora/26/remi/x86_64/
+enabled=0
+metadata_expire=1
+
+[remi-priv]
+name=remi prive
+baseurl=file:/home/rpmbuild/site/rpms/priv/x86_64/
+enabled=0
+metadata_expire=1
+
+[remi-test]
+name=remi test
+baseurl=file:/home/rpmbuild/site/rpms/fedora/26/test/x86_64/
+enabled=0
+
+[remi-dev]
+name=remi dev
+baseurl=file:/home/rpmbuild/site/rpms/fedora/26/devs/x86_64/
+enabled=0
+
+[rpmfusion-free]
+name=rpmfusion-free
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-26&arch=x86_64
+enabled=0
+
+[rpmfusion-free-updates]
+name=rpmfusion-free
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-26&arch=x86_64
+enabled=0
+
+[rpmfusion-nonfree]
+name=rpmfusion-nonfree
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-26&arch=x86_64
+enabled=0
+
+[rpmfusion-nonfree-updates]
+name=rpmfusion-nonfree
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-26&arch=x86_64
+enabled=0
+
+[resultfc26x]
+name=resultfc26x
+baseurl=file:/var/lib/mock/fc26x/
+metadata_expire=1
+enabled=0
+
+[msprod]
+name=msprod
+baseurl=https://packages.microsoft.com/rhel/7/prod/
+enabled=0
+includepkgs=msodbcsql
+
+"""
diff --git a/roles/clients/files/mock_config-fc27x-by_remi.cfg b/roles/clients/files/mock_config-fc27x-by_remi.cfg
new file mode 100644
index 0000000..06b1bd2
--- /dev/null
+++ b/roles/clients/files/mock_config-fc27x-by_remi.cfg
@@ -0,0 +1,140 @@
+config_opts['root'] = 'fc27x'
+config_opts['target_arch'] = 'x86_64'
+config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
+config_opts['dist'] = 'fc27' # only useful for --resultdir variable subst
+config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
+config_opts['releasever'] = '27'
+config_opts['package_manager'] = 'dnf'
+
+config_opts['plugin_conf']['ccache_enable'] = True
+config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '1G'
+config_opts['plugin_conf']['ccache_opts']['dir'] = "/dev/shm/ccache.fc27x/"
+
+config_opts['basedir'] = '/dev/shm/'
+config_opts['resultdir'] = "/var/lib/mock/fc27x"
+config_opts['cleanup_on_success'] = True
+config_opts['cleanup_on_failure'] = False
+
+config_opts['createrepo_on_rpms'] = True
+config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm'
+
+config_opts['macros']['%_topdir']="/builddir/build"
+config_opts['macros']['%_smp_mflags']="-j8"
+config_opts['macros']['%vendor']="Remi Collet"
+config_opts['macros']['%packager']="https://blog.remirepo.net/"
+config_opts['macros']['%bugurl']="https://forum.remirepo.net/"
+config_opts['macros']['%dist']=".fc27.remi"
+config_opts['macros']['%fedora']="27"
+config_opts['macros']['%_with_ibase']="1"
+config_opts['macros']['%_with_oci8']="1"
+config_opts['macros']['%runselftest']="1"
+
+config_opts['environment']['ACCEPT_EULA'] = 'Y'
+
+config_opts['yum.conf'] = """
+[main]
+keepcache=1
+debuglevel=2
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+syslog_ident=mock
+syslog_device=
+install_weak_deps=0
+metadata_expire=0
+metadata_expire=80000
+mdpolicy=group:primary
+best=1
+fastestmirror=1
+max_parallel_downloads=6
+
+# repos
+
+[fedora]
+name=fedora
+##metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
+baseurl=http://mirror.casperlefantom.net:4435/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
+failovermethod=priority
+metadata_expire=800000
+##mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-27&arch=x86_64
+#baseurl=http://fr2.rpmfind.net/linux/fedora/releases/27/Everything/x86_64/os/
+# http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/releases/27/Everything/x86_64/os/
+enabled=1
+
+[updates]
+name=updates
+##metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
+baseurl=http://mirror.casperlefantom.net:4435/pub/fedora/linux/updates/$releasever/$basearch/
+failovermethod=priority
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f27&arch=x86_64
+#baseurl=http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/updates/1/x86_64/
+# http://mirrors.ircam.fr/pub/fedora/linux/updates/27/x86_64/
+# http://fr2.rpmfind.net/linux/fedora/updates/27/x86_64/
+enabled=1
+
+[updates-testing]
+name=updates-testing
+metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch
+failovermethod=priority
+#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f27&arch=x86_64
+#baseurl=http://dl.fedoraproject.org/pub/fedora/linux/updates/testing/27/x86_64/
+enabled=0
+
+[remi]
+name=remi public
+baseurl=file:/home/rpmbuild/site/rpms/fedora/27/remi/x86_64/
+enabled=0
+metadata_expire=1
+
+[remi-priv]
+name=remi prive
+baseurl=file:/home/rpmbuild/site/rpms/priv/x86_64/
+enabled=0
+metadata_expire=1
+
+[remi-test]
+name=remi test
+baseurl=file:/home/rpmbuild/site/rpms/fedora/27/test/x86_64/
+enabled=0
+
+[remi-dev]
+name=remi dev
+baseurl=file:/home/rpmbuild/site/rpms/fedora/27/devs/x86_64/
+enabled=0
+
+[rpmfusion-free]
+name=rpmfusion-free
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-27&arch=x86_64
+enabled=0
+
+[rpmfusion-free-updates]
+name=rpmfusion-free
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-27&arch=x86_64
+enabled=0
+
+[rpmfusion-nonfree]
+name=rpmfusion-nonfree
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-27&arch=x86_64
+enabled=0
+
+[rpmfusion-nonfree-updates]
+name=rpmfusion-nonfree
+mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-27&arch=x86_64
+enabled=0
+
+[resultfc27x]
+name=resultfc27x
+baseurl=file:/var/lib/mock/fc27x/
+metadata_expire=1
+enabled=1
+
+[msprod]
+name=msprod
+baseurl=https://packages.microsoft.com/rhel/7/prod/
+enabled=0
+includepkgs=msodbcsql
+
+"""
diff --git a/roles/clients/tasks/main.yml b/roles/clients/tasks/main.yml
index 8417bf5..af38732 100644
--- a/roles/clients/tasks/main.yml
+++ b/roles/clients/tasks/main.yml
@@ -16,6 +16,12 @@
- name: Configuration sudo
include: sudo.yml
+- name: Configuration mock
+ include: mock.yml
+
+- name: Configuration rkhunter pour mock
+ include: rkhunter.yml
+
- name: Ajout points de montage
include: mnt.yml
diff --git a/roles/clients/tasks/mock.yml b/roles/clients/tasks/mock.yml
new file mode 100644
index 0000000..04190ca
--- /dev/null
+++ b/roles/clients/tasks/mock.yml
@@ -0,0 +1,14 @@
+- name: Ajout des fichiers de config mock
+ copy:
+ src: {{ item }}
+ dest: /etc/mock/{{ item }}
+ owner: root
+ group: mock
+ mode: 0644
+ with_items: "{{ mockconf }}"
+
+- name: Configuration par défaut
+ file:
+ src: /etc/mock/mock_config-fc{{ ansible_distribution_version }}x-by_remi.cfg
+ dest: /etc/mock/default.cfg
+ state: link
diff --git a/roles/clients/tasks/rkhunter.yml b/roles/clients/tasks/rkhunter.yml
new file mode 100644
index 0000000..14fbd72
--- /dev/null
+++ b/roles/clients/tasks/rkhunter.yml
@@ -0,0 +1,5 @@
+- name: Changement de mode rkhunter mode lazy
+ lineinfile:
+ path: /etc/rkhunter.conf
+ insertafter: '^#SCAN_MODE_DEV=THOROUGH'
+ line: 'SCAN_MODE_DEV=LAZY
diff --git a/roles/clients/vars/main.yml b/roles/clients/vars/main.yml
new file mode 100644
index 0000000..38c4794
--- /dev/null
+++ b/roles/clients/vars/main.yml
@@ -0,0 +1,4 @@
+mockconf:
+ - mock_config-fc25x-by_remi.cfg
+ - mock_config-fc26x-by_remi.cfg
+ - mock_config-fc27x-by_remi.cfg