You've already forked ansible-role-common
yamllint fixes
This commit is contained in:
@@ -1,23 +1,23 @@
|
|||||||
---
|
---
|
||||||
# handlers file for guisea.common
|
# handlers file for guisea.common
|
||||||
- name: Restart Postfix
|
- name: Restart Postfix
|
||||||
service:
|
service:
|
||||||
name: postfix
|
name: postfix
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
- name: Restart SSH
|
- name: Restart SSH
|
||||||
service:
|
service:
|
||||||
name: sshd
|
name: sshd
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: Restart NTPD
|
- name: Restart NTPD
|
||||||
service:
|
service:
|
||||||
name: ntpd
|
name: ntpd
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: reboot windows
|
- name: reboot windows
|
||||||
win_reboot:
|
win_reboot:
|
||||||
|
|
||||||
- name: restart NetworkManager
|
- name: restart NetworkManager
|
||||||
service:
|
service:
|
||||||
name: NetworkManager
|
name: NetworkManager
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
stat:
|
stat:
|
||||||
path: /boot/grub2/grub.cfg
|
path: /boot/grub2/grub.cfg
|
||||||
register: grub_cfg
|
register: grub_cfg
|
||||||
|
|
||||||
- name: Update GRUB
|
- name: Update GRUB
|
||||||
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
when: grub_cfg.stat.exists
|
when: grub_cfg.stat.exists
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: guisea <aaron@guise.net.nz>
|
author: guisea <aaron@guise.net.nz>
|
||||||
role_name: common # if absent directory name hosting role is used instead
|
role_name: common # if absent directory name hosting role is used instead
|
||||||
namespace: cybercinch # if absent, author is used instead
|
namespace: cybercinch # if absent, author is used instead
|
||||||
description: Commonplace system setup
|
description: Commonplace system setup
|
||||||
company: CyberCinch
|
company: CyberCinch
|
||||||
license: MIT
|
license: MIT
|
||||||
min_ansible_version: "2.9"
|
min_ansible_version: "2.9"
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- all
|
- all
|
||||||
galaxy_tags: []
|
galaxy_tags: []
|
||||||
|
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
state: present
|
state: present
|
||||||
update_password: always
|
update_password: always
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Ensure System Culture Set
|
- name: Ensure System Culture Set
|
||||||
win_region:
|
win_region:
|
||||||
location: 183
|
location: 183
|
||||||
format: en-NZ
|
format: en-NZ
|
||||||
unicode_language: en-NZ
|
unicode_language: en-NZ
|
||||||
copy_settings: true
|
copy_settings: true
|
||||||
|
|
||||||
- name: Ensure DNS is set
|
- name: Ensure DNS is set
|
||||||
win_dns_client:
|
win_dns_client:
|
||||||
adapter_names: "*"
|
adapter_names: "*"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- 'C:\Temp'
|
- 'C:\Temp'
|
||||||
- 'C:\Tools'
|
- 'C:\Tools'
|
||||||
|
|
||||||
#- name: Ensure Profile Tool Present
|
#- name: Ensure Profile Tool Present
|
||||||
# win_copy:
|
# win_copy:
|
||||||
# src: Defprof.exe
|
# src: Defprof.exe
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
- include_tasks: networking.yml
|
- include_tasks: networking.yml
|
||||||
- include_tasks: communication.yml
|
- include_tasks: communication.yml
|
||||||
- include_tasks: grub.yml
|
- include_tasks: grub.yml
|
||||||
- include_tasks: motd.yml
|
- include_tasks: motd.yml
|
||||||
|
|||||||
@@ -10,22 +10,25 @@
|
|||||||
notify: Restart Postfix
|
notify: Restart Postfix
|
||||||
when: "'SMTP0' not in inventory_hostname"
|
when: "'SMTP0' not in inventory_hostname"
|
||||||
with_items:
|
with_items:
|
||||||
- { dest: /etc/postfix/main.cf,
|
- {
|
||||||
|
dest: /etc/postfix/main.cf,
|
||||||
regexp: "^.?inet_protocols =",
|
regexp: "^.?inet_protocols =",
|
||||||
line: "inet_protocols = ipv4"
|
line: "inet_protocols = ipv4",
|
||||||
}
|
}
|
||||||
- { dest: /etc/postfix/main.cf,
|
- {
|
||||||
|
dest: /etc/postfix/main.cf,
|
||||||
regexp: "^.?inet_interfaces =",
|
regexp: "^.?inet_interfaces =",
|
||||||
line: "inet_interfaces = all"
|
line: "inet_interfaces = all",
|
||||||
}
|
}
|
||||||
- { dest: /etc/postfix/main.cf,
|
- {
|
||||||
|
dest: /etc/postfix/main.cf,
|
||||||
regexp: "^.?relayhost =",
|
regexp: "^.?relayhost =",
|
||||||
line: "relayhost = {{ relayhost }}"
|
line: "relayhost = {{ relayhost }}",
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
dest: /etc/postfix/main.cf,
|
dest: /etc/postfix/main.cf,
|
||||||
regexp: "^.?smtp_randomize_addresses =",
|
regexp: "^.?smtp_randomize_addresses =",
|
||||||
line: "smtp_randomize_addresses = no"
|
line: "smtp_randomize_addresses = no",
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: postfix | Ensure Postfix is Started/Enabled
|
- name: postfix | Ensure Postfix is Started/Enabled
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: Include tasks only if one of the files exist, otherwise skip the task
|
- name: Include tasks only if one of the files exist, otherwise skip the task
|
||||||
include_tasks: '{{ item }}'
|
include_tasks: "{{ item }}"
|
||||||
vars:
|
vars:
|
||||||
params:
|
params:
|
||||||
files:
|
files:
|
||||||
- '{{ ansible_os_family }}.yml'
|
- "{{ ansible_os_family }}.yml"
|
||||||
- 'common.yml'
|
- "common.yml"
|
||||||
loop: "{{ q('first_found', params, errors='ignore') }}"
|
loop: "{{ q('first_found', params, errors='ignore') }}"
|
||||||
|
|||||||
@@ -16,4 +16,4 @@
|
|||||||
dest: /etc/profile.d/motd.sh
|
dest: /etc/profile.d/motd.sh
|
||||||
regexp: "^/usr/local/bin/dynmotd"
|
regexp: "^/usr/local/bin/dynmotd"
|
||||||
line: "/usr/local/bin/dynmotd"
|
line: "/usr/local/bin/dynmotd"
|
||||||
create: yes
|
create: yes
|
||||||
|
|||||||
@@ -6,14 +6,13 @@
|
|||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
backup: yes
|
backup: yes
|
||||||
with_items:
|
with_items:
|
||||||
- { src: etc.sysconfig.network.j2,
|
- {
|
||||||
|
src: etc.sysconfig.network.j2,
|
||||||
dest: /etc/sysconfig/network,
|
dest: /etc/sysconfig/network,
|
||||||
mode: u+rw, a+r
|
mode: u+rw,
|
||||||
}
|
a+r,
|
||||||
- { src: etc.resolv.conf.j2,
|
|
||||||
dest: /etc/resolv.conf,
|
|
||||||
mode: u+rw, a+r
|
|
||||||
}
|
}
|
||||||
|
- { src: etc.resolv.conf.j2, dest: /etc/resolv.conf, mode: u+rw, a+r }
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
||||||
tags: dns
|
tags: dns
|
||||||
|
|
||||||
@@ -25,23 +24,29 @@
|
|||||||
backrefs: yes
|
backrefs: yes
|
||||||
backup: yes
|
backup: yes
|
||||||
with_items:
|
with_items:
|
||||||
- {regexp: "^127.0.0.1.+localdomain4$",
|
- {
|
||||||
line: "127.0.0.1 localhost {{ inventory_hostname }}"
|
regexp: "^127.0.0.1.+localdomain4$",
|
||||||
|
line: "127.0.0.1 localhost {{ inventory_hostname }}",
|
||||||
}
|
}
|
||||||
- {regexp: "^::1.+localdomain6$",
|
- {
|
||||||
line: "::1 localhost {{ inventory_hostname }}"
|
regexp: "^::1.+localdomain6$",
|
||||||
|
line: "::1 localhost {{ inventory_hostname }}",
|
||||||
}
|
}
|
||||||
- {regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_default_ipv4.address.split('.')[-1] }}$",
|
- {
|
||||||
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}"
|
regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_default_ipv4.address.split('.')[-1] }}$",
|
||||||
|
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}",
|
||||||
}
|
}
|
||||||
- {regexp: "^127.0.0.1.+{{ ansible_nodename.split('.')[0] }}$",
|
- {
|
||||||
line: "127.0.0.1 localhost {{ inventory_hostname }}"
|
regexp: "^127.0.0.1.+{{ ansible_nodename.split('.')[0] }}$",
|
||||||
|
line: "127.0.0.1 localhost {{ inventory_hostname }}",
|
||||||
}
|
}
|
||||||
- {regexp: "^::1.+{{ ansible_nodename.split('.')[0] }}$",
|
- {
|
||||||
line: "::1 localhost {{ inventory_hostname }}"
|
regexp: "^::1.+{{ ansible_nodename.split('.')[0] }}$",
|
||||||
|
line: "::1 localhost {{ inventory_hostname }}",
|
||||||
}
|
}
|
||||||
- {regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_nodename.split('.')[0] }}$",
|
- {
|
||||||
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}"
|
regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_nodename.split('.')[0] }}$",
|
||||||
|
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}",
|
||||||
}
|
}
|
||||||
when: ansible_virtualization_type != "docker"
|
when: ansible_virtualization_type != "docker"
|
||||||
|
|
||||||
@@ -66,4 +71,4 @@
|
|||||||
- /etc/resolv.conf
|
- /etc/resolv.conf
|
||||||
- /etc/hosts
|
- /etc/hosts
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags: dns
|
tags: dns
|
||||||
|
|||||||
Reference in New Issue
Block a user