instant-login/old-wp-cli-login copy.yaml

100 lines
2.2 KiB
YAML

type: update
name: One-Click Admin
targetNodes:
nodeGroup: cp
onInstall:
cmd [nodes.cp[0]]:
- cd /var/www/webroot/ROOT/wp-content
- mkdir mu-plugins -p
- cd mu-plugins
- wget https://raw.githubusercontent.com/aaemnnosttv/wp-cli-login-command/master/plugin/wp-cli-login-server.php
- cd /var/www/webroot/ROOT
- wp package install aaemnnosttv/wp-cli-login-command
actions:
instantlogin:
cmd [cp]:
- cd /var/www/webroot/ROOT
- wp user list --fields=user_login,user_email --format=json
choose_admin_login:
cmd [cp]:
- cd /var/www/webroot/ROOT
- wp user list --fields=user_login,user_email --format=json
buttons:
- confirmText: Custom confirm text
loadingText: Load text while waiting
action: instantlogin
caption: Instant Login
successText: Configuration saved successfully!
- confirmText: Custom confirm text
loadingText: Load text while waiting
action: choose_admin_login
caption: Choose Admin
successText: Configuration saved successfully!
# onUninstall - remove mu-plugin
# to make a button open a prompt and choose the admin users use a settings page:
# settings:
# main:
# fields:
# - type: text
# caption: Main form
# config:
# fields:
# - type: text
# caption: Custom form from button action
#
# buttons:
# - settings: config
# action: customAction
# caption: Configure
# submitButtonText: Button Text
# logsPath: "/var/lib/jelastic/keys/111"
# old style - copy directly to mu-plugins
- cd /var/www/webroot/ROOT/wp-content
- mkdir mu-plugins -p
- cd mu-plugins
- wget https://raw.githubusercontent.com/aaemnnosttv/wp-cli-login-command/master/plugin/wp-cli-login-server.php
# type: update
# name: Custom buttons
#
# targetNodes:
# nodeGroup: bl
#
# actions:
# - "..."
#
# buttons:
# - confirmText: Custom confirm text
# loadingText: Load text while waiting
# action: "{String}"
# caption: Configure
# successText: Configuration saved successfully!
# href: http://example.com/
#
# type: install
# name: Addon installation
#
# onInstall:
# installAddon:
# id: wp-automatic-login
#
# addons:
# - id: wp-automatic-login
# name: Automatic WP Login
# onInstall:
# createFile [cp]: /var/log/test.log