mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1348 from holta/openssh-server-on-ubuntu-18
mysql -> mariadb & ssh -> openssh-server in vars/ubuntu-18.yml & others
This commit is contained in:
commit
6d0edb0728
14 changed files with 41 additions and 16 deletions
|
@ -135,21 +135,24 @@
|
||||||
# For various reasons the mysql service cannot be enabled on Fedora 20, but
|
# For various reasons the mysql service cannot be enabled on Fedora 20, but
|
||||||
# 'mariadb', which is its real name can. On Fedora 18 we need to use 'mysqld'.
|
# 'mariadb', which is its real name can. On Fedora 18 we need to use 'mysqld'.
|
||||||
|
|
||||||
- name: "Set mysql_service: mariadb by default"
|
# BETTER TO USE /opt/iiab/iiab/vars/<OS>.yml
|
||||||
set_fact:
|
#- name: "Set mysql_service: mariadb by default"
|
||||||
mysql_service: mariadb
|
# set_fact:
|
||||||
|
# mysql_service: mariadb
|
||||||
|
|
||||||
- name: "Set mysql_service: mysqld etc (Fedora 18)"
|
- name: "Set mysql_service: mysqld etc (Fedora 18)"
|
||||||
set_fact:
|
set_fact:
|
||||||
mysql_service: mysqld
|
# BETTER TO USE /opt/iiab/iiab/vars/<OS>.yml
|
||||||
|
#mysql_service: mysqld
|
||||||
no_NM_reload: True
|
no_NM_reload: True
|
||||||
is_F18: True
|
is_F18: True
|
||||||
when: (ansible_distribution_release == "based on Fedora 18" or ansible_distribution_version == "18") and ansible_distribution == "Fedora"
|
when: (ansible_distribution_release == "based on Fedora 18" or ansible_distribution_version == "18") and ansible_distribution == "Fedora"
|
||||||
|
|
||||||
- name: "Set mysql_service: mysql (debuntu)"
|
# BETTER TO USE /opt/iiab/iiab/vars/<OS>.yml
|
||||||
set_fact:
|
#- name: "Set mysql_service: mysql (debuntu)"
|
||||||
mysql_service: mysql
|
# set_fact:
|
||||||
when: is_debuntu
|
# mysql_service: mysql
|
||||||
|
# when: is_debuntu
|
||||||
|
|
||||||
- name: "Set iiab_fqdn: {{ iiab_hostname }}.{{ iiab_domain }}"
|
- name: "Set iiab_fqdn: {{ iiab_hostname }}.{{ iiab_domain }}"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -206,6 +209,10 @@
|
||||||
value: "{{ first_run }}"
|
value: "{{ first_run }}"
|
||||||
- option: local_tz
|
- option: local_tz
|
||||||
value: "{{ local_tz }}"
|
value: "{{ local_tz }}"
|
||||||
|
- option: no_NM_reload
|
||||||
|
value: "{{ no_NM_reload }}"
|
||||||
|
- option: is_F18
|
||||||
|
value: "{{ is_F18 }}"
|
||||||
- option: FQDN_changed
|
- option: FQDN_changed
|
||||||
value: "{{ FQDN_changed }}"
|
value: "{{ FQDN_changed }}"
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
state: present
|
state: present
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: "Install 23 common packages: acpid, bridge-utils, bzip2, curl, gawk, hostapd, htop, i2c-tools, logrotate, make, mlocate, netmask, net-tools, ntfs-3g, openssh-server, pandoc, rsync, sudo, tar, unzip, usbmount, usbutils, wget"
|
- name: "Install 22 common packages: acpid, bridge-utils, bzip2, curl, gawk, hostapd, htop, i2c-tools, logrotate, make, mlocate, netmask, net-tools, ntfs-3g, pandoc, rsync, sudo, tar, unzip, usbmount, usbutils, wget"
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- acpid
|
- acpid
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
- netmask
|
- netmask
|
||||||
- net-tools
|
- net-tools
|
||||||
- ntfs-3g
|
- ntfs-3g
|
||||||
- openssh-server
|
#- openssh-server # ssh (Raspbian) or openssh-server (other OS's) already installed by 1-prep's roles/sshd/tasks/main.yml
|
||||||
- pandoc
|
- pandoc
|
||||||
- rsync
|
- rsync
|
||||||
- sudo
|
- sudo
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
|
- name: Install ssh daemon
|
||||||
|
package:
|
||||||
|
name: "{{ sshd_package }}"
|
||||||
|
state: present
|
||||||
|
when: sshd_enabled
|
||||||
|
|
||||||
- name: Disable root login with password
|
- name: Disable root login with password
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/ssh/sshd_config
|
dest: /etc/ssh/sshd_config
|
||||||
regexp: '^PermitRootLogin'
|
regexp: '^PermitRootLogin'
|
||||||
line: 'PermitRootLogin without-password'
|
line: 'PermitRootLogin without-password'
|
||||||
state: present
|
state: present
|
||||||
|
when: sshd_enabled
|
||||||
#TODO: use handler to reload ssh
|
#TODO: use handler to reload ssh
|
||||||
|
|
||||||
- name: Create root .ssh
|
- name: Create root .ssh
|
||||||
|
@ -25,14 +32,14 @@
|
||||||
force: no
|
force: no
|
||||||
when: sshd_enabled
|
when: sshd_enabled
|
||||||
|
|
||||||
- name: Enable & start sshd
|
- name: Enable & start ssh daemon
|
||||||
service:
|
service:
|
||||||
name: "{{ sshd_service }}"
|
name: "{{ sshd_service }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
when: sshd_enabled
|
when: sshd_enabled
|
||||||
|
|
||||||
- name: Disable sshd
|
- name: Disable ssh daemon
|
||||||
service:
|
service:
|
||||||
name: "{{ sshd_service }}"
|
name: "{{ sshd_service }}"
|
||||||
enabled: no
|
enabled: no
|
||||||
|
|
|
@ -14,6 +14,7 @@ systemctl_program: /usr/bin/systemctl
|
||||||
mysql_service: mariadb
|
mysql_service: mariadb
|
||||||
dhcp_service: dhcpd
|
dhcp_service: dhcpd
|
||||||
apache_log: /var/log/httpd/access_log
|
apache_log: /var/log/httpd/access_log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: sshd
|
sshd_service: sshd
|
||||||
php_version: 7.0
|
php_version: 7.0
|
||||||
postgresql_version: 9.5
|
postgresql_version: 9.5
|
||||||
|
|
|
@ -15,6 +15,7 @@ nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
mysql_service: mariadb
|
mysql_service: mariadb
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 7.1
|
php_version: 7.1
|
||||||
postgresql_version: 10
|
postgresql_version: 10
|
||||||
|
|
|
@ -14,6 +14,7 @@ nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
mysql_service: mysql
|
mysql_service: mysql
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 5
|
php_version: 5
|
||||||
postgresql_version: 9.4
|
postgresql_version: 9.4
|
||||||
|
|
|
@ -13,8 +13,9 @@ apache_log_dir: /var/log/apache2
|
||||||
smb_service: smbd
|
smb_service: smbd
|
||||||
nmb_service: nmbd
|
nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
mysql_service: mysql
|
mysql_service: mariadb
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 7.0
|
php_version: 7.0
|
||||||
postgresql_version: 9.6
|
postgresql_version: 9.6
|
||||||
|
|
|
@ -10,10 +10,11 @@ apache_log_dir: /var/log/httpd
|
||||||
smb_service: smb
|
smb_service: smb
|
||||||
nmb_service: nmb
|
nmb_service: nmb
|
||||||
systemctl_program: /usr/bin/systemctl
|
systemctl_program: /usr/bin/systemctl
|
||||||
mysql_service: mariadb
|
mysql_service: mysqld
|
||||||
apache_log: /var/log/httpd/access_log
|
apache_log: /var/log/httpd/access_log
|
||||||
apache_log_dir: /var/log/httpd
|
apache_log_dir: /var/log/httpd
|
||||||
php_version: 5
|
php_version: 5
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: sshd
|
sshd_service: sshd
|
||||||
nextcloud_install: False
|
nextcloud_install: False
|
||||||
nextcloud_enabled: False
|
nextcloud_enabled: False
|
||||||
|
|
|
@ -12,6 +12,7 @@ nmb_service: nmb
|
||||||
systemctl_program: /usr/bin/systemctl
|
systemctl_program: /usr/bin/systemctl
|
||||||
mysql_service: mariadb
|
mysql_service: mariadb
|
||||||
apache_log: /var/log/httpd/access_log
|
apache_log: /var/log/httpd/access_log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: sshd
|
sshd_service: sshd
|
||||||
systemd_location: /usr/lib/systemd/system
|
systemd_location: /usr/lib/systemd/system
|
||||||
# Upgrade OS's own Calibre to very latest:
|
# Upgrade OS's own Calibre to very latest:
|
||||||
|
|
|
@ -16,6 +16,7 @@ nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
mysql_service: mysql
|
mysql_service: mysql
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: ssh
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 5
|
php_version: 5
|
||||||
postgresql_version: 9.4
|
postgresql_version: 9.4
|
||||||
|
|
|
@ -15,8 +15,9 @@ apache_log_dir: /var/log/apache2
|
||||||
smb_service: smbd
|
smb_service: smbd
|
||||||
nmb_service: nmbd
|
nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
mysql_service: mysql
|
mysql_service: mariadb
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: ssh
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 7.0
|
php_version: 7.0
|
||||||
postgresql_version: 9.6
|
postgresql_version: 9.6
|
||||||
|
|
|
@ -15,6 +15,7 @@ nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
mysql_service: mysql
|
mysql_service: mysql
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 7.0
|
php_version: 7.0
|
||||||
postgresql_version: 9.5
|
postgresql_version: 9.5
|
||||||
|
|
|
@ -15,6 +15,7 @@ systemctl_program: /bin/systemctl
|
||||||
# issue raised
|
# issue raised
|
||||||
mysql_service: mysql
|
mysql_service: mysql
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 7.1
|
php_version: 7.1
|
||||||
postgresql_version: 9.6
|
postgresql_version: 9.6
|
||||||
|
|
|
@ -14,8 +14,9 @@ smb_service: smbd
|
||||||
nmb_service: nmbd
|
nmb_service: nmbd
|
||||||
systemctl_program: /bin/systemctl
|
systemctl_program: /bin/systemctl
|
||||||
# issue raised
|
# issue raised
|
||||||
mysql_service: mysql
|
mysql_service: mariadb
|
||||||
apache_log: /var/log/apache2/access.log
|
apache_log: /var/log/apache2/access.log
|
||||||
|
sshd_package: openssh-server
|
||||||
sshd_service: ssh
|
sshd_service: ssh
|
||||||
php_version: 7.2
|
php_version: 7.2
|
||||||
# "postgresql_version: 10.3" fails (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 18.04)
|
# "postgresql_version: 10.3" fails (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 18.04)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue