瀏覽代碼

clase 28/02/23

pulitux 2 年之前
父節點
當前提交
ba6070eeac
共有 6 個文件被更改,包括 45 次插入0 次删除
  1. 3 0
      smtp-auto/ansible.cfg
  2. 5 0
      smtp-auto/inventory
  3. 15 0
      smtp-auto/playbook.yml
  4. 3 0
      smtp-review/ansible.cfg
  5. 4 0
      smtp-review/inventory
  6. 15 0
      smtp-review/playbook.yml

+ 3 - 0
smtp-auto/ansible.cfg

@@ -0,0 +1,3 @@
+[defaults]
+inventory=./inventory
+remote_user=devops

+ 5 - 0
smtp-auto/inventory

@@ -0,0 +1,5 @@
+[nullclients]
+servera.lab.example.com
+serverb.lab.example.com
+serverc.lab.example.com
+serverd.lab.example.com

+ 15 - 0
smtp-auto/playbook.yml

@@ -0,0 +1,15 @@
+---
+- name: Configure Null Client Email Service
+  become: true
+  hosts: nullclients
+
+  vars:
+    postfix_conf:
+      relayhost: "[smtp.lab.example.com]"
+      inet_interfaces: "loopback-only"
+      mynetworks: "127.0.0.0/8 [::1]/128"
+      mydestination: ''
+      myorigin: 'lab.example.com'
+
+  roles:
+    - linux-system-roles.postfix

+ 3 - 0
smtp-review/ansible.cfg

@@ -0,0 +1,3 @@
+[defaults]
+inventory=./inventory
+remote_user=devops

+ 4 - 0
smtp-review/inventory

@@ -0,0 +1,4 @@
+servera.lab.example.com
+serverb.lab.example.com
+serverc.lab.example.com
+serverd.lab.example.com

+ 15 - 0
smtp-review/playbook.yml

@@ -0,0 +1,15 @@
+---
+- name: Configure Null Client Email Service
+  become: true
+  hosts: all
+
+  vars:
+    postfix_conf:
+      relayhost: '[smtp.lab.example.com]'
+      inet_interfaces: 'loopback-only'
+      mynetworks: '127.0.0.0/8 [::1]/128'
+      myorigin: 'lab.example.com'
+      mydestination: ''
+
+  roles:
+    - linux-system-roles.postfix