-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Added openwisp_radius installation
- Loading branch information
Showing
20 changed files
with
642 additions
and
112 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
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
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
- name: Freeradius additional postgresql system packages | ||
when: openwisp2_radius and freeradius_sql.dialect == "postgresql" | ||
apt: | ||
name: | ||
- postgresql | ||
- freeradius-postgresql | ||
- libpq-dev | ||
state: latest | ||
notify: start postgresql | ||
|
||
- name: Install psycopg2 | ||
when: openwisp2_radius and freeradius_sql.dialect == "postgresql" | ||
pip: | ||
name: psycopg2 | ||
state: latest | ||
retries: 5 | ||
delay: 10 | ||
register: result | ||
until: result is success | ||
notify: start postgresql | ||
|
||
- name: start postgresql for migration | ||
when: openwisp2_radius and freeradius_sql.dialect == "postgresql" | ||
meta: flush_handlers | ||
|
||
- name: Create freeradius database | ||
when: openwisp2_radius and freeradius_sql.dialect == "postgresql" | ||
become_user: postgres | ||
become: true | ||
postgresql_db: | ||
name: "{{ freeradius_sql.dbname }}" | ||
state: present | ||
|
||
- name: Create freeradius database user | ||
when: openwisp2_radius and freeradius_sql.dialect == "postgresql" | ||
become_user: postgres | ||
become: true | ||
postgresql_user: | ||
db: "{{ freeradius_sql.dbname }}" | ||
name: "{{ freeradius_sql.user }}" | ||
password: "{{ freeradius_sql.password }}" | ||
priv: ALL |
Oops, something went wrong.