Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-1372 switch to FQN (part 3 - platform-* playbooks) #421

Merged
merged 8 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions playbooks/acs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
ansible.builtin.import_playbook: secrets.yml

- hosts: all:!external
gather_facts: false
gather_facts: no
tasks:
- name: Gather facts from all hosts
ansible.builtin.setup:

- name: Database Role
hosts: database
gather_facts: false
gather_facts: no
roles:
- role: "../roles/postgres"
when: repo_db_url == "" or sync_db_url == ""
Expand All @@ -27,7 +27,7 @@

- name: Activemq Role
hosts: activemq
gather_facts: false
gather_facts: no
roles:
- role: "../roles/activemq"
when: not groups.external_activemq | default([])
Expand All @@ -36,16 +36,16 @@

- name: Transformers Role
hosts: transformers
gather_facts: false
gather_facts: no
roles:
- role: "../roles/transformers"
post_tasks:
- name: update installation status file with Transformers
become: true
become: yes
vars:
transform_components:
transform: "{{ transform }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ transform_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand All @@ -56,21 +56,21 @@

- name: Alfresco Search Role
hosts: search
gather_facts: false
gather_facts: no
roles:
- role: "../roles/search"
post_tasks:
- name: make sure Solr is running
become: true
become: yes
service:
name: alfresco-search
state: started
- name: update installation status file with Search
become: true
become: yes
vars:
search_components:
search: "{{ search }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ search_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand All @@ -81,18 +81,18 @@

- name: Alfresco Repository Role
hosts: repository
gather_facts: false
gather_facts: no
roles:
- role: "../roles/repository"
post_tasks:
- name: update installation status file with ACS
become: true
become: yes
vars:
acs_components:
acs: "{{ acs }}"
amps: "{{ amps }}"
api_explorer: "{{ api_explorer }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ acs_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand All @@ -103,17 +103,17 @@

- name: T-Router Role
hosts: transformers
gather_facts: false
gather_facts: no
roles:
- role: "../roles/trouter"
when: acs.edition == "Enterprise"
post_tasks:
- name: update installation status file with Trouter
become: true
become: yes
vars:
trouter_components:
trouter: "{{ trouter }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ trouter_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand All @@ -124,17 +124,17 @@

- name: Shared File Store Role
hosts: transformers
gather_facts: false
gather_facts: no
roles:
- role: "../roles/sfs"
when: acs.edition == "Enterprise"
post_tasks:
- name: update installation status file with SFS
become: true
become: yes
vars:
sfs_components:
sfs: "{{ sfs }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ sfs_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand All @@ -145,17 +145,17 @@

- name: Alfresco Digital Workspace Role
hosts: adw
gather_facts: false
gather_facts: no
roles:
- role: "../roles/adw"
when: acs.edition == "Enterprise"
post_tasks:
- name: update installation status file with ADW
become: true
become: yes
vars:
adw_components:
adw: "{{ adw }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ adw_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand All @@ -166,12 +166,12 @@

- name: Nginx Role
hosts: nginx
gather_facts: false
gather_facts: no
roles:
- role: "../roles/nginx"
post_tasks:
- name: make sure NGINX is running
become: true
become: yes
service:
name: nginx
state: started
Expand All @@ -180,17 +180,17 @@

- name: Sync Service Role
hosts: syncservice
gather_facts: false
gather_facts: no
roles:
- role: "../roles/sync"
when: acs.edition == "Enterprise"
post_tasks:
- name: update installation status file with Sync
become: true
become: yes
vars:
sync_components:
sync: "{{ sync }}"
blockinfile:
ansible.builtin.blockinfile:
block: "{{ sync_components | to_nice_yaml(indent=2) }}"
create: yes
path: "{{ ansible_installation_status_file }}"
Expand Down
6 changes: 3 additions & 3 deletions playbooks/check-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
- hosts: localhost
tasks:
- name: Fail if Ansible version is too old
fail:
ansible.builtin.fail:
msg:
- "Installed Ansible version is too old. Upgrade to at least 2.12."
- "Please refer to https://github.com/Alfresco/alfresco-ansible-deployment/blob/master/docs/deployment-guide.md#setup-a-control-node for detailed instructions."
when: (ansible_version.major < 2) or
(ansible_version.major == 2 and ansible_version.minor < 12)
- name: Check Jinja2 version
shell: |
ansible.builtin.shell: |
JINJA_VERSION=$(pip3 freeze | grep Jinja2 | sed 's/Jinja2==//g')
echo $JINJA_VERSION
register: jinja2_version
- name: Fail if Jinja2 version is too old
fail:
ansible.builtin.fail:
msg:
- "Installed Jinja2 major version is too old. Upgrade to at least version 3."
- "Please refer to https://github.com/Alfresco/alfresco-ansible-deployment/blob/master/docs/deployment-guide.md#setup-a-control-node for detailed instructions."
Expand Down
2 changes: 1 addition & 1 deletion playbooks/platform-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- hosts: all
vars:
artifacts_path: "{{ download_location | default('/tmp/ansible_artefacts') }}"
become: false
become: no
tasks:
- name: To display warning
debug:
Expand Down
30 changes: 15 additions & 15 deletions playbooks/platform-restart.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- hosts: adw
gather_facts: no
become: true
become: yes
tasks:
- name: Stop Alfresco Digital Workspace
service:
Expand All @@ -13,7 +13,7 @@

- hosts: nginx
gather_facts: no
become: true
become: yes
tasks:
- name: Stop Reverse Proxy
service:
Expand All @@ -25,7 +25,7 @@

- hosts: syncservice
gather_facts: no
become: true
become: yes
tasks:
- name: Stop Alfresco Sync services
service:
Expand All @@ -37,7 +37,7 @@

- hosts: search
gather_facts: no
become: true
become: yes
tasks:
- name: Stop Alfresco Search services
service:
Expand All @@ -49,7 +49,7 @@

- hosts: repository
gather_facts: no
become: true
become: yes
tasks:
- name: Stop Alfresco Content services
service:
Expand All @@ -61,7 +61,7 @@

- hosts: transformers
gather_facts: no
become: true
become: yes
tasks:
- name: Stop Alfresco Transformation services
service:
Expand All @@ -76,7 +76,7 @@
- stop

- hosts: database
become: true
become: yes
tasks:
- name: Stop PostgreSQL
service:
Expand All @@ -88,7 +88,7 @@

- hosts: activemq
gather_facts: no
become: true
become: yes
tasks:
- name: Stop ActiveMQ
service:
Expand All @@ -100,7 +100,7 @@

- hosts: activemq
gather_facts: no
become: true
become: yes
tasks:
- name: Start ActiveMQ
service:
Expand All @@ -111,7 +111,7 @@
- start

- hosts: database
become: true
become: yes
tasks:
- name: Start PostgreSQL
service:
Expand All @@ -123,7 +123,7 @@

- hosts: transformers
gather_facts: no
become: true
become: yes
tasks:
- name: Start Alfresco Transformation services
service:
Expand All @@ -139,7 +139,7 @@

- hosts: repository
gather_facts: no
become: true
become: yes
tasks:
- name: Start Alfresco Content services
service:
Expand All @@ -151,7 +151,7 @@

- hosts: search
gather_facts: no
become: true
become: yes
tasks:
- name: Start Alfresco Search services
service:
Expand All @@ -163,7 +163,7 @@

- hosts: syncservice
gather_facts: no
become: true
become: yes
tasks:
- name: Start Alfresco Sync services
service:
Expand All @@ -175,7 +175,7 @@

- hosts: nginx
gather_facts: no
become: true
become: yes
tasks:
- name: Start Reverse Proxy
service:
Expand Down
Loading