DEV Community

Query Filter
Query Filter

Posted on

docker23

- name: "Create symlink to default version"
  ansible.builtin.file:
    src: "/opt/CPLSEMEA/{{ lightspeed.build_version }}"
    dest: "/opt/CPLSEMEA/live"
    state: link
    force: yes
    follow: false
  become: yes

- name: "PRE-LS MESSAGE: Announce directory check"
  ansible.builtin.debug:
    msg: "Checking contents of /opt/CPLSEMEA/live to verify deployment..."

- name: "List content of the symbolic link"
  ansible.builtin.command:
    cmd: "ls -ltr /opt/CPLSEMEA/live/" # noqa command-instead-of-module
  register: symlink_contents
  become: yes

- name: "POST-LS MESSAGE: Display results"
  ansible.builtin.debug:
    msg: 
      - "Deployment content verification complete. See list below:"
      - "{{ symlink_contents.stdout_lines }}"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)