From 1747f1f76e4f4a56c7d3dd2eed36668d33a41a66 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Sun, 17 Jan 2021 23:34:42 -0700 Subject: [PATCH] noggin theme --- ansible/playbooks/handlers/main.yml | 5 +++ ansible/playbooks/init-rocky-noggin-theme.yml | 40 +++++++++++++++++++ ...itlab-ee.yml => rocky-rocky-gitlab-ee.yml} | 0 3 files changed, 45 insertions(+) create mode 100644 ansible/playbooks/init-rocky-noggin-theme.yml rename ansible/playbooks/{role-gitlab-ee.yml => rocky-rocky-gitlab-ee.yml} (100%) diff --git a/ansible/playbooks/handlers/main.yml b/ansible/playbooks/handlers/main.yml index a9f7821..ba255cb 100644 --- a/ansible/playbooks/handlers/main.yml +++ b/ansible/playbooks/handlers/main.yml @@ -32,3 +32,8 @@ command: gitlab-ctl reconfigure register: gitlab_restart failed_when: gitlab_restart_handler_failed_when | bool + +- name: restart_noggin + service: + name: noggin + state: restarted diff --git a/ansible/playbooks/init-rocky-noggin-theme.yml b/ansible/playbooks/init-rocky-noggin-theme.yml new file mode 100644 index 0000000..2ae8d34 --- /dev/null +++ b/ansible/playbooks/init-rocky-noggin-theme.yml @@ -0,0 +1,40 @@ +--- +# (Re)deploys the noggin theme +- name: Deploy Noggin Theme + hosts: "idp" + become: true + + handers: + - import_tasks: handlers/main.yml + + pre_tasks: + - name: Check if ansible cannot be run here + stat: + path: /etc/no-ansible + register: no_ansible + + - name: Verify if we can run ansible + assert: + that: + - "not no_ansible.stat.exists" + success_msg: "We are not able to run on this node" + fail_msg: "/etc/no-ansible exists - skipping run on this node" + + tasks: + - name: Deploy Rocky Noggin Theme + git: + repo: https://github.com/rocky-linux/noggin-theme.git + dest: /opt/noggin/noggin/noggin/themes/rocky + update: true + version: main + become_user: noggin + notify: restart_noggin + + post_tasks: + - name: Touching run file that ansible has ran here + file: + path: /var/log/ansible.run + state: touch + mode: '0644' + owner: root + group: root diff --git a/ansible/playbooks/role-gitlab-ee.yml b/ansible/playbooks/rocky-rocky-gitlab-ee.yml similarity index 100% rename from ansible/playbooks/role-gitlab-ee.yml rename to ansible/playbooks/rocky-rocky-gitlab-ee.yml