Changeset - 3a02e5b774b2
[Not reviewed]
0 3 0
Branko Majic (branko) - 4 years ago 2020-01-07 22:34:33
branko@majic.rs
MAR-148: Clean-up TODO entries for the common role coming from bugs in earlier versions of software:

- Switch to using the systemd task for reloads.
- Add back validation of pipreqcheck activation script file
permissions.
- Add back validation of missing ntp/ntpdate packages.
3 files changed with 5 insertions and 18 deletions:
0 comments (0 inline, 0 general)
roles/common/handlers/main.yml
Show inline comments
 
@@ -28,16 +28,9 @@
 
    name: ferm
 
    state: restarted
 

	
 
# @TODO: Replace this with use of systemd module once Ansible is upgraded to
 
# version 2.2+.
 
- name: Reload systemd
 
  command: "systemctl daemon-reload"
 
  tags:
 
    # [ANSIBLE0012] Commands should not change things if nothing needs doing
 
    #   This task is invoked only if user is very specific about requiring to
 
    #   run the handlers manually as a way to bring the system to consistency
 
    #   after interrupted runs.
 
    - skip_ansible_lint
 
  systemd:
 
    daemon_reload: true
 

	
 
- name: Restart NTP server
 
  service:
roles/common/molecule/default/tests/test_default.py
Show inline comments
 
@@ -250,9 +250,7 @@ def test_pipreqcheck_virtualenv(host, virtualenv_activate_path):
 
        assert virtualenv_activate.is_file
 
        assert virtualenv_activate.user == 'pipreqcheck'
 
        assert virtualenv_activate.group == 'pipreqcheck'
 
        # @TODO: Possibly due to some timing issues, this file might
 
        # sometimes end-up being 0640, sometimes 0644.
 
        # assert virtualenv_activate.mode == 0o644
 
        assert virtualenv_activate.mode == 0o644
 

	
 

	
 
@pytest.mark.parametrize('config_dir', [
roles/common/molecule/default/tests/test_parameters_mandatory.py
Show inline comments
 
@@ -133,12 +133,8 @@ def test_ntp_software_not_installed(host):
 
    Tests if NTP packages are absent.
 
    """
 

	
 
    # @TODO: This throws an exception. It seems version of Testinfra
 
    # used cannot properly check for absence of package.
 
    # assert not host.package('ntp').is_installed
 
    # assert not host.package('ntpdate').is_installed
 

	
 
    pass
 
    assert not host.package('ntp').is_installed
 
    assert not host.package('ntpdate').is_installed
 

	
 

	
 
def test_ntp_listening_interfaces(host):
0 comments (0 inline, 0 general)