[ansible-lint] Use FQCN for module actions in opeshift playbooks
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
parent
13a490cbf3
commit
f89ed1cf08
27 changed files with 101 additions and 101 deletions
|
@ -19,26 +19,26 @@
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Apply node labels
|
- name: Apply node labels
|
||||||
command: oc label --overwrite namespace application-monitoring monitoring-key=cpe
|
ansible.builtin.command: oc label --overwrite namespace application-monitoring monitoring-key=cpe
|
||||||
|
|
||||||
- name: Apply node labels for bodhi POC
|
- name: Apply node labels for bodhi POC
|
||||||
command: oc label --overwrite namespace bodhi monitoring-key=cpe
|
ansible.builtin.command: oc label --overwrite namespace bodhi monitoring-key=cpe
|
||||||
|
|
||||||
- name: Make other pods available to the application-monitoring project
|
- name: Make other pods available to the application-monitoring project
|
||||||
command: oc adm pod-network make-projects-global application-monitoring
|
ansible.builtin.command: oc adm pod-network make-projects-global application-monitoring
|
||||||
|
|
||||||
- name: Copy files
|
- name: Copy files
|
||||||
copy: src={{ roles_path }}/openshift-apps/application-monitoring/files/ dest=/etc/openshift_apps/application-monitoring/
|
ansible.builtin.copy: src={{ roles_path }}/openshift-apps/application-monitoring/files/ dest=/etc/openshift_apps/application-monitoring/
|
||||||
|
|
||||||
- name: Prometheus CRDs
|
- name: Prometheus CRDs
|
||||||
command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/prometheus-operator-crd/
|
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/prometheus-operator-crd/
|
||||||
|
|
||||||
- name: Prometheus CRD RBAC
|
- name: Prometheus CRD RBAC
|
||||||
command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus-operator-crd/
|
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus-operator-crd/
|
||||||
|
|
||||||
- name: Prometheus Operator RBAC
|
- name: Prometheus Operator RBAC
|
||||||
command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus-operator/
|
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus-operator/
|
||||||
|
|
||||||
- name: Prometheus RBAC
|
- name: Prometheus RBAC
|
||||||
command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus/
|
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus/
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: DB user
|
- name: DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ tahrirDBUser }}"
|
name: "{{ tahrirDBUser }}"
|
||||||
password: "{{ (env == 'production') | ternary(tahrirDBPassword, tahrirstgDBPassword) }}"
|
password: "{{ (env == 'production') | ternary(tahrirDBPassword, tahrirstgDBPassword) }}"
|
||||||
- name: Database creation
|
- name: Database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ badges_db_name }}"
|
name: "{{ badges_db_name }}"
|
||||||
owner: "{{ tahrirDBUser }}"
|
owner: "{{ tahrirDBUser }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
@ -38,11 +38,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: DB user
|
- name: DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ tahrirDBUser }}"
|
name: "{{ tahrirDBUser }}"
|
||||||
password: "{{ (env == 'production') | ternary(tahrirDBPassword, tahrirstgDBPassword) }}"
|
password: "{{ (env == 'production') | ternary(tahrirDBPassword, tahrirstgDBPassword) }}"
|
||||||
- name: Grant the db user read only access to datanommer2
|
- name: Grant the db user read only access to datanommer2
|
||||||
postgresql_privs:
|
community.postgresql.postgresql_privs:
|
||||||
database: datanommer2
|
database: datanommer2
|
||||||
privs: SELECT
|
privs: SELECT
|
||||||
objs: ALL_IN_SCHEMA
|
objs: ALL_IN_SCHEMA
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install psycopg2 for the postgresql ansible modules
|
- name: Install psycopg2 for the postgresql ansible modules
|
||||||
package: name=python3-psycopg2 state=present
|
ansible.builtin.package: name=python3-psycopg2 state=present
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the database user
|
- name: Create the database user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ stg_blockerbugs_db_user }}"
|
name: "{{ stg_blockerbugs_db_user }}"
|
||||||
password: "{{ stg_blockerbugs_db_password }}"
|
password: "{{ stg_blockerbugs_db_password }}"
|
||||||
- name: Create the database itself
|
- name: Create the database itself
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "blockerbugs"
|
name: "blockerbugs"
|
||||||
owner: "{{ stg_blockerbugs_db_user }}"
|
owner: "{{ stg_blockerbugs_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation
|
- name: Test the database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "blockerbugs"
|
name: "blockerbugs"
|
||||||
owner: "{{ stg_blockerbugs_db_user }}"
|
owner: "{{ stg_blockerbugs_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
@ -47,16 +47,16 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the database user
|
- name: Create the database user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ prod_blockerbugs_db_user }}"
|
name: "{{ prod_blockerbugs_db_user }}"
|
||||||
password: "{{ prod_blockerbugs_db_password }}"
|
password: "{{ prod_blockerbugs_db_password }}"
|
||||||
- name: Create the database itself
|
- name: Create the database itself
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "blockerbugs"
|
name: "blockerbugs"
|
||||||
owner: "{{ prod_blockerbugs_db_user }}"
|
owner: "{{ prod_blockerbugs_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation
|
- name: Test the database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "blockerbugs"
|
name: "blockerbugs"
|
||||||
owner: "{{ prod_blockerbugs_db_user }}"
|
owner: "{{ prod_blockerbugs_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Include Global Variables
|
- name: Include Global Variables
|
||||||
include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
ansible.builtin.include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
||||||
- name: Include Bodhi Variables
|
- name: Include Bodhi Variables
|
||||||
include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml
|
ansible.builtin.include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml
|
||||||
- name: Set bodhi_version fact
|
- name: Set bodhi_version fact
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
args:
|
args:
|
||||||
bodhi_version: "{{ bodhi_version }}"
|
bodhi_version: "{{ bodhi_version }}"
|
||||||
|
|
||||||
|
@ -154,29 +154,29 @@
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Scale up pods
|
- name: Scale up pods
|
||||||
command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
|
ansible.builtin.command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
|
||||||
when: env == "production"
|
when: env == "production"
|
||||||
- name: Scale up pods
|
- name: Scale up pods
|
||||||
command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
|
ansible.builtin.command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
|
||||||
when: env == "production"
|
when: env == "production"
|
||||||
- name: Scale up pods
|
- name: Scale up pods
|
||||||
command: oc -n bodhi scale dc/bodhi-web --replicas=2
|
ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas=2
|
||||||
when: env == "production"
|
when: env == "production"
|
||||||
- name: Scale up pods
|
- name: Scale up pods
|
||||||
command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
|
ansible.builtin.command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
|
||||||
when: env == "staging"
|
when: env == "staging"
|
||||||
- name: Scale up pods
|
- name: Scale up pods
|
||||||
command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
|
ansible.builtin.command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
|
||||||
when: env == "staging"
|
when: env == "staging"
|
||||||
- name: Scale up pods
|
- name: Scale up pods
|
||||||
command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
|
ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
|
||||||
when: env == "staging"
|
when: env == "staging"
|
||||||
- name: Set the timeout to the openshift route
|
- name: Set the timeout to the openshift route
|
||||||
command: "oc -n bodhi annotate route bodhi-web --overwrite haproxy.router.openshift.io/timeout=180s"
|
ansible.builtin.command: "oc -n bodhi annotate route bodhi-web --overwrite haproxy.router.openshift.io/timeout=180s"
|
||||||
tags:
|
tags:
|
||||||
- route-timeout
|
- route-timeout
|
||||||
- name: Trigger critpath cronjob
|
- name: Trigger critpath cronjob
|
||||||
command: "oc -n bodhi create job critpathcron-manual-{{ lookup('pipe', 'date +%s') }} --from=cronjob/fedora-bodhi-critpathcron"
|
ansible.builtin.command: "oc -n bodhi create job critpathcron-manual-{{ lookup('pipe', 'date +%s') }} --from=cronjob/fedora-bodhi-critpathcron"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- critpathcron
|
- critpathcron
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Include Global Variables
|
- name: Include Global Variables
|
||||||
include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
ansible.builtin.include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# actions to create the project in OpenShift
|
# actions to create the project in OpenShift
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
# Set the fedora_messaging_routing_keys var based on the environment
|
# Set the fedora_messaging_routing_keys var based on the environment
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Set the fedora_messaging_routing_keys var
|
- name: Set the fedora_messaging_routing_keys var
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
fedora_messaging_routing_keys:
|
fedora_messaging_routing_keys:
|
||||||
- "org.fedoraproject.stg.coreos.build.request.ostree-import"
|
- "org.fedoraproject.stg.coreos.build.request.ostree-import"
|
||||||
when: env == 'staging'
|
when: env == 'staging'
|
||||||
- name: Set the fedora_messaging_routing_keys var
|
- name: Set the fedora_messaging_routing_keys var
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
fedora_messaging_routing_keys:
|
fedora_messaging_routing_keys:
|
||||||
- "org.fedoraproject.prod.coreos.build.request.ostree-import"
|
- "org.fedoraproject.prod.coreos.build.request.ostree-import"
|
||||||
when: env != 'staging'
|
when: env != 'staging'
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Create project directory
|
- name: Create project directory
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: /etc/openshift_apps/openshift-config
|
path: /etc/openshift_apps/openshift-config
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Patch ingress controller with custom error pages
|
- name: Patch ingress controller with custom error pages
|
||||||
command: oc patch -n openshift-ingress-operator ingresscontroller/default --patch '{"spec":{"httpErrorCodePages":{"name":"fedora-error-code-pages"}}}' --type=merge
|
ansible.builtin.command: oc patch -n openshift-ingress-operator ingresscontroller/default --patch '{"spec":{"httpErrorCodePages":{"name":"fedora-error-code-pages"}}}' --type=merge
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: DB user
|
- name: DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: datagrepper
|
name: datagrepper
|
||||||
password: "{{ (env == 'production') | ternary(datagrepper_prod_db_password, datagrepper_stg_db_password) }}"
|
password: "{{ (env == 'production') | ternary(datagrepper_prod_db_password, datagrepper_stg_db_password) }}"
|
||||||
- name: Grant the db user read only access to datanommer2
|
- name: Grant the db user read only access to datanommer2
|
||||||
postgresql_privs:
|
community.postgresql.postgresql_privs:
|
||||||
database: datanommer2
|
database: datanommer2
|
||||||
privs: SELECT
|
privs: SELECT
|
||||||
objs: ALL_IN_SCHEMA
|
objs: ALL_IN_SCHEMA
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Define Project
|
- name: Define Project
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/project
|
name: openshift/project
|
||||||
vars:
|
vars:
|
||||||
description: Documentation translation
|
description: Documentation translation
|
||||||
|
@ -25,26 +25,26 @@
|
||||||
- apply-appowners
|
- apply-appowners
|
||||||
|
|
||||||
- name: Define imagestream
|
- name: Define imagestream
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/imagestream
|
name: openshift/imagestream
|
||||||
vars:
|
vars:
|
||||||
imagename: builder
|
imagename: builder
|
||||||
|
|
||||||
- name: Define buildconfig
|
- name: Define buildconfig
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/object
|
name: openshift/object
|
||||||
vars:
|
vars:
|
||||||
objectname: buildconfig.yml
|
objectname: buildconfig.yml
|
||||||
template: buildconfig.yml
|
template: buildconfig.yml
|
||||||
|
|
||||||
- name: Start build
|
- name: Start build
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/start-build
|
name: openshift/start-build
|
||||||
vars:
|
vars:
|
||||||
buildname: docstranslation-build
|
buildname: docstranslation-build
|
||||||
|
|
||||||
- name: Define secrets
|
- name: Define secrets
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/object
|
name: openshift/object
|
||||||
vars:
|
vars:
|
||||||
objectname: secrets.yml
|
objectname: secrets.yml
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
- deploy-secrets
|
- deploy-secrets
|
||||||
|
|
||||||
- name: Define configMap
|
- name: Define configMap
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/object
|
name: openshift/object
|
||||||
vars:
|
vars:
|
||||||
objectname: configmap.yml
|
objectname: configmap.yml
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
- deploy-config
|
- deploy-config
|
||||||
|
|
||||||
- name: Define cron job
|
- name: Define cron job
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/object
|
name: openshift/object
|
||||||
vars:
|
vars:
|
||||||
template: cron.yml
|
template: cron.yml
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
###############################################
|
###############################################
|
||||||
# to run: sudo rbac-playbook -l os_masters_stg[0] -t delete openshift-apps/docstranslation.yml
|
# to run: sudo rbac-playbook -l os_masters_stg[0] -t delete openshift-apps/docstranslation.yml
|
||||||
- name: Delete project
|
- name: Delete project
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift/object-delete
|
name: openshift/object-delete
|
||||||
vars:
|
vars:
|
||||||
objecttype: project
|
objecttype: project
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Elections DB user
|
- name: Elections DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ elections_db_user }}"
|
name: "{{ elections_db_user }}"
|
||||||
password: "{{ elections_db_pass }}"
|
password: "{{ elections_db_pass }}"
|
||||||
- name: Elections database creation
|
- name: Elections database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ elections_db_name }}"
|
name: "{{ elections_db_name }}"
|
||||||
owner: "{{ elections_db_user }}"
|
owner: "{{ elections_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Firmitas Role
|
- name: Firmitas Role
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: openshift-apps/firmitas
|
name: openshift-apps/firmitas
|
||||||
tasks_from: main
|
tasks_from: main
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: FMN DB user
|
- name: FMN DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: fmn
|
name: fmn
|
||||||
password: "{{ (env == 'production') | ternary(fmn_prod_db_password, fmn_stg_db_password) }}"
|
password: "{{ (env == 'production') | ternary(fmn_prod_db_password, fmn_stg_db_password) }}"
|
||||||
- name: FMN database creation
|
- name: FMN database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: fmn
|
name: fmn
|
||||||
owner: fmn
|
owner: fmn
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Grant the fmn user access to the fmn vhost
|
- name: Grant the fmn user access to the fmn vhost
|
||||||
rabbitmq_user:
|
community.rabbitmq.rabbitmq_user:
|
||||||
user: "fmn{{ env_suffix }}"
|
user: "fmn{{ env_suffix }}"
|
||||||
vhost: /fmn
|
vhost: /fmn
|
||||||
configure_priv: .*
|
configure_priv: .*
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
- rabbitmq_cluster
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the sending queues in the fmn vhost
|
- name: Create the sending queues in the fmn vhost
|
||||||
rabbitmq_queue:
|
community.rabbitmq.rabbitmq_queue:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
vhost: /fmn
|
vhost: /fmn
|
||||||
auto_delete: no
|
auto_delete: no
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Set the timeout to the openshift route
|
- name: Set the timeout to the openshift route
|
||||||
command: "oc -n greenwave annotate route {{ item }} --overwrite haproxy.router.openshift.io/timeout=750s"
|
ansible.builtin.command: "oc -n greenwave annotate route {{ item }} --overwrite haproxy.router.openshift.io/timeout=750s"
|
||||||
with_items:
|
with_items:
|
||||||
- greenwave-web
|
- greenwave-web
|
||||||
- web-pretty
|
- web-pretty
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install psycopg2 for the postgresql ansible modules
|
- name: Install psycopg2 for the postgresql ansible modules
|
||||||
package: name=python3-psycopg2 state=present
|
ansible.builtin.package: name=python3-psycopg2 state=present
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the database user
|
- name: Create the database user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ kanban_db_user }}"
|
name: "{{ kanban_db_user }}"
|
||||||
password: "{{ kanban_db_pass }}"
|
password: "{{ kanban_db_pass }}"
|
||||||
- name: Create the database itself
|
- name: Create the database itself
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ kanban_db_name }}"
|
name: "{{ kanban_db_name }}"
|
||||||
owner: "{{ kanban_db_user }}"
|
owner: "{{ kanban_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation
|
- name: Test the database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ kanban_db_name }}"
|
name: "{{ kanban_db_name }}"
|
||||||
owner: "{{ kanban_db_user }}"
|
owner: "{{ kanban_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
@ -47,16 +47,16 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the database user
|
- name: Create the database user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ kanban_db_user }}"
|
name: "{{ kanban_db_user }}"
|
||||||
password: "{{ kanban_db_pass_stg }}"
|
password: "{{ kanban_db_pass_stg }}"
|
||||||
- name: Create the database itself
|
- name: Create the database itself
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ kanban_db_name }}"
|
name: "{{ kanban_db_name }}"
|
||||||
owner: "{{ kanban_db_user }}"
|
owner: "{{ kanban_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation
|
- name: Test the database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ kanban_db_name }}"
|
name: "{{ kanban_db_name }}"
|
||||||
owner: "{{ kanban_db_user }}"
|
owner: "{{ kanban_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Kerneltest DB user
|
- name: Kerneltest DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ (env == 'production') | ternary(kerneltest_db_user, kerneltest_stg_db_user) }}"
|
name: "{{ (env == 'production') | ternary(kerneltest_db_user, kerneltest_stg_db_user) }}"
|
||||||
password: "{{ (env == 'production') | ternary(kerneltest_db_pass, kerneltest_stg_db_pass) }}"
|
password: "{{ (env == 'production') | ternary(kerneltest_db_pass, kerneltest_stg_db_pass) }}"
|
||||||
- name: Kerneltest database creation
|
- name: Kerneltest database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ kerneltest_db_name }}"
|
name: "{{ kerneltest_db_name }}"
|
||||||
owner: "{{ (env == 'production') | ternary(kerneltest_db_user, kerneltest_stg_db_user) }}"
|
owner: "{{ (env == 'production') | ternary(kerneltest_db_user, kerneltest_stg_db_user) }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Include Global Variables
|
- name: Include Global Variables
|
||||||
include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
ansible.builtin.include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
||||||
|
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Apply objects
|
- name: Apply objects
|
||||||
include_role: name=openshift/object
|
ansible.builtin.include_role: name=openshift/object
|
||||||
vars:
|
vars:
|
||||||
template: "{{ item }}.yml"
|
template: "{{ item }}.yml"
|
||||||
objectname: "{{ item }}.yml"
|
objectname: "{{ item }}.yml"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
- frontend-service
|
- frontend-service
|
||||||
|
|
||||||
- name: Apply Deployment
|
- name: Apply Deployment
|
||||||
include_role: name=openshift/object
|
ansible.builtin.include_role: name=openshift/object
|
||||||
vars:
|
vars:
|
||||||
template: backend-deployment.yml
|
template: backend-deployment.yml
|
||||||
objectname: "{{ item.name }}-deployment.yml"
|
objectname: "{{ item.name }}-deployment.yml"
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: Apply CronJob
|
- name: Apply CronJob
|
||||||
include_role: name=openshift/object
|
ansible.builtin.include_role: name=openshift/object
|
||||||
vars:
|
vars:
|
||||||
template: cronjob.yml
|
template: cronjob.yml
|
||||||
objectname: "{{ item.name }}-cronjob.yml"
|
objectname: "{{ item.name }}-cronjob.yml"
|
||||||
|
|
|
@ -71,28 +71,28 @@
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Run initial f.10 import
|
- name: Run initial f.10 import
|
||||||
command: "oc -n languages create job stats-10-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-10"
|
ansible.builtin.command: "oc -n languages create job stats-10-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-10"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- init
|
- init
|
||||||
- f10
|
- f10
|
||||||
|
|
||||||
- name: Run initial f.20 import
|
- name: Run initial f.20 import
|
||||||
command: "oc -n languages create job stats-20-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-20"
|
ansible.builtin.command: "oc -n languages create job stats-20-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-20"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- init
|
- init
|
||||||
- f20
|
- f20
|
||||||
|
|
||||||
- name: Run initial f.30 import
|
- name: Run initial f.30 import
|
||||||
command: "oc -n languages create job stats-30-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-30"
|
ansible.builtin.command: "oc -n languages create job stats-30-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-30"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- init
|
- init
|
||||||
- f30
|
- f30
|
||||||
|
|
||||||
- name: Run initial f.latest import
|
- name: Run initial f.latest import
|
||||||
command: "oc -n languages create job stats-latest-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-latest"
|
ansible.builtin.command: "oc -n languages create job stats-latest-{{ lookup('pipe', 'date +%s') }}-init --from=cronjob/stats-latest"
|
||||||
tags:
|
tags:
|
||||||
- never
|
- never
|
||||||
- init
|
- init
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Maubot DB user
|
- name: Maubot DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: maubot
|
name: maubot
|
||||||
password: "{{ (env == 'production') | ternary(maubot_prod_db_password, maubot_stg_db_password) }}"
|
password: "{{ (env == 'production') | ternary(maubot_prod_db_password, maubot_stg_db_password) }}"
|
||||||
- name: Maubot database creation
|
- name: Maubot database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: maubot
|
name: maubot
|
||||||
owner: maubot
|
owner: maubot
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the RabbitMQ user
|
- name: Create the RabbitMQ user
|
||||||
rabbitmq_user:
|
community.rabbitmq.rabbitmq_user:
|
||||||
user: "messaging-bridge{{ env_suffix }}.fedoraproject.org"
|
user: "messaging-bridge{{ env_suffix }}.fedoraproject.org"
|
||||||
vhost: /pubsub
|
vhost: /pubsub
|
||||||
read_priv: "((a|z)mq\\.topic|amqp_to_zmq|amqp_bridge_verify_missing)"
|
read_priv: "((a|z)mq\\.topic|amqp_to_zmq|amqp_bridge_verify_missing)"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
- rabbitmq_cluster
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the RabbitMQ queue amqp_to_zmq
|
- name: Create the RabbitMQ queue amqp_to_zmq
|
||||||
rabbitmq_queue:
|
community.rabbitmq.rabbitmq_queue:
|
||||||
name: amqp_to_zmq
|
name: amqp_to_zmq
|
||||||
vhost: /pubsub
|
vhost: /pubsub
|
||||||
login_user: admin
|
login_user: admin
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
- rabbitmq_cluster
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the RabbitMQ queue for verify-missing
|
- name: Create the RabbitMQ queue for verify-missing
|
||||||
rabbitmq_queue:
|
community.rabbitmq.rabbitmq_queue:
|
||||||
name: amqp_bridge_verify_missing
|
name: amqp_bridge_verify_missing
|
||||||
vhost: /pubsub
|
vhost: /pubsub
|
||||||
durable: True
|
durable: True
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
- rabbitmq_cluster
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the amqp-to-zmq bindings
|
- name: Create the amqp-to-zmq bindings
|
||||||
rabbitmq_binding:
|
community.rabbitmq.rabbitmq_binding:
|
||||||
name: amq.topic
|
name: amq.topic
|
||||||
destination: amqp_to_zmq
|
destination: amqp_to_zmq
|
||||||
destination_type: queue
|
destination_type: queue
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
- rabbitmq_cluster
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the verify-missing bindings
|
- name: Create the verify-missing bindings
|
||||||
rabbitmq_binding:
|
community.rabbitmq.rabbitmq_binding:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
destination: amqp_bridge_verify_missing
|
destination: amqp_bridge_verify_missing
|
||||||
destination_type: queue
|
destination_type: queue
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: DB user
|
- name: DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ (env == 'production') | ternary(mirrormanager_db_user, mirrormanager_stg_db_user) }}"
|
name: "{{ (env == 'production') | ternary(mirrormanager_db_user, mirrormanager_stg_db_user) }}"
|
||||||
password: "{{ (env == 'production') | ternary(mirrormanager_db_pass, mirrormanager_stg_db_pass) }}"
|
password: "{{ (env == 'production') | ternary(mirrormanager_db_pass, mirrormanager_stg_db_pass) }}"
|
||||||
- name: FMN database creation
|
- name: FMN database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ (env == 'production') | ternary(mirrormanager_db_name, mirrormanager_stg_db_name) }}"
|
name: "{{ (env == 'production') | ternary(mirrormanager_db_name, mirrormanager_stg_db_name) }}"
|
||||||
owner: "{{ (env == 'production') | ternary(mirrormanager_db_user, mirrormanager_stg_db_user) }}"
|
owner: "{{ (env == 'production') | ternary(mirrormanager_db_user, mirrormanager_stg_db_user) }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Include Global Variables
|
- name: Include Global Variables
|
||||||
include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
ansible.builtin.include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: openshift/project
|
- role: openshift/project
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install psycopg2 for the postgresql ansible modules
|
- name: Install psycopg2 for the postgresql ansible modules
|
||||||
package: name=python3-psycopg2 state=present
|
ansible.builtin.package: name=python3-psycopg2 state=present
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the database user
|
- name: Create the database user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ oraculum_db_user }}"
|
name: "{{ oraculum_db_user }}"
|
||||||
password: "{{ oraculum_db_pass }}"
|
password: "{{ oraculum_db_pass }}"
|
||||||
- name: Create the database itself
|
- name: Create the database itself
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ oraculum_db_name }}"
|
name: "{{ oraculum_db_name }}"
|
||||||
owner: "{{ oraculum_db_user }}"
|
owner: "{{ oraculum_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation
|
- name: Test the database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ oraculum_db_name }}"
|
name: "{{ oraculum_db_name }}"
|
||||||
owner: "{{ oraculum_db_user }}"
|
owner: "{{ oraculum_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Setup Rabbit User
|
- name: Setup Rabbit User
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: rabbit/user
|
name: rabbit/user
|
||||||
vars:
|
vars:
|
||||||
username: toddlers{{ env_suffix }}
|
username: toddlers{{ env_suffix }}
|
||||||
sent_topics: ^org\.fedoraproject\.{{ env_short }}\.toddlers\..*
|
sent_topics: ^org\.fedoraproject\.{{ env_short }}\.toddlers\..*
|
||||||
|
|
||||||
- name: Setup Rabbit Queue
|
- name: Setup Rabbit Queue
|
||||||
include_role:
|
ansible.builtin.include_role:
|
||||||
name: rabbit/queue
|
name: rabbit/queue
|
||||||
vars:
|
vars:
|
||||||
username: toddlers{{ env_suffix }}
|
username: toddlers{{ env_suffix }}
|
||||||
|
|
|
@ -11,17 +11,17 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Resultsdb DB user - prod
|
- name: Resultsdb DB user - prod
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "resultsdb"
|
name: "resultsdb"
|
||||||
password: "{{ prod_resultsdb_db_password }}"
|
password: "{{ prod_resultsdb_db_password }}"
|
||||||
when: env != 'staging'
|
when: env != 'staging'
|
||||||
- name: Resultsdb DB user - staging
|
- name: Resultsdb DB user - staging
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "resultsdb"
|
name: "resultsdb"
|
||||||
password: "{{ stg_resultsdb_db_password }}"
|
password: "{{ stg_resultsdb_db_password }}"
|
||||||
when: env == 'staging'
|
when: env == 'staging'
|
||||||
- name: Resultsdb database creation
|
- name: Resultsdb database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "resultsdb"
|
name: "resultsdb"
|
||||||
owner: "resultsdb"
|
owner: "resultsdb"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install psycopg2 for the postgresql ansible modules
|
- name: Install psycopg2 for the postgresql ansible modules
|
||||||
package: name=python3-psycopg2 state=present
|
ansible.builtin.package: name=python3-psycopg2 state=present
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
@ -21,30 +21,30 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the database user
|
- name: Create the database user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ testdays_db_user }}"
|
name: "{{ testdays_db_user }}"
|
||||||
password: "{{ testdays_db_pass }}"
|
password: "{{ testdays_db_pass }}"
|
||||||
- name: Create the database itself
|
- name: Create the database itself
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ testdays_db_name }}"
|
name: "{{ testdays_db_name }}"
|
||||||
owner: "{{ testdays_db_user }}"
|
owner: "{{ testdays_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation
|
- name: Test the database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ testdays_db_name }}"
|
name: "{{ testdays_db_name }}"
|
||||||
owner: "{{ testdays_db_user }}"
|
owner: "{{ testdays_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Create the database user (resultsdb)
|
- name: Create the database user (resultsdb)
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "{{ resultsdb_testdays_db_user }}"
|
name: "{{ resultsdb_testdays_db_user }}"
|
||||||
password: "{{ resultsdb_testdays_db_pass }}"
|
password: "{{ resultsdb_testdays_db_pass }}"
|
||||||
- name: Create the database itself (resultsdb)
|
- name: Create the database itself (resultsdb)
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ resultsdb_testdays_db_name }}"
|
name: "{{ resultsdb_testdays_db_name }}"
|
||||||
owner: "{{ resultsdb_testdays_db_user }}"
|
owner: "{{ resultsdb_testdays_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
- name: Test the database creation (resultsdb)
|
- name: Test the database creation (resultsdb)
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "{{ resultsdb_testdays_db_name }}"
|
name: "{{ resultsdb_testdays_db_name }}"
|
||||||
owner: "{{ resultsdb_testdays_db_user }}"
|
owner: "{{ resultsdb_testdays_db_user }}"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -10,17 +10,17 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Waiverdb DB user - prod
|
- name: Waiverdb DB user - prod
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "waiverdb"
|
name: "waiverdb"
|
||||||
password: "{{ prod_waiverdb_db_password }}"
|
password: "{{ prod_waiverdb_db_password }}"
|
||||||
when: env != 'staging'
|
when: env != 'staging'
|
||||||
- name: Waiverdb DB user - staging
|
- name: Waiverdb DB user - staging
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: "waiverdb"
|
name: "waiverdb"
|
||||||
password: "{{ stg_waiverdb_db_password }}"
|
password: "{{ stg_waiverdb_db_password }}"
|
||||||
when: env == 'staging'
|
when: env == 'staging'
|
||||||
- name: Waiverdb database creation
|
- name: Waiverdb database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: "waiverdb"
|
name: "waiverdb"
|
||||||
owner: "waiverdb"
|
owner: "waiverdb"
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Webhook2fedmsg DB user
|
- name: Webhook2fedmsg DB user
|
||||||
postgresql_user:
|
community.postgresql.postgresql_user:
|
||||||
name: webhook2fedmsg
|
name: webhook2fedmsg
|
||||||
password: "{{ (env == 'production') | ternary(webhook2fedmsg_prod_db_password, webhook2fedmsg_stg_db_password) }}"
|
password: "{{ (env == 'production') | ternary(webhook2fedmsg_prod_db_password, webhook2fedmsg_stg_db_password) }}"
|
||||||
- name: Webhook2fedmsg database creation
|
- name: Webhook2fedmsg database creation
|
||||||
postgresql_db:
|
community.postgresql.postgresql_db:
|
||||||
name: webhook2fedmsg
|
name: webhook2fedmsg
|
||||||
owner: webhook2fedmsg
|
owner: webhook2fedmsg
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue