Repos with recipes to deploy some infrastructure services
Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- ---
-
- - block:
-
- - name: Ensure the override directory exists (systemd)
- file:
- name: "/etc/systemd/system/{{ pdns_rec_service_name }}.service.d"
- state: directory
- owner: root
- group: root
-
- - name: Override the PowerDNS Recursor unit (systemd)
- template:
- src: "override-service.systemd.conf.j2"
- dest: "/etc/systemd/system/{{ pdns_rec_service_name }}.service.d/override.conf"
- owner: root
- group: root
- notify: reload systemd and restart PowerDNS Recursor
-
- when: pdns_rec_service_overrides != {}
- and ansible_facts.service_mgr == "systemd"
-
- - name: Ensure that the PowerDNS Recursor configuration directory exists
- file:
- name: "{{ pdns_rec_config_dir }}"
- state: directory
- owner: root
- group: root
- mode: 0755
-
- - name: Generate the PowerDNS Recursor configuration
- template:
- src: recursor.conf.j2
- dest: "{{ pdns_rec_config_dir }}/{{ pdns_rec_config_file }}"
- owner: "root"
- group: "{{ pdns_rec_group }}"
- mode: 0640
- notify: restart PowerDNS Recursor
-
- - name: Ensure that the PowerDNS Recursor 'include-dir' directory exists
- file:
- name: "{{ pdns_rec_config['include-dir'] }}"
- state: directory
- owner: "root"
- group: "root"
- mode: 0755
- when: "pdns_rec_config['include-dir'] is defined"
-
- - name: Enable Syslog logging for PowerDns Recursors
- lineinfile:
- path: /usr/lib/systemd/system/pdns-recursor.service
- regexp: 'disable-syslog'
- line: "ExecStart=/usr/sbin/pdns_recursor --daemon=no --write-pid=no --log-timestamp=no"
- become: true
- become_method: sudo
- notify: reload systemd and restart PowerDNS Recursor
-
- - name: Configure syslog log rotation
- template:
- src: syslogrotate.conf.j2
- dest: "/etc/logrotate.d/syslog"
- become: true
- become_method: sudo
-
- - name: Generate the PowerDNS Recursor Lua config-file
- copy:
- dest: "{{ pdns_rec_config_lua }}"
- content: "{{ pdns_rec_config_lua_file_content }}"
- owner: "root"
- group: "{{ pdns_rec_group }}"
- mode: 0640
- notify: restart PowerDNS Recursor
- when: pdns_rec_config_lua_file_content != ""
-
- - name: Generate PowerDNS Recursor Lua dns-script
- copy:
- dest: "{{ pdns_rec_config_dns_script }}"
- content: "{{ pdns_rec_config_dns_script_file_content }}"
- owner: "root"
- group: "{{ pdns_rec_group }}"
- mode: 0640
- notify: restart PowerDNS Recursor
- when: pdns_rec_config_dns_script_file_content != ""
|