Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache2: Ansible src option requires state to be 'link' or 'hard' (not 'absent') #860

Closed
holta opened this issue Jun 29, 2018 · 3 comments
Closed
Assignees
Milestone

Comments

@holta
Copy link
Member

holta commented Jun 29, 2018

Ansible 2.6.0 warns us about flawed code:

TASK [httpd : Remove the default apache2 config file (debuntu)] ****************
 [WARNING]: The src option requires state to be 'link' or 'hard'.  This will
become an error in Ansible 2.10

Thanks all for addressing this (Line 53-58 of roles/httpd/tasks/main.yml) those who have Apache/Nginx expertise and those who can!

@holta holta added the bug label Jun 29, 2018
@holta holta added this to the 6.6 milestone Jun 29, 2018
@holta
Copy link
Member Author

holta commented Jun 29, 2018

Regardless what version Ansible, the "src" line (Line 56) looks like a bug — was is included for the purposes of deleting /etc/apache2/sites-available/000-default.conf ?

- name: Remove the default apache2 config file (debuntu)
  file:
    path: /etc/apache2/sites-enabled/000-default.conf
    src: /etc/apache2/sites-available/000-default.conf
    state: absent
  when: is_debuntu

FWIW the official syntax for Ansible's file module is:
https://docs.ansible.com/ansible/latest/modules/file_module.html

@holta holta changed the title new Ansible apache warning: src option requires state to be 'link' or 'hard' apache2: Ansible src option requires state to be 'link' or 'hard' (not 'absent') Jun 29, 2018
@holta
Copy link
Member Author

holta commented Jun 29, 2018

Two nearly identical errors here: iiab/iiab-admin-console#81

@holta
Copy link
Member Author

holta commented Jul 19, 2018

@tim-moody plz review/merge PR iiab/iiab-admin-console#82 when you can.

(Will close iiab/iiab-admin-console#81 automatically.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants