summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2017-09-14 14:40:14 +0000
committerPaul W. Frields <stickster@gmail.com>2017-09-14 14:44:19 +0000
commitac90ff980446040778c2323777e1fa9058aaef81 (patch)
tree6fc1150ad644b84422fd7bd74e2d3f887f0e0400
parente7411874fe0cf3dd9ecb3b645ebb337375ea581f (diff)
downloadansible-ac90ff980446040778c2323777e1fa9058aaef81.tar.gz
ansible-ac90ff980446040778c2323777e1fa9058aaef81.tar.xz
ansible-ac90ff980446040778c2323777e1fa9058aaef81.zip
Add preliminary definitions for Ansible Magazine
N.B.: no proxy configs are set up in this commit. Expectation is only a small crew of A-Mag interested folks will be testing for now.
-rw-r--r--inventory/cloud1
-rw-r--r--inventory/host_vars/ansiblemagazine.fedorainfracloud.org28
-rw-r--r--inventory/inventory2
-rw-r--r--master.yml1
-rw-r--r--playbooks/hosts/ansiblemagazine.fedorainfracloud.org.yml73
5 files changed, 105 insertions, 0 deletions
diff --git a/inventory/cloud b/inventory/cloud
index cdb206f99..201e9b8b0 100644
--- a/inventory/cloud
+++ b/inventory/cloud
@@ -1,4 +1,5 @@
[cloud]
+ansiblemagazine.fedorainfracloud.org
arm03-packager00.cloud.fedoraproject.org
arm03-packager01.cloud.fedoraproject.org
arm03-qa00.cloud.fedoraproject.org
diff --git a/inventory/host_vars/ansiblemagazine.fedorainfracloud.org b/inventory/host_vars/ansiblemagazine.fedorainfracloud.org
new file mode 100644
index 000000000..9ccb71e7f
--- /dev/null
+++ b/inventory/host_vars/ansiblemagazine.fedorainfracloud.org
@@ -0,0 +1,28 @@
+---
+image: rhel7-20141015
+instance_type: m1.large
+keypair: fedora-admin-20130801
+security_group: ssh-anywhere-persistent,web-80-anywhere-persistent,web-443-anywhere-persistent,allow-nagios-persistent,default,all-icmp-persistent
+zone: nova
+tcp_ports: [22, 80, 443]
+
+inventory_tenant: persistent
+inventory_instance_name: ansiblemagazine
+hostbase: ansiblemagazine
+public_ip:
+root_auth_users: gdk rbergero pfrields
+description: Ansible Magazine
+
+host_backup_targets: ['/backups', '/var/www/html']
+dbs_to_backup: ['wp']
+mariadb_root_password: "{{ ansiblemagazine_mariadb_password }}"
+extra_enablerepos: ''
+
+cloud_networks:
+ # persistent-net
+ - net-id: "67b77354-39a4-43de-b007-bb813ac5c35f"
+
+nagios_Check_Services:
+ nrpe: true
+ sshd: true
+ httpd: true
diff --git a/inventory/inventory b/inventory/inventory
index 2a66c5633..59202008e 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -1187,6 +1187,8 @@ communityblog.fedorainfracloud.org
# Fedora Magazine
#magazine.fedorainfracloud.org
magazine2.fedorainfracloud.org
+# Ansible Magazine
+ansiblemagazine.fedorainfracloud.org
# Flock RegCfp instance
regcfp2.fedorainfracloud.org
# Modularity (ticket 5390)
diff --git a/master.yml b/master.yml
index 5b5492fd0..b8f27fdd2 100644
--- a/master.yml
+++ b/master.yml
@@ -145,6 +145,7 @@
- include: /srv/web/infra/ansible/playbooks/hosts/insim.fedorainfracloud.org.yml
- include: /srv/web/infra/ansible/playbooks/hosts/lists-dev.fedorainfracloud.org.yml
- include: /srv/web/infra/ansible/playbooks/hosts/magazine2.fedorainfracloud.org.yml
+- include: /srv/web/infra/ansible/playbooks/hosts/ansiblemagazine.fedorainfracloud.org.yml
- include: /srv/web/infra/ansible/playbooks/hosts/modernpaste.fedorainfracloud.org.yml
- include: /srv/web/infra/ansible/playbooks/hosts/modularity.fedorainfracloud.org.yml
- include: /srv/web/infra/ansible/playbooks/hosts/piwik.fedorainfracloud.org.yml
diff --git a/playbooks/hosts/ansiblemagazine.fedorainfracloud.org.yml b/playbooks/hosts/ansiblemagazine.fedorainfracloud.org.yml
new file mode 100644
index 000000000..6299ef3ce
--- /dev/null
+++ b/playbooks/hosts/ansiblemagazine.fedorainfracloud.org.yml
@@ -0,0 +1,73 @@
+- name: check/create instance
+ hosts: magazine2.fedorainfracloud.org
+ gather_facts: False
+
+ vars_files:
+ - /srv/web/infra/ansible/vars/global.yml
+ - /srv/private/ansible/vars.yml
+ - /srv/web/infra/ansible/vars/fedora-cloud.yml
+ - /srv/private/ansible/files/openstack/passwords.yml
+
+ tasks:
+ - include: "{{ tasks_path }}/persistent_cloud.yml"
+
+ handlers:
+ - include: "{{ handlers_path }}/restart_services.yml"
+
+- name: setup all the things
+ hosts: ansiblemagazine.fedorainfracloud.org
+ gather_facts: True
+ vars_files:
+ - /srv/web/infra/ansible/vars/global.yml
+ - /srv/private/ansible/vars.yml
+ - /srv/private/ansible/files/openstack/passwords.yml
+ - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
+
+ pre_tasks:
+ - include: "{{ tasks_path }}/cloud_setup_basic.yml"
+ - name: set hostname (required by some services, at least postfix need it)
+ hostname: name="{{inventory_hostname}}"
+
+ tasks:
+ - name: add packages
+ yum: state=present name={{ item }}
+ with_items:
+ - httpd
+ - php
+ - php-mysql
+ - mariadb-server
+ - mariadb
+ - mod_ssl
+ - php-mcrypt
+ - php-mbstring
+ - wget
+ - unzip
+ - postfix
+ - wordpress
+
+ - name: enable httpd service
+ service: name=httpd enabled=yes state=started
+
+ - name: configure postfix for ipv4 only
+ raw: postconf -e inet_protocols=ipv4
+
+ - name: enable local postfix service
+ service: name=postfix enabled=yes state=started
+
+ roles:
+ - basessh
+ - nagios_client
+ - mariadb_server
+
+ post_tasks:
+ - name: create databaseuser
+ mysql_user: name=magazine
+ host=localhost
+ state=present
+ password="{{ ansiblemagazine_db_password }}"
+ priv="ansiblemagazine.*:ALL"
+
+ - name: Wordpress cron
+ cron: name="Wordpress cron"
+ minute="*/10"
+ job="curl http://localhost:8008/wp-cron.php >/dev/null"