[ansible] Add myhostname for better handling of cloud provider
by Nicolas Chauvet
commit 4a49d90ab5ac78a28902dece806a8a47a2c5bfff
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 15:01:19 2016 +0100
Add myhostname for better handling of cloud provider
roles/fas_client/files/nsswitch.conf | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/roles/fas_client/files/nsswitch.conf b/roles/fas_client/files/nsswitch.conf
index fb4ff62..8da4a65 100644
--- a/roles/fas_client/files/nsswitch.conf
+++ b/roles/fas_client/files/nsswitch.conf
@@ -26,7 +26,7 @@ shadow: db files
group: db files
#hosts: db files nisplus nis dns
-hosts: files dns
+hosts: files dns myhostname
bootparams: nisplus [NOTFOUND=return] files
8 years, 1 month
[ansible] Update copy ifcfg files
by Nicolas Chauvet
commit d49703239499ef8c952c1738b35fd08f35ff92cf
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 14:47:54 2016 +0100
Update copy ifcfg files
roles/base/tasks/main.yml | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml
index 9f851e9..c32728b 100644
--- a/roles/base/tasks/main.yml
+++ b/roles/base/tasks/main.yml
@@ -57,14 +57,14 @@
- base
- name: copy ifcfg files - non virthost
- template: src=ifcfg.j2 dest=/etc/sysconfig/network-scripts/ifcfg-{{item}} mode=644
+ template: src=ifcfg.j2 dest=/etc/sysconfig/network-scripts/ifcfg-{{item}} mode=0644
with_items:
- "{{ ansible_interfaces }}"
notify:
-# - restart NetworkManager
+# - restart NetworkManager
- reload NetworkManager-connections
- apply interface-changes
- when: (virthost is not defined) and (not item.startswith('tun')) and (not item.startswith('virbr')) and (not item.startswith('vnet')) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest|success and ( not ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in ansible_ifcfg_whitelist )
+ when: (virthost is not defined) and (item.startswith(('eth','br'))) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest|success and ( not ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in ansible_ifcfg_whitelist )
tags:
- config
- ifcfg
8 years, 1 month
[ansible] Add moin group_vars
by Nicolas Chauvet
commit b620d3eb57dba90ca0e18169eb55c4ec26617f6a
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 14:34:08 2016 +0100
Add moin group_vars
inventory/group_vars/moin | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/inventory/group_vars/moin b/inventory/group_vars/moin
new file mode 100644
index 0000000..cd81cee
--- /dev/null
+++ b/inventory/group_vars/moin
@@ -0,0 +1,10 @@
+---
+# Define resources for this group of hosts here.
+lvm_size: 20000
+mem_size: 1024
+num_cpus: 1
+
+tcp_ports: [ 80 ]
+
+fas_client_groups: sysadmin-web
+
8 years, 1 month
[ansible] Add moin
by Nicolas Chauvet
commit ce77fde7dba2c340ee395254b42713c5da09aeed
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 13:16:52 2016 +0100
Add moin
inventory/inventory | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/inventory/inventory b/inventory/inventory
index 92bc963..8b51de2 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -37,6 +37,10 @@ db02.online.rpmfusion.net
[mailman-stg]
test01.scaleway.rpmfusion.net
+[moin]
+se01.online.rpmfusion.net
+test01.scaleway.rpmfusion.net
+
[pkgdb]
pkgdb02.online.rpmfusion.net
8 years, 1 month
[ansible] Add mailman
by Nicolas Chauvet
commit 919de5578f6c1be2b2321bf9216d7146c9fecaab
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 13:16:06 2016 +0100
Add mailman
inventory/inventory | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/inventory/inventory b/inventory/inventory
index fac67b9..92bc963 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -25,6 +25,18 @@ ipsilon01.online.rpmfusion.net
[koji]
koji01.online.rpmfusion.net
+[mailman]
+se01.online.rpmfusion.net
+
+[mailman-stg]
+test01.scaleway.rpmfusion.net
+
+[mailman-db]
+db02.online.rpmfusion.net
+
+[mailman-stg]
+test01.scaleway.rpmfusion.net
+
[pkgdb]
pkgdb02.online.rpmfusion.net
8 years, 1 month
[ansible] Add dns
by Nicolas Chauvet
commit f3d10c85a9e2f41f5e1d575281c833521d52fb28
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 13:15:53 2016 +0100
Add dns
inventory/inventory | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/inventory/inventory b/inventory/inventory
index e64130c..fac67b9 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -13,6 +13,9 @@ bugzilla02.online.rpmfusion.net
[dbserver]
db02.online.rpmfusion.net
+[dns]
+se01.online.rpmfusion.net
+
[fas]
fas01.online.rpmfusion.net
8 years, 1 month
[ansible] Update mailman playbook
by Nicolas Chauvet
commit 9c5c7dbb5343c95be82fd8ffba104f1f410dc44f
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Nov 23 21:02:37 2016 +0100
Update mailman playbook
playbooks/groups/mailman.yml | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/playbooks/groups/mailman.yml b/playbooks/groups/mailman.yml
index 46a1cc8..28ed2c2 100644
--- a/playbooks/groups/mailman.yml
+++ b/playbooks/groups/mailman.yml
@@ -22,8 +22,6 @@
- fas_client
- collectd/base
- sudo
- - { role: openvpn/client,
- when: env != "staging" }
- apache
tasks:
@@ -42,7 +40,7 @@
#
- name: prepare setting up the database
- hosts: db01.stg.rpmfusion.org:db01.rpmfusion.org
+ hosts: mailman-db-stg:mailman-db
gather_facts: no
user: root
@@ -53,7 +51,7 @@
- packages
- name: setup the database
- hosts: db01.stg.rpmfusion.org:db01.rpmfusion.org
+ hosts: mailman-db-stg:mailman-db
gather_facts: no
become: yes
become_user: postgres
@@ -116,7 +114,6 @@
- httpd
- mailman3
- postfix
- when: inventory_hostname.startswith('mailman01.online') or inventory_hostname.startswith('lists-dev')
handlers:
- include: "{{ handlers }}/restart_services.yml"
8 years, 1 month
[ansible] Add moin playbook
by Nicolas Chauvet
commit dca057d47897b44f97c7150444c14e6783677baa
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Nov 23 20:58:14 2016 +0100
Add moin playbook
playbooks/groups/moin.yml | 50 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
---
diff --git a/playbooks/groups/moin.yml b/playbooks/groups/moin.yml
new file mode 100644
index 0000000..7bdb014
--- /dev/null
+++ b/playbooks/groups/moin.yml
@@ -0,0 +1,50 @@
+# create a new moin server
+# NOTE: should be used with --limit most of the time
+# NOTE: make sure there is room/space for this server on the vmhost
+# NOTE: most of these vars_path come from group_vars/moin* or from hostvars
+- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=moin:moin-stg"
+
+- name: make the box be real
+ hosts: moin-stg:moin
+ user: root
+ gather_facts: True
+
+ vars_files:
+ - /srv/web/infra/ansible/vars/global.yml
+ - "/srv/private/ansible/vars.yml"
+ - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
+
+ roles:
+ - base
+ - rkhunter
+ - nagios/client
+ - hosts
+ - fas_client
+ - collectd/base
+ - sudo
+ - apache
+
+ tasks:
+ - include: "{{ tasks }}/yumrepos.yml"
+ - include: "{{ tasks }}/2fa_client.yml"
+ - include: "{{ tasks }}/motd.yml"
+
+ handlers:
+ - include: "{{ handlers }}/restart_services.yml"
+
+
+- name: deploy moin itself
+ hosts: moin-stg:moin
+ user: root
+ gather_facts: True
+
+ vars_files:
+ - /srv/web/infra/ansible/vars/global.yml
+ - "/srv/private/ansible/vars.yml"
+ - "{{ vars_path }}/{{ ansible_distribution }}.yml"
+
+ roles:
+ - moin
+
+ handlers:
+ - include: "{{ handlers }}/restart_services.yml"
8 years, 1 month
[ansible] Add initial support for moin
by Nicolas Chauvet
commit 140996aa7b18aadf0cea82166f7324d5af207ecf
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Nov 23 20:57:07 2016 +0100
Add initial support for moin
roles/moin/tasks/main.yml | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/roles/moin/tasks/main.yml b/roles/moin/tasks/main.yml
new file mode 100644
index 0000000..8224060
--- /dev/null
+++ b/roles/moin/tasks/main.yml
@@ -0,0 +1,33 @@
+---
+# tasks file for moin
+
+- name: install needed packages for moin
+ yum: pkg={{ item }} state=present
+ with_items:
+ - moin
+ - mod_wsgi
+ - httpd
+ tags:
+ - packages
+ - moin
+
+- name: create content directory for moin
+ file: path=/var/www/moin state=directory mode=0755
+ tags:
+ - config
+ - moin
+
+- name: create a symlink to moin.wsgi
+ file: path=/var/www/moin/moin.wsgi dest=/usr/share/moin/server/moin.wsgi state=link
+ tags:
+ - config
+ - moin
+
+- name: moin apache config
+ copy: src=moin.conf dest=/etc/http/conf.d/moin.conf
+ tags:
+ - config
+ - moin
+ notify:
+ - restart apache
+
8 years, 1 month
[ansible] Update threads for pkgdb
by Nicolas Chauvet
commit 9d5bd727a3205ccfd7730eddc5ef5bf73b65cfc5
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Nov 23 18:47:47 2016 +0100
Update threads for pkgdb
inventory/group_vars/pkgdb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/inventory/group_vars/pkgdb b/inventory/group_vars/pkgdb
index 8aaaef4..2fb8902 100644
--- a/inventory/group_vars/pkgdb
+++ b/inventory/group_vars/pkgdb
@@ -8,8 +8,8 @@ num_cpus: 1
# the host_vars/$hostname file
wsgi_fedmsg_service: pkgdb2
-wsgi_procs: 3
-wsgi_threads: 2
+wsgi_procs: 2
+wsgi_threads: 25
tcp_ports: [ 80 ]
8 years, 1 month