Skip to content

Commit

Permalink
Merge pull request #150 from companieshouse/additional-tooling
Browse files Browse the repository at this point in the history
Add additional CLI tooling
  • Loading branch information
marcransome authored Oct 22, 2024
2 parents ca8da95 + ed6cd6a commit 304652a
Show file tree
Hide file tree
Showing 4 changed files with 713 additions and 1 deletion.
7 changes: 7 additions & 0 deletions roles/deploy/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

- name: Restart Postfix service
ansible.builtin.systemd:
name: postfix
state: restarted
enabled: true
4 changes: 3 additions & 1 deletion roles/deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
- application_configs_path is defined and application_configs_path | trim | length > 0
msg: "Required variable(s) empty or undefined"


- name: Set common Tuxedo fact for domain suffix
ansible.builtin.set_fact:
tuxedo_common_suffix: "{{ ansible_facts.hostname
Expand Down Expand Up @@ -110,6 +109,9 @@
register: cloudwatch_logs_selinux_context
changed_when: cloudwatch_logs_selinux_context.stdout != ""

- name: Install additional tooling
ansible.builtin.import_tasks: tools.yml

- name: Deploy Tuxedo services
ansible.builtin.include_tasks: deploy.yml

Expand Down
32 changes: 32 additions & 0 deletions roles/deploy/tasks/tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---

- name: Install mailx mail processing system # noqa fqcn[action-core]
ansible.builtin.yum:
name: mailx
state: present

- name: Disable mailx inbuilt SMTP relay
ansible.builtin.replace:
path: /etc/mail.rc
regexp: '^(set smtp=.*)'
replace: '#\1'

- name: Configure Postfix mail transfer agent
ansible.builtin.template:
src: main.cf.j2
dest: "{{ postfix_config_path }}"
owner: root
group: root
mode: '0644'
notify:
- Restart Postfix service

- name: Install additional CLI tools # noqa fqcn[action-core]
ansible.builtin.yum:
name:
- vim
- telnet
state: present

- name: Flush handlers
ansible.builtin.meta: flush_handlers
Loading

0 comments on commit 304652a

Please sign in to comment.