Changeset - 7276805aace1
[Not reviewed]
0 1 0
Branko Majic (branko) - 2 months ago 2024-09-03 13:21:14
branko@majic.rs
MAR-218: Fix partial becomes (become_user without become on task level).
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
roles/mail_server/molecule/default/prepare.yml
Show inline comments
 
@@ -83,12 +83,13 @@
 
        state: directory
 
        owner: vagrant
 
        group: vagrant
 
        mode: 0755
 

	
 
    - name: Create virtual environment for running ClamAV database sync tool
 
      become: true
 
      become_user: vagrant
 
      command:
 
        cmd: "/usr/bin/virtualenv --python /usr/bin/python3 --prompt '(cvdupdate) ' /var/lib/cvdupdate"
 
        creates: "/var/lib/cvdupdate"
 

	
 
    - name: Deploy pip requirements file for running the ClamAV database sync tool
 
@@ -97,12 +98,13 @@
 
        dest: /var/lib/cvdupdate/requirements.txt
 
        owner: vagrant
 
        group: vagrant
 
        mode: 0644
 

	
 
    - name: Install requirements in the pipreqcheck virtual environment
 
      become: true
 
      become_user: vagrant
 
      pip:
 
        requirements: /var/lib/cvdupdate/requirements.txt
 
        virtualenv: /var/lib/cvdupdate
 

	
 
    - name: Allow traversal of Vagrant directory by the http server user
 
@@ -116,16 +118,18 @@
 
        state: directory
 
        owner: vagrant
 
        group: vagrant
 
        mode: 0755
 

	
 
    - name: Configure default location for storing ClamAV database files
 
      become: true
 
      become_user: vagrant
 
      command: "/var/lib/cvdupdate/bin/cvd config set --dbdir /vagrant/clamav-database/"
 

	
 
    - name: Download/update the ClamAV database files
 
      become: true
 
      become_user: vagrant
 
      command: "/var/lib/cvdupdate/bin/cvd update"
 

	
 
    - name: Allow all users to read ClamAV database files
 
      file:
 
        path: "/vagrant/clamav-database/"
0 comments (0 inline, 0 general)