-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from singleplatform-eng/SPROD-4044_install_mana…
…ge_flags manage and install flags
- Loading branch information
Showing
3 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
- name: restart nessusagent | ||
service: name=nessusagent state=restarted | ||
when: nessus_manage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
--- | ||
- block: | ||
- name: Install Nessus Agent from repo | ||
package: | ||
name: "{{nessus_agent_package}}" | ||
update_cache: yes | ||
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" | ||
when: "'.deb' not in nessus_agent_package" | ||
|
||
- name: Install Nessus Agent from repo | ||
package: | ||
name: "{{nessus_agent_package}}" | ||
update_cache: yes | ||
cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" | ||
when: "'.deb' not in nessus_agent_package" | ||
- name: Install Nessus Agent from .deb package | ||
apt: deb={{nessus_agent_package}} | ||
when: "'.deb' in nessus_agent_package" | ||
when: nessus_install | ||
|
||
- name: Install Nessus Agent from .deb package | ||
apt: deb={{nessus_agent_package}} | ||
when: "'.deb' in nessus_agent_package" | ||
- block: | ||
- name: Check agent link status | ||
command: /opt/nessus_agent/sbin/nessuscli agent status | ||
become: yes | ||
ignore_errors: yes | ||
register: nessus_link | ||
|
||
- name: Check agent link status | ||
command: /opt/nessus_agent/sbin/nessuscli agent status | ||
become: yes | ||
ignore_errors: yes | ||
register: nessus_link | ||
- name: Configure Nessus Agent | ||
command: > | ||
/opt/nessus_agent/sbin/nessuscli agent link | ||
--key={{nessus_agent_key}} | ||
--host={{nessus_agent_host}} | ||
--port={{nessus_agent_port}} | ||
--groups="{{nessus_agent_group}}" | ||
become: yes | ||
when: nessus_link|failed | ||
notify: restart nessusagent | ||
|
||
- name: Configure Nessus Agent | ||
command: > | ||
/opt/nessus_agent/sbin/nessuscli agent link | ||
--key={{nessus_agent_key}} | ||
--host={{nessus_agent_host}} | ||
--port={{nessus_agent_port}} | ||
--groups="{{nessus_agent_group}}" | ||
become: yes | ||
when: nessus_link|failed | ||
notify: restart nessusagent | ||
|
||
- name: Ensure nessusagent is started | ||
service: | ||
name: nessusagent | ||
state: started | ||
enabled: yes | ||
- name: Ensure nessusagent is started | ||
service: | ||
name: nessusagent | ||
state: started | ||
enabled: yes | ||
when: nessus_manage |